

function changevp(s) {

	if (s.value==1) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,128);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.option3.selectedIndex = indexByName(form1.option3,'FMP4');
	}
	if (s.value==2) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
		setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,128);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,0);
		form1.option3.selectedIndex = indexByName(form1.option3,'MP42');
	}
	if (s.value==3) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
		setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,128);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.option3.selectedIndex = indexByName(form1.option3,'DX50');
	}
	if (s.value==4) {
		form1.format2.selectedIndex = indexByName(form1.format2,5001);
		setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,0);
		form1.option2.selectedIndex = indexByName(form1.option2,0);
		form1.v_br.value = 112;
		form1.taillex.selectedIndex = indexByName(form1.taillex,1);
	}		
	if (s.value==5) {
		form1.format2.selectedIndex = indexByName(form1.format2,5001);
		setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.option2.selectedIndex = indexByName(form1.option2,1);
		form1.v_br.value = 768;
		form1.taillex.selectedIndex = indexByName(form1.taillex,1);
	}			
	if (s.value==6) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,64);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.option3.selectedIndex = indexByName(form1.option3,'DIVX');
		form1.v_fps.value=25;
		form1.option1.value=256;
		form1.taillex.value=288;
		form1.tailley.value=208;
	}		
	if (s.value==7) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,64);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.option3.selectedIndex = indexByName(form1.option3,'DIVX');
		form1.v_fps.value=25;
		form1.option1.value=512;
		form1.taillex.value=352;
		form1.tailley.value=288;
	}		
	if (s.value==8 || s.value==20) {
		form1.format2.selectedIndex = indexByName(form1.format2,5030);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
	}			
	if (s.value==9) {
		form1.format2.selectedIndex = indexByName(form1.format2,5031);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
	}			
	if (s.value==10) {
		form1.format2.selectedIndex = indexByName(form1.format2,5020);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
	}			
	if (s.value==11) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,128);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,2);
		form1.option3.selectedIndex = indexByName(form1.option3,'MJPG');
		form1.option5.selectedIndex = indexByName(form1.option5,1);
		form1.taillex.value=640;
		form1.tailley.value=480;	
		form1.v_fps.value=25;			
	}
	if (s.value==12 || s.value==100 || s.value==101) {
		form1.format2.selectedIndex = indexByName(form1.format2,5007);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
    if (s.value==100 || s.value==101) {
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.taillex.value=176;
		form1.tailley.value=144;	
		form1.v_fps.value=12;			
		form1.option1.value=112;			
		} else {
		form1.option2.selectedIndex = indexByName(form1.option2,32);
		form1.taillex.value=240;
		form1.tailley.value=176;	
		form1.v_fps.value=15;			
		form1.option1.value=256;	
		}		
	}	
	if (s.value==13) {
		form1.format2.selectedIndex = indexByName(form1.format2,5002);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);
		form1.option2.selectedIndex = indexByName(form1.option2,64);
		form1.v_acodec.selectedIndex = indexByName(form1.v_acodec,1);
		form1.option3.selectedIndex = indexByName(form1.option3,'DIVX');
		form1.taillex.value=320;
		form1.tailley.value=240;	
		form1.v_fps.value=15;					
		form1.option1.value=224;			
	}	
	if (s.value==14) {
		form1.format2.selectedIndex = indexByName(form1.format2,5004);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);	
	}		
	if (s.value==15) {
		form1.format2.selectedIndex = indexByName(form1.format2,5007);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);	
		form1.option2.selectedIndex = indexByName(form1.option2,128);
		form1.taillex.value=320;
		form1.tailley.value=240;	
		form1.v_fps.value=25;			
		form1.option1.value=768;				
	}		
  if (s.value==16) {
		form1.format2.selectedIndex = indexByName(form1.format2,5014);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);	
		form1.option3.selectedIndex = indexByName(form1.option3,1);
	}	
  if (s.value==17) {
		form1.format2.selectedIndex = indexByName(form1.format2,5014);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);	
		form1.option3.selectedIndex = indexByName(form1.option3,2);
	}	
  if (s.value==18) {
		form1.format2.selectedIndex = indexByName(form1.format2,5014);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);	
		form1.option3.selectedIndex = indexByName(form1.option3,3);
	}	
  if (s.value==19) {
		form1.format2.selectedIndex = indexByName(form1.format2,5014);
	  setoptions(form1.format2,form1.option1,form1.format1,form1,document);	
		form1.option3.selectedIndex = indexByName(form1.option3,4);
	}	
}

function setvp(formu) {

	if (formu.format2.value>=5000 && formu.format2.value<6000 && formu.format1.value>=5000 && formu.format1.value<6000) {
	  objv = getObject("vp");
		objv.innerHTML = '<select onchange="changevp(this)" name=preset class=listExt><option>No video preset</option><option value=1>LINUX DivX</option><option value=2>WINDOWS</option><option value=3>WINDOWS DivX</option><option value=14>MAC</option><option value=16>SVCD NTSC</option><option value=17>SVCD PAL</option><option value=18>DVD NTSC</option><option value=19>DVD PAL</option><option value=13>POCKET PC</option><option value=4>MOBILE phone - Basic</option><option value=5>MOBILE phone - Advanced</option><option value=6>NOKIA 770</option><option value=7>NOKIA N800</option><option value=8>iPOD</option><option value=20>iPHONE</option><option value=9>SONY PSP</option><option value=12>NINTENDO DS</option><option value=11>Wii</option><option value=10>MP4 player (S1MP3)</option><option value=15>ZUNE</option><option value=100>SONY ERICSON K750i</option><option value=101>SONY NWZ</option>';
		objv.innerHTML += '</select>';
		
  } else { objv = getObject("vp"); objv.innerHTML = ''; }
}




