// JavaScript Document

            var subval = new Array();
            subval[0] = new Array('0','0','31984')
            subval[1] = new Array('0','0','48024')
            subval[2] = new Array('0','0','64040')
            subval[3] = new Array('0','0','80024')
            subval[4] = new Array('0','0','96040')
            subval[5] = new Array('0','0','128040')
            subval[6] = new Array('0','1','16024')
            subval[7] = new Array('0','1','20008')
            subval[8] = new Array('0','1','32048')
            subval[9] = new Array('0','1','48024')
            subval[10] = new Array('1','0','64000')
            subval[11] = new Array('1','0','96000')
            subval[12] = new Array('1','0','128000')
            subval[13] = new Array('1','0','192000')
            subval[14] = new Array('1','1','32000')
            subval[15] = new Array('1','1','48000')
            subval[16] = new Array('1','1','64000')
            subval[17] = new Array('1','1','96000')
            subval[18] = new Array('2','0','88200')
            subval[19] = new Array('2','0','176400')
            subval[20] = new Array('2','0','352800')
            subval[21] = new Array('2','1','44100')
            subval[22] = new Array('2','1','88200')
            subval[23] = new Array('2','1','176400')
            subval[24] = new Array('3','0','32000')
            subval[25] = new Array('3','0','48000')
            subval[26] = new Array('3','0','64000')
            subval[27] = new Array('3','0','96000')
            subval[28] = new Array('3','0','128000')
            subval[29] = new Array('3','1','32000')
            subval[30] = new Array('3','1','48000')
            subval[31] = new Array('3','1','64000')
            subval[32] = new Array('3','1','96000')
            subval[33] = new Array('3','1','128000')
            subval[34] = new Array('4','0','16000')
            subval[35] = new Array('4','0','32000')
            subval[36] = new Array('4','1','16000')
            subval[37] = new Array('4','1','32000')


            function selchange(b,c)   
            {
                var t = document.form1; 
                 
                if(b == 1)
                {
                    if (c == 1)
                    {
                        t.flag_vid1.disabled = false;  
                        t.output_videosize_1.disabled = true;
                        t.iscbr_1.disabled = true;
                        t.bitrate_v1.disabled = true;
                        t.quality_1.disabled = true;
                        t.output_framerate_1.disabled = true;
                        t.ifrmdist_1.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_vid1.disabled = false;  
                        t.output_videosize_1.disabled = false;
                        t.iscbr_1.disabled = false;
                        t.bitrate_v1.disabled = false;
                        t.quality_1.disabled = false;
                        t.output_framerate_1.disabled = false;
                        t.ifrmdist_1.disabled = false;
                    }
                }

                if(b == 2)
                {
                    if (c == 1)
                    {
                        t.flag_vid2.disabled = false;  
                        t.output_videosize_2.disabled = true;
                        t.iscbr_2.disabled = true;
                        t.bitrate_v2.disabled = true;
                        t.quality_2.disabled = true;
                        t.output_framerate_2.disabled = true;
                        t.ifrmdist_2.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_vid2.disabled = false;  
                        t.output_videosize_2.disabled = false;
                        t.iscbr_2.disabled = false;
                        t.bitrate_v2.disabled = false;
                        t.quality_2.disabled = false;
                        t.output_framerate_2.disabled = false;
                        t.ifrmdist_2.disabled = false;
                    }
                }

                if(b == 3)
                {
                    if (c == 1)
                    {
                        t.flag_vid3.disabled = false;  
                        t.output_videosize_3.disabled = true;
                        t.iscbr_3.disabled = true;
                        t.bitrate_v3.disabled = true;
                        t.quality_3.disabled = true;
                        t.output_framerate_3.disabled = true;
                        t.ifrmdist_3.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_vid3.disabled = false;  
                        t.output_videosize_3.disabled = false;
                        t.iscbr_3.disabled = false;
                        t.bitrate_v3.disabled = false;
                        t.quality_3.disabled = false;
                        t.output_framerate_3.disabled = false;
                        t.ifrmdist_3.disabled = false;
                    }
                }

                if(b == 4)
                {
                    if (c == 1)
                    {
                        t.flag_vid4.disabled = false;  
                        t.output_videosize_4.disabled = true;
                        t.iscbr_4.disabled = true;
                        t.bitrate_v4.disabled = true;
                        t.quality_4.disabled = true;
                        t.output_framerate_4.disabled = true;
                        t.ifrmdist_4.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_vid4.disabled = false;  
                        t.output_videosize_4.disabled = false;
                        t.iscbr_4.disabled = false;
                        t.bitrate_v4.disabled = false;
                        t.quality_4.disabled = false;
                        t.output_framerate_4.disabled = false;
                        t.ifrmdist_4.disabled = false;
                    }
                }

                if(b == 5)
                {
                    if (c == 1)
                    {
                        t.flag_aud1.disabled = false;  
                        t.channel_1.disabled = true;
                        t.bitrate_1.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_aud1.disabled = false;  
                        t.channel_1.disabled = false;
                        t.bitrate_1.disabled = false;
                    }
                }

                if(b == 6)
                {
                    if (c == 1)
                    {
                        t.flag_aud2.disabled = false;  
                        t.channel_2.disabled = true;
                        t.bitrate_2.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_aud2.disabled = false;  
                        t.channel_2.disabled = false;
                        t.bitrate_2.disabled = false;
                    }
                }

                if(b == 7)
                {
                    if (c == 1)
                    {
                        t.flag_aud3.disabled = false;  
                        t.channel_3.disabled = true;
                        t.bitrate_3.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_aud3.disabled = false;  
                        t.channel_3.disabled = false;
                        t.bitrate_3.disabled = false;
                    }
                }

                if(b == 8)
                {
                    if (c == 1)
                    {
                        t.flag_aud4.disabled = false;  
                        t.channel_4.disabled = true;
                        t.bitrate_4.disabled = true;
                    }
                    if (c == 0)
                    {
                        t.flag_aud4.disabled = false;  
                        t.channel_4.disabled = false;
                        t.bitrate_4.disabled = false;
                    }
                }

            }

            function changeselect()
            {
                var t = document.form1;

                t.channel_1.length = 0;
                t.channel_1.options[0] = new Option('STEREO','0');
                t.channel_1.options[1] = new Option('MONO','1');
                t.bitrate_1.length = 0; 

                t.channel_2.length = 0;
                t.channel_2.options[0] = new Option('STEREO','0');
                t.channel_2.options[1] = new Option('MONO','1');
                t.bitrate_2.length = 0; 

                t.channel_3.length = 0;
                t.channel_3.options[0] = new Option('STEREO','0');
                t.channel_3.options[1] = new Option('MONO','1');
                t.bitrate_3.length = 0; 

                t.channel_4.length = 0;
                t.channel_4.options[0] = new Option('STEREO','0');
                t.channel_4.options[1] = new Option('MONO','1');
                t.bitrate_4.length = 0; 
            }

            function change(b_id,sub1,sub2)
            {
                var t = document.form1;

                if (b_id == 1)
                {
                    t.bitrate_1.length = 0;
                    for (i=0; i<subval.length; i++)
                    {
                        if ((subval[i][0] == sub1) & (subval[i][1] == sub2))
                        {
                            t.bitrate_1.options[t.bitrate_1.length] = new Option(subval[i][2], subval[i][2]);
                        }
                    }
                }

                if (b_id == 2)
                {
                    t.bitrate_2.length = 0;
                    for (i=0; i<subval.length; i++)
                    {
                        if ((subval[i][0] == sub1) & (subval[i][1] == sub2))
                        {
                            t.bitrate_2.options[t.bitrate_2.length] = new Option(subval[i][2], subval[i][2]);
                        }
                    }
                }

                if (b_id == 3)
                {
                    t.bitrate_3.length = 0;
                    for (i=0; i<subval.length; i++)
                    {
                        if ((subval[i][0] == sub1) & (subval[i][1] == sub2))
                        {
                            t.bitrate_3.options[t.bitrate_3.length] = new Option(subval[i][2], subval[i][2]);
                        }
                    }
                }

                if (b_id == 4)
                {
                    t.bitrate_4.length = 0;
                    for (i=0; i<subval.length; i++)
                    {
                        if ((subval[i][0] == sub1) & (subval[i][1] == sub2))
                        {
                            t.bitrate_4.options[t.bitrate_4.length] = new Option(subval[i][2], subval[i][2]);
                        }
                    }
                }
            }
        </script>
        <script type="text/javascript">

function TDselect(TD){

    var sl1 = document.getElementById ("sl1"); 
    var sl2 = document.getElementById ("sl2"); 
    var sl3 = document.getElementById ("sl3"); 
    var sl4 = document.getElementById ("sl4"); 
    if (TD == 1)
    {
        sl1.style.display = "block";
        sl2.style.display = "none";
        sl3.style.display = "none";
        sl4.style.display = "none";
    }
    if (TD == 2)
    {
        sl2.style.display = "block";
        sl1.style.display = "block";
        sl3.style.display = "none";
        sl4.style.display = "none";
    }
    if (TD == 3)
    {
        sl3.style.display = "block";
        sl2.style.display = "block";
        sl1.style.display = "block";
        sl4.style.display = "none";
    }
    if (TD == 4)
    {
        sl4.style.display = "block";
        sl2.style.display = "block";
        sl3.style.display = "block";
        sl1.style.display = "block";
    }
}
function aa(thisObj,Num){
    if(thisObj.parentNode.className == "selectTag")return;
    var tabObj = thisObj.parentNode.parentNode.id;
    var tabList = document.getElementById(tabObj).getElementsByTagName("li");
    for(i=0; i <tabList.length; i++)
    {
        if (i == Num)
        {
            thisObj.parentNode.className = "selectTag"; 
            document.getElementById("tagContent"+i).className = "tagContent selectTag";
        }else{
            tabList[i].className = ""; 
            document.getElementById("tagContent"+i).className = "tagContent";
        }
    } 
}


        </script>
        <script type="text/javascript">
            Array.prototype.indexOf = function(item) {
                for (var i = 0; i < this.length; i++) {
                    if (this[i] == item) {
                        return i;
                    }
                }

                return -1;
            };
            
            var hiddenItems = [[10,11,22,23], [10,11,12,13,14,15,16,17,18,19,20,21], [20,21,22,23]];


            function qtype(qtype1){
                if (typeof qtype1 == "object") {
                    var ul = qtype1.parentElement ? qtype1.parentElement.parentElement : qtype1.parentNode.parentNode;
                    if (ul)
                    {
                        var items = hiddenItems[qtype1.value - 1];
                        var len = ul.childNodes.length;
                        var j = 0;
                        for (var i = 0; i < len; i++)
                        {
                            var li = ul.childNodes[i];
                            if (li.tagName) {
                                if (items.indexOf(j) >= 0)
                                {
                                    if (!li.style) {
                                        li.style = "";
                                    }
                                    li.style.display = "none";
                                } else {
                                    if (!li.style) {
                                        li.style = "";
                                    }
                                    li.style.display = "block";
                                }
                                j++;
                            }
                        }
                    }
                }

            }
		 function dpi(num)
		 {		
		 	
				document.getElementById("dpi"+num).style.display = "block";	
			
			  			
		 }
		 function dpisure(num)
		 {	
		 	
				document.getElementById("dpi"+num).style.display = "none";
					 
		 }