// **** MAKE SURE A MINIFIED VERSION OF THIS GOES LIVE 
// **** http://jscompress.com/ and choose Minify (JSMin)

function bfShowDOFields() {
				
	if (document.carform.diffdo.checked == true) {
		document.getElementById('dolocblock').style.display='block';
	}
	else {
		//they've decided not to drop off in a different city, so set the dropoff fields back to the pickup values
		document.getElementById('dolocblock').style.display='none';
		document.carform.docode.selectedIndex=document.carform.pucode.selectedIndex;
		document.carform.docode.onchange();
		//document.carform.docity.selectedIndex=document.carform.pucity.selectedIndex; -- this is handled in the ajax success condition now
		
		
		/*ColdFusion.navigate('/ajaxsupport/car-citylist_cf.cfm?site=' + document.carform.scode.value + '&lang=' + document.carform.lcode.value + '&docode=' + document.carform.pucode.value + '&pucode=' + document.carform.pucode.value + '&docity=' + document.carform.pucity.value + '&listof=do','docity');*/
	}
}

function bfShowTravEast() {
	
	var displayval = 'table';
	
	//figure out if its IE6 or not and set display to block if it is
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent)){ //test for MSIE x.x;
		var ieversion=new Number(RegExp.$1) // capture x.x portion and store as a number
	 	if (ieversion>=6) {
	  		displayval = 'block';
		}
	}
	
	if (document.getElementById('traveastnotes').style.display == 'none') {
		document.getElementById('traveastnotes').style.display=displayval;
	}
	else {
		document.getElementById('traveastnotes').style.display='none';
	}
	
}

function synccities () {
	if (document.carform.pucode.value == document.carform.docode.value) {
		var i=0;
		var len=document.carform.docity.length;
		while (i<=len) {
			if (document.carform.docity[i].value == document.carform.pucity.value) {
				document.carform.docity.selectedIndex=i;
				break;
			}
			i++;
		}
	}
}

