v=false;
if (typeof(Option)+"" != "undefined") {v=true;}
if (!v) {location=redirecturl;}
a=new Array();
var catsIndex = -1;
var itemsIndex;
function newCat(){    
	catsIndex++;    
	a[catsIndex] = new Array();
    	itemsIndex = 0;
}
function O(txt, url) {    
    a[catsIndex][itemsIndex]=new myOptions(txt, url);  
    itemsIndex++;
}
function myOptions(txt, url) {
    this.text = txt;
    this.value = url;
}
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 relate(formName,elementNum,j) {
    var formNum = getFormNum(formName);
    if (formNum>=0) {
	var myselect=document.forms[formNum].elements[elementNum];
	myselect.options.length = 0; 
        // delete the current options list
	for (i=0;i<a[j].length;i++){
	    myselect.options[i]=new Option(a[j][i].text,a[j][i].value);
	}
	myselect.options[0].selected = true;
    }
}
function GetLandingURL() {
    var sel1=document.f1.m1.selectedIndex;
    var sel2=document.f1.m2.selectedIndex;
    var val1=document.f1.m1.options[sel1].text;
    var val2=document.f1.m2.options[sel2].text;
    if ( (val1.indexOf("elect a") != -1 )||(val2.indexOf("elect a") != -1) ) {
        alert(errormessage);
    } else { location=a[sel1][sel2].value; }
}
function FormReset() {    
    if(!document.all) return;
    for (i=0;i<document.forms.length;i++) {
        document.forms[i].reset();
    }
}
window.onload = FormReset;