
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
<!-- Add & edit at 24 july-->
function popdetailterms() {
window.open("popup_detailedterms.html","scrWindow","width=600,height=500,menubar=no,status=no,scrollbars=yes,resizable=no"); 
}
<!-- for car_hire_terms-->
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

<!-- functions for booking routers.shtml only  Add & edit at 24 july --> 
<!--
function abc()
{
d = new Date();
//document.write(d);
//dd=d.getDate();
//mm=d.getMonth()+1;
//yy=d.getFullYear();

//d1 = new Date(yy,mm,dd);
//document.calform.ColDay.write(d1);




if (d.getMonth()+1 == 2)
{
	if (d.getDate() > 24)
	{
	mm = d.getMonth()+1 ;
	dd = 4 - ( 28 - d.getDate() ); 
	}
	else
	{
	mm = d.getMonth() ;
	dd = d.getDate()+4 ; 
	}
}
else
{
	if (d.getMonth()+1 == 1 || d.getMonth()+1 == 3 || d.getMonth()+1 == 5 || d.getMonth()+1 == 7 || d.getMonth()+1 == 8 || d.getMonth()+1 == 10 || d.getMonth()+1 == 12 )
	{
		if (d.getDate() > 27)
		{
		mm = d.getMonth()+1 ;
		dd = 4 - ( 31 - d.getDate() ); 
		}
		else
		{
		mm = d.getMonth() ;
		dd = d.getDate()+4 ; 
		}
	}
	else
	{
		if (d.getDate() > 26)
		{
		mm = d.getMonth()+1 ;
		dd = 4 - ( 30 - d.getDate() ); 
		}
		else
		{
//		var iii = d.getDate()+4;
//		alert("flowing correct" + iii );
		mm = d.getMonth() ;
		dd = d.getDate()+ 4 ; 
		}		
	}
}

yy = d.getFullYear() - 2003;

if ( mm >= 12 )
{
 mm = 0;
 yy =  yy +1;
}



document.forms["calform"].elements["ColDay"].selectedIndex=dd -1;
document.forms["calform"].elements["ColMonth"].selectedIndex=mm;
document.forms["calform"].elements["ColYear"].selectedIndex=yy;


if (d.getMonth()+1 == 2)
{
	if (d.getDate() > 17)
	{
	mm1 = d.getMonth()+2 ;
	dd1 = 17 - ( 28 - d.getDate() ); 
		}
	else
	{
	mm1 = d.getMonth() ;
	dd1 = d.getDate()+11 ; 
	}
}
else
{
	if (d.getMonth()+1 == 1 || d.getMonth()+1 == 3 || d.getMonth()+1 == 5 || d.getMonth()+1 == 7 || d.getMonth()+1 == 8 || d.getMonth()+1 == 10 || d.getMonth()+1 == 12 )
	{
		if (d.getDate() > 20)
		{
		mm1 = d.getMonth()+1 ;
		dd1 = 11 - ( 31 - d.getDate() ); 
		}
		else
		{
		mm1 = d.getMonth() ;
		dd1 = d.getDate()+11; 
		}
	}
	else
	{
		if (d.getDate() > 19)
		{
		mm1 = d.getMonth()+1 ;
		dd1 = 11 - ( 30 - d.getDate() ); 
		}
		else
		{
		mm1 = d.getMonth() ;
		dd1 = d.getDate()+11 ; 
		}		
	}
}

yy1 = d.getFullYear()- 2003;

if ( mm1 >= 12 )
{
 mm1 = 0;
 yy1 =  yy1 +1;
}

document.forms["calform"].elements["RtnDay"].selectedIndex=dd1-1;
document.forms["calform"].elements["RtnMonth"].selectedIndex=mm1;
document.forms["calform"].elements["RtnYear"].selectedIndex=yy1;


}
//-->

function pop1wayrentals() {
window.open("popup_1wayrentals.html","scrWindow","width=630,height=525,menubar=yes,status=no,scrollbars=yes,resizable=yes"); 
 }



function pop1wayrentalsinfo() {
window.open("popup_1wayrentalsinfo.html","scrWindow","width=425,height=200,menubar=no,status=no,scrollbars=no,resizable=no"); 
 }



<!--

function MM_open1(theURL,winName,features) { //v2.0

	theURL = theURL+'dd='+document.calform.RtnDay.options[document.calform.RtnDay.selectedIndex].value+'&yy='+document.calform.RtnYear.options[document.calform.RtnYear.selectedIndex].value+'&mm='+(document.calform.RtnMonth.options[document.calform.RtnMonth.selectedIndex].value );
//	theURL = theURL+'dd='+document.calform.RtnDay.value+'&yy='+document.calform.RtnYear.value+'&mm='+(document.calform.RtnMonth.value -1);
//alert(theURL);
  window.open(theURL,winName,features);
}

//-->

function formValid()
{
	if(document.calform.Location.value=="")
	{
		alert("Please Enter Location");
		document.calform.Location.focus();
		document.calform.Location.select();
		return false;
	}
	//Validtion Done by Umesh
		var invaliddate="Error in Pick-up date.";
		var invaliddate1="Error in Collection date.";
		var msgdate="Return date should be later than Pickup date.";
		var stdtmsg="Pickup date needs to be at least 4 days in advance. (From the current date)";
		var stdtmsg1="You cannot book more than a year in advance.";
		var endtmsg="Maximum booking period is 60 days.";
		frm=document.calform;

	TDate = new Date();
	TTime = TDate.getTime(); 

	
	var sday=frm.ColDay
	var smon=frm.ColMonth
	var syear=frm.ColYear

	var rday=frm.RtnDay
	var rmon=frm.RtnMonth
	var ryear=frm.RtnYear
	
	var fullPicDate=Date.UTC(syear.options[syear.selectedIndex].value, smon.options[smon.selectedIndex].value, sday.options[sday.selectedIndex].value);

	var fullRtnDate=Date.UTC(ryear.options[ryear.selectedIndex].value, rmon.options[rmon.selectedIndex].value, rday.options[rday.selectedIndex].value);

	var diffPicRtn=Math.round((fullRtnDate-fullPicDate)/(60000*60*24));
	var diffPicCur=Math.round((fullPicDate-TTime)/(60000*60*24));

	///~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~Start date validation~~~~~~~~~~~~~~~~~~~~~~~~~
	if(smon.options[smon.selectedIndex].value==0 || smon.options[smon.selectedIndex].value==2 || smon.options[smon.selectedIndex].value==4 || smon.options[smon.selectedIndex].value==6 || smon.options[smon.selectedIndex].value==7 || smon.options[smon.selectedIndex].value==9 || smon.options[smon.selectedIndex].value==11) 
	{
		if(sday.options[sday.selectedIndex].value>31)
		{
			alert(invaliddate);
			return false
		}
	}
	else if(smon.options[smon.selectedIndex].value==1)
	{
		if (((syear.options[syear.selectedIndex].value % 4)==0) && ((syear.options[syear.selectedIndex].value % 100)!=0) || ((syear.options[syear.selectedIndex].value % 400)==0))
		{
			if(sday.options[sday.selectedIndex].value>29)
			{
				alert(invaliddate);
				return false
			}
		}
		else if(sday.options[sday.selectedIndex].value>28)
		{
			alert(invaliddate);
			return false
		}
	}
	else if(sday.options[sday.selectedIndex].value>30)
	{
		alert(invaliddate);
		return false
	}

	//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~End Date validation~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	 if(rmon.options[rmon.selectedIndex].value==0 || rmon.options[rmon.selectedIndex].value==2 || rmon.options[rmon.selectedIndex].value==4 || rmon.options[rmon.selectedIndex].value==6 || rmon.options[rmon.selectedIndex].value==7 || rmon.options[rmon.selectedIndex].value==9 || rmon.options[rmon.selectedIndex].value==11) 
	 {
		if(rday.options[rday.selectedIndex].value>31)
		{
			alert(invaliddate1);
			return false
		}
	}
	else if(rmon.options[rmon.selectedIndex].value==1)
	{
		if (((ryear.options[ryear.selectedIndex].value % 4)==0) && ((ryear.options[ryear.selectedIndex].value % 100)!=0) || ((ryear.options[ryear.selectedIndex].value % 400)==0))
		{
			if(rday.options[rday.selectedIndex].value>29)
			{
				alert(invaliddate1);
				return false
			}
		}
		else if(rday.options[rday.selectedIndex].value>28)
		{
			alert(invaliddate1);
			return false
		}
	}
	else if(rday.options[rday.selectedIndex].value>30)
	{
		alert(invaliddate1);
		return false
	}
	

	// check start date validity~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
	
	if(diffPicCur<3)
	{
		alert(stdtmsg);
		return false
	}
	if(diffPicCur>364)
	{
		alert(stdtmsg1);
		return false
	}
	if(diffPicRtn>60)
	{
		alert(endtmsg);
		return false
	}
	
	if(fullRtnDate<fullPicDate)
	{
		alert(msgdate);
		return false
	}


//Validation End
if(document.calform.MonNL.checked)
{
	var nstr="abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 1234567890@_.";
	var i=0;
	if(document.calform.Email.value=="")
	{
		alert("Please specify your Email Address");
		document.calform.Email.focus();
		document.calform.Email.select();
		return false;
	}
	else
	{
	if ((document.calform.Email.value.indexOf("@") > 0) && (document.calform.Email.value.indexOf(".") > 0) && (document.calform.Email.value.toUpperCase().indexOf("dreamZmatch.com") < 0) && (document.calform.Email.value.indexOf("@") == document.calform.Email.value.lastIndexOf("@")))
			{
				return true;
			}
			else
			{
			alert("Your Email address must be of the form name@provider.com");
			calform.Email.focus() ;
			return false;
			}	
	}
	return true;
}
	return true;

}
function MM_openBrPopUp(theURL,winName,features) { //v2.0
	Location = document.calform.Location.value;
	ColDay = document.calform.ColDay.options[document.calform.ColDay.selectedIndex].value;
	ColMonth = document.calform.ColMonth.options[document.calform.ColMonth.selectedIndex].value;
	ColYear = document.calform.ColYear.options[document.calform.ColYear.selectedIndex].value;
	ColTime = document.calform.ColTime.options[document.calform.ColTime.selectedIndex].value;
	ColMin = document.calform.ColMin.options[document.calform.ColMin.selectedIndex].value;
	RtnDay = document.calform.RtnDay.options[document.calform.RtnDay.selectedIndex].value;
	RtnMonth = document.calform.RtnMonth.options[document.calform.RtnMonth.selectedIndex].value;
	RtnYear = document.calform.RtnYear.options[document.calform.RtnYear.selectedIndex].value;
	RtnTime = document.calform.RtnTime.options[document.calform.RtnTime.selectedIndex].value;
	RtnMin = document.calform.RtnMin.options[document.calform.RtnMin.selectedIndex].value;
	Email = document.calform.Email.value;
	LangID = document.calform.LangID.options[document.calform.LangID.selectedIndex].value;
	Referrer = document.calform.Referrer.value;
	Cat = document.calform.Cat.value;
	Express = document.calform.Express.value;
	if(document.calform.MonNL.checked)
	{
	MonNL = 'Yes'
	}
	else
	{
	MonNL = 'No'
	}

	theURLpop = 'CarQuoteAction.asp?Location='+Location+'&ColDay='+ColDay+'&ColMonth='+ColMonth+'&ColYear='+ColYear+'&ColTime='+ColTime+'&ColMin='+ColMin+'&RtnDay='+RtnDay+'&RtnMonth='+RtnMonth+'&RtnYear='+RtnYear+'&RtnTime='+RtnTime+'&RtnMin='+RtnMin+'&Email='+Email+'&LangID='+LangID+'&Referrer='+Referrer+'&Cat='+Cat+'&Express='+Express+'&MonNL='+MonNL;
//  window.open(theURLpop,winName,features);
window.location = theURLpop;
}



<!-- function for index login-->

<!--
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
