var vpays=new Array();
var cmaps=new Array();
var theRental=new Array();
var sc='ZIMBABWE';

function chargeValues(idioma,source){

var continents=document.destform.elements[source].length;

for (i=0; i<continents; i++) {vpays[i]=new Array()}
	
switch (idioma){
	
case "en":

var CountryID=0;

for(Country in EuropCarContinents){
   
	for(Station=0;Station<EuropCarContinents[Country].length;Station++){

		vpays[CountryID][Station]=new Option(EuropCarContinents[Country][Station][1],EuropCarContinents[Country][Station][2]);
	}
	
	cmaps[Country]=CountryID;
	
	CountryID+=1;
}

break;

}

}

for(Country in EuropCarContinents){

	theRental[Country]=EuropCarContinents[Country][0][0];
	
}

function ChmdCountries(element,vContinent){

	theSelectDest=document.destform.elements[element];
	theSelectDest.options[0]=new Option("SELECT STATION","0");
	theSelectDest.innerHTML='';
	theSelectDest.options[0]=new Option("SELECT STATION","0");
	
	for(x=0;x<EuropCarContinents[vContinent].length;x++){
		theSelectDest.options[x+1]=new Option(EuropCarContinents[vContinent][x][1],EuropCarContinents[vContinent][x][2]);
	}
	
}


function ChangeCountries(element,source){
	
	theSelectCont=document.destform.elements[source];
	
	theSelectDest=document.destform.elements[element];
	
	vContinent=theSelectCont.value;
	
	theSelectDest.innerHTML='';
	
	theSelectDest.options[0]=new Option("SELECT STATION","0");
	
	for(x=0;x<EuropCarContinents[vContinent].length;x++){
		theSelectDest.options[x+1]=new Option(EuropCarContinents[vContinent][x][1],EuropCarContinents[vContinent][x][2]);
	}
	
	document.sendForm.CNTRY.value=EuropCarContinents[vContinent][0][0];
	document.destform.CNTRY.value=EuropCarContinents[vContinent][0][0];
}


// base

function rollOverOrg(ImgNme)
{
        obj=document.images[ImgNme];
        obj.src=(obj.src.lastIndexOf('_on')!=-1)? obj.src.replace(/_on/gi,"_off"):obj.src.replace(/_off/gi,"_on");
}

// layers

function rollOver(ImgNme)
{
        obj=(document.images)? document.images[ImgNme]:0; ClicNme=(document.clicImg)? document.clicImg.name:"";
        if (!obj && document.layers) {
                for (i=0; i<document.layers.length; i++) { ObjLyr=document.layers[i].document;
                        if (ObjLyr.images && ObjLyr.images[ImgNme]) obj=ObjLyr.images[ImgNme];}}
        if (ClicNme!=ImgNme) obj.src=(obj.src.lastIndexOf('_on')!=-1)? obj.src.replace(/_on/gi,"_off"):obj.src.replace(/_off/gi,"_on");
        document.OnImg=obj;
}

// clic

function Clic(ImgNme)
{
        obj=(document.images)? document.images[ImgNme]:0; ClicNme=(document.clicImg)? document.clicImg.name:"";
        if (!obj && document.layers) {
                for (i=0; i<document.layers.length; i++) { ObjLyr=document.layers[i].document;
                        if (ObjLyr.images && ObjLyr.images[ImgNme]) obj=ObjLyr.images[ImgNme];}}
        if (document.clicImg) document.clicImg.src=document.clicImg.src.replace(/_on/gi,"_off");
        obj.src=obj.src.replace(/_off/gi,"_on");
        document.clicImg=obj;
}

function onpenURL(URL)
{
        window.top.location = URL;
}
function writeSelect(idioma,element,name){

	document.write('<select name="'+name+'" class="txtselectmenudest"  onChange="ChangeCountries(\''+element+'\',\''+name+'\');">');
	document.write('<option value="0" selected=1>SELECT COUNTRY</option>');	
	for(Country in EuropCarContinents){		
		var sel=(Country==sc)?' selected ':'';
		document.write('<option value="'+ Country +'" "'+ sel +'">'+ Country +'</option>');	
	}
	document.write('</select>');
	

}
