
v=false;

if (typeof(Option)+"" != "undefined") v=true;

if(v){a=new Array(22);}

function getFormNum (formName) {
	var formNum =-1;
	for (i=0;i<document.forms.length;i++){
		tempForm = document.forms[i];
		if (formName == tempForm) {
			formNum = i;
			break;
		}
	}
	return formNum;
}

function jmp(form, elt)
// The first parameter is a reference to the form.
{
	if (form != null) {
		with (form.elements[elt]) {
			if (0 <= selectedIndex)
				location = options[selectedIndex].value;
		}
	}
}

var catsIndex = -1;
var itemsIndex;

if (v) { // ns 2 fix
function newCat(){
	catsIndex++;
	a[catsIndex] = new Array();
	itemsIndex = 0;
}

function O(txt,url) {
	a[catsIndex][itemsIndex]=new myOptions(txt,url);
	itemsIndex++;
}

function myOptions(text,value){
	this.text = text;
	this.value = value;
}

// fill array here

newCat();   //Marca
	O("Modelo","modelo");
newCat();   //Volkswagen
	O("Modelo","modelo");
	O("Gol Power","gol-power-base.php");
	O("Gol Trend","gol-trend70.php");
	O("Fox","fox.php");
	O("Suran","suran70.php");
	O("Voyage","voyage.php");
newCat();   //Ford
	O("Modelo","modelo");
	O("Fiesta","fiesta-ambiente.php");
	O("Focus","focus-style.php");
	O("Ka Fly","ka70.php");
	O("Eco Sport","eco-sport.php");
	O("Ranger","ranger.php");
newCat();   //Fiat
	O("Modelo","modelo");
	O("Uno","uno70.php");
	O("Palio","palio70.php");
	O("Palio Loker","palio-locker.php");
	O("Palio weekend","palio-weekend.php");
	O("Siena","siena70.php");
	O("Punto","punto.php");
	O("Idea","idea.php");
	O("Fiorino","fiorino70.php");
	O("Ducato","ducato.php");
	O("Linea","linea.php");
newCat();   //Renault
	O("Modelo","modelo");
	O("Clio","clio-base.php");
	O("Symbol","symbol.php");
	O("Kangoo","kangoo.php");
	O("Master Furgon","master-furgon.php");	
newCat();   //Peugeot
	O("Modelo","modelo");
	O("206","pda/peugeot/206.php");
	O("207","pda/peugeot/207.php");
	O("307","pda/peugeot/307.php");
	O("Partner","pda/peugeot/partner.php");
// end fill array
} // if (v)



function relate(formName,elementNum,j) {
    if(v){
        var formNum = getFormNum(formName);
         if (formNum>=0) {
        	formNum++; // reference next form, assume it follows in HTML
        	with (document.forms[formNum].elements[elementNum]) {
        		for(i=options.length-1;i>0;i--) options[i] = null; // null out in reverse order (bug workarnd)
        		for(i=0;i<a[j].length;i++){
        			options[i] = new Option(a[j][i].text,a[j][i].value);
        		}
        		options[0].selected = true;
        	}
        }
    }
    else {
        jmp(formName,elementNum);
    }
}


function IEsetup(){
	if(!document.all) return;
	IE5 = navigator.appVersion.indexOf("5.")!=-1;
	if(!IE5) {
		for (i=0;i<document.forms.length;i++) {
			document.forms[i].reset();
		}
	}
}

window.onload = IEsetup;