function go_menu(menu) {

	var choice = menu.selectedIndex;
	var new_url = menu.options[choice].value;
		if (new_url != "") {
			//If the URL begins with "http://" we assume the link is external
			if (new_url.indexOf("all-laser") < 1 && new_url.indexOf("http") == 0) {
				window.open(new_url, "_blank");
			} else {
				window.location.href = new_url;
			}
	}
}
////////////////////////////////////////
var ProductFamily = new Array
("Epson Stylus Color 780/785/825/870/875/890/900/1270/1280","Epson 820/925","Epson R800/R1800","Epson Photo R2400", "Epson Stylus Photo 2000P","Epson Stylus Photo 2200","Epson Stylus Photo R200/R220/R300/R320","Epson 3000","Epson Stylus Pro 4000","Epson Stylus Pro 4800","Epson 10000","Epson Stylus Pro 10600","Epson 7000/9000/9500","Epson 4000 / 7600 / 9600","Epson Stylus Pro 7800/9800");

/*
ProductFamily[30] = "All Cartridges";
ProductFamily[0] = "Epson 780/785/825/870/875/890/900/1270/1280";
ProductFamily[3] = "Epson 820/925";
ProductFamily[3] = "Epson R800/R1800";
ProductFamily[3] = "Epson R2400";
ProductFamily[3] = "Epson Photo 2000P";
ProductFamily[3] = "Epson Photo 2200";
ProductFamily[3] = "Epson Photo R200/R220/R300/R320";
ProductFamily[3] = "Epson 3000";
ProductFamily[3] = "Epson Pro 4000";
ProductFamily[3] = "Epson Pro 4800";
ProductFamily[3] = "Epson 10000";
ProductFamily[3] = "Epson Stylus Pro 10600";
ProductFamily[3] = "Epson 7000 / 9000 / 9500";
ProductFamily[3] = "Epson 4000 / 7600 / 9600";
ProductFamily[3] = "Epson Stylus Pro 7800 / 9800";
*/

function relate(formName,elementNum,j) {
if(v){
k=1;
// Epson 780/785/825/870/875/890/900/1270/1280
if(j==0){
a=new Array(6);
O("Epson Stylus Color 780/785/825/870/875/890/900/1270/1280 Cleaning","/shop/?match_criteria=all&rec=&keywords=_900CLN&search=Search&searchCat=");
O("Epson Stylus Color 780/785/825/870/875/890/900/1270/1280 Lysonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_900Lysonic");
O("Epson Stylus Color 780/785/825/870/875/890/900/1270/1280 Quad Black Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1008&p_keyword=_800QB");
O("Epson Stylus Color 780/785/825/870/875/890/900/1270/1280 Fotonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_900Fotonic");
O("Epson Stylus Color 1270/1280 Bulk Lysonic Ink","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkink");
}

// Epson 820/925
if(j==1){
a=new Array(5);
O("Epson Photo 820/925 Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_820CLN");
O("Epson Photo 820/925 Quad Black Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1008&p_keyword=_820Quad");
}

// Epson R800/R1800
if(j==2){
a=new Array(5);
O("Epson R800/R1800 Cave Paint R8 Ink Bulk Feed System","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_800CPBF");
O("Epson R800/R1800 Cave Paint R8 Bulk Ink Supplies","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkCaveR800");
}

// Epson R2400
if(j==3){
a=new Array(5);
O("Epson R2400 Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_R2400CLN");
O("Epson R2400 Bulk Feed Ink Systems","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_R2400");
O("Epson R2400 Cave Paint Bulk Ink Supplies","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkCaveR2400");

}

// Epson 2000P
if(j==4){
a=new Array(5);
O("Epson Stylus Photo 2000P Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_2000PCLN");
O("Epson Stylus Photo 2000P Lysonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_2000Lysonic");
O("Epson Stylus Photo 2000P Quad Black Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1008&p_keyword=_2000PQB");
O("Epson Stylus Photo 2000P Fotonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_2000PF");
O("Epson Stylus Photo 2000P Daylight Darkroom Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1025&p_keyword=_2000PDD");
O("Epson Stylus Photo 2000P Bulk Feed Ink Systems","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_2000PBF");
O("Epson Stylus Photo 2000P Bulk Feed Inks","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkcave2000");
}

// Epson Stylus Photo 2200
if(j==5){
a=new Array(5);
O("Epson Stylus Photo 2200 Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_2200CLN");
O("Epson Stylus Photo 2200 Fotonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_2200F");
O("Epson Stylus Photo 2200 Daylight Darkroom Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1025&p_keyword=_2200DayD");
O("Epson Stylus Photo 2200 Digital Darkroom Systems","/cgi-bin/webc.cgi/st_main.html?p_catid=1025&p_keyword=_2200DD");
O("Bulk Feed Systems","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_2200BF");
O("Epson Stylus Photo 2200 Bulk Feed Inks","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkcave2200");
}

// Epson Stylus Photo R200/R220/R300/R320
if(j==6){
a=new Array(1);
O("Epson Stylus Photo R200/R220/R300/R320 Bulk Ink Feed Systems","/cgi-bin/webc.cgi/Menu_Lyson_Bulk.html");
}
// Epson 3000
if(j==7){
a=new Array(6);
O("Epson 3000/5000 Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_3000CLN");
O("Epson 5000/5500 Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_5000CLN");
O("Epson 3000 Lysonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_3000Lysonic");
O("Epson 5000/5500 Lysonic Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_5000Lysonic");
O("Epson 3000 Fotonic","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_3000Fotonic");
O("Epson 5000/5500 Fotonic","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_5000Fotonic");
O("Epson 3000 Quad Black","/cgi-bin/webc.cgi/st_main.html?p_catid=1008&p_keyword=_3000quad");
O("Epson 3000 Bulk Inks","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_3000small");
}
// Epson Pro 4000
if(j==8){
a=new Array(6);
O("Epson Stylus Pro 4000 Cleaning Cartridges, Set of 8","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_4000CLN");
O("Epson Stylus Pro 4000 Lysonic Ink Cartridge, with chip","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_4000Lysonic");
O("Epson Stylus Pro 4000 Quad Black Cartridges, with chip","/cgi-bin/webc.cgi/st_main.html?p_catid=1008&p_keyword=_4000Quad");
O("Epson Stylus Pro 4000 Daylight Darkroom Cartridges, with chip","/cgi-bin/webc.cgi/st_main.html?p_catid=1025&p_keyword=_9600DDC");
O("Epson Stylus Pro 4000 Cave Paint Photochrome pigment ink, 1 liter bottles","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkcave");
}

// Epson Pro 4800
if(j==9){
a=new Array(6);
O("Epson Stylus Pro 4800 Cleaning Cartridges, Set of 8","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_4800CLN");
O("Epson Stylus Pro 4800 Lyson Cave Paint Pigment Ink Cartridge, with chip","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_E48CP");
O("Epson Stylus Pro 4800 Lysonic Ink Cartridge, with chip","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_4800Lysonic");
O("Epson Stylus Pro 4800 Fotonic Dye Ink Cartridges, with chip","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_E48Fotonic");
O("Epson Stylus Pro 4800/7800/9800 Cave Paint R24 pigment ink, bulk","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_BulkCave4800");
}


// Epson 10000
if(j==10){
a=new Array(7);
O("Epson 10000 Lyson Cleaning Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_10000CLN");
O("Epson 10000CF Lyson Cave Paint Maximum Pigment Inks","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_10000CavePaint");
O("Epson 10000 Lyson Fotonic V2 Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_10000Fotonic");
}

// Epson Stylus Pro 10600
if(j==11){
a=new Array(7);
O("Epson Stylus Pro 10600 Lyson Cleaning Cartridge, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_7000CLN");
O("Epson Stylus Pro 10600 Lysonic Ink Cartridges, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_7000Lysonic");
O("Epson Stylus Pro 10600 Lyson Cave Paint Cartridge, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_7500CP");
O("Epson Stylus Pro 10600 Lyson Fotonic Ink Cartridges V2, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_7000FOTONIC");
}
// Epson 7000/9000/9500
if(j==12){
a=new Array(7);
O("Epson 7000/9000/9500 Lyson Cleaning Cartridge, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_7000CLN");
O("Epson 7000/9000/9500 Lysonic Ink Cartridges, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_7000Lysonic");
O("Epson 7000/9000/9500 Quad Black Ink Cartridges, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1008&p_keyword=_7000QB");
O("Epson 7500/9500 Lyson Cave Paint Cartridge, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_7500CP");
O("Epson 7000/9000/9500 Lyson Fotonic Ink Cartridges V2, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_7000FOTONIC");
O("Epson Stylus Pro 7500/9500/10000 Cave Paint Maximum Pigment ink, bulk","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkCave7500");
}

// Epson 4000/7600/9600
if(j==13){
a=new Array(7);
O("Epson 4000 Lyson Cleaning Flush Cartridge Set of 8, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_4000CLN");
O("Epson 7600/9600 Lyson Cleaning Cartridge Set of 7, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_9600CLN");
O("Epson 4000/7600/9600 Lyson Cave Paint Inks, 220 mL","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_9600CP");
O("Epson 4000/7600/9600 Lyson Fotonic V2 Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_9600Fotonic");
O("Epson 4000/7600/9600 Daylight Darkroom Starter Kits","/cgi-bin/webc.cgi/st_main.html?p_catid=1025&p_keyword=_9600DD");
O("Epson 4000/7600/9600 Daylight Darkroom Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1025&p_keyword=_9600DDC");
O("Epson 4000/7600/9600 Cave Paint Photochrome pigment ink, 1 liter bottles","/cgi-bin/webc.cgi/st_main.html?p_catid=1024&p_keyword=_bulkcave");
}
// Epson 7800/9800
if(j==14){
a=new Array(7);
O("Epson Stylus Pro 7800/9800 Lyson Cleaning Cartridge Set of 7, 220 ml","/cgi-bin/webc.cgi/st_main.html?p_catid=1014&p_keyword=_9800CLN");
O("Epson Stylus Pro 7800/9800 Lyson Cave Paint Inks, 220 mL","/cgi-bin/webc.cgi/st_main.html?p_catid=1012&p_keyword=_E98CP");
O("Epson Stylus Pro 7800/9800 Lyson Lysonic Ink Cartridges, 220 mL","/cgi-bin/webc.cgi/st_main.html?p_catid=1004&p_keyword=_E98Lysonic");
O("Epson Stylus Pro 7800/9800 Lyson Fotonic V2 Ink Cartridges","/cgi-bin/webc.cgi/st_main.html?p_catid=1006&p_keyword=_E98Fotonic");
}

aln2=a.length;
var formNum = getFormNum(formName); // var formNum added, explicit var pass
if (formNum>=0) {
	formNum++; // reference next form, assume it follows in HTML
	with (document.forms[formNum].elements[elementNum]) {
		for (var i=options.length-1;i>0;i--) options[i]=null;
		for (var i=1;i<aln2;i++) options[i-1]=a[i];
		//options[0].selected=true;
	}
}
} else {
jmp(formName,elementNum);
}
}

    
    function outputFamily(){
        for(i=0; i < ProductFamily.length; i++){
	        document.write("<option>" + ProductFamily[i]);
	        //alert(i);
        }
    }

    if(v){ a=new Array(14); aln=14; }

    function getFormNum (formName) {
	    var formNum =-1;
    	for (i=0;i<document.forms.length;i++){
    		tempForm = document.forms[i];
    		if (formName == tempForm) {
    			formNum = i;
    			correctForm = tempForm;
    			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;
    		}
    	}
    }

	//function gotoPage(selectBox)
	//{
	//	var sBoxIndex = selectBox.selectedIndex;
	//	var pageURL = selectBox[sBoxIndex].value;
	//	if(pageURL == "") {return;} // Short circuit on null entries
	//	document.location = pageURL;
	//}

	// the following code define Syndicator URL rewrite URL as a stub function which returns the URL as is in standalone mode
	
	if ((typeof wsmlMakeWebServiceHref) == "undefined")
	{
	  wsmlMakeWebServiceHref =
	  wsmlMakeResourceUrl =
	  wsmlMakeLeakHref =
	  wsmlMakeCssHref = new Function ("u", "return u;");
	}
	
	 
	
	// Syndicated JavaScript hyperlinks should be rewritten calling wsmlMakeWebServiceHref
	function gotoPage(selectBox)
	{
	  var sBoxIndex = selectBox.selectedIndex;
	  var pageURL = selectBox[sBoxIndex].value;
	  if(pageURL == "") {return;} // Short circuit on null entries
	  document.location = wsmlMakeWebServiceHref(pageURL);
	}
	
    function O(txt,url) {
        a[k]=new Option(txt,url);k++;
    }

    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;

