

//**************** Initialize ****************\\
function phinitialize(){
	ttpLayer = new Array();
	ttpLayer[0] = new Array("English","Arabic");
	ttpLayer[1] = new Array(59,34);
	ttpLayer[2] = new Array(16,16);
	ttpLayer[3] = new Array("ttpever","ttpaver");
	Aboutus = new Array();
		Aboutus[0] =new Array("Aboutus","mskAboutus");
		Aboutus[1] =new Array(190,204,400);
		Aboutus[2] =new Array("hpatuintroductionw","hpatupolicyw","hpatumanagersw","hpatucertificatesw","hpaturepresentativew");
		Aboutus[3] =new Array("introduction.html","policy.html","managers.html","certificates.html","representatives.html");
		Aboutus[4] =new Array(35,74,62,75,75);		
	Products = new Array();
		Products[0] =new Array("Products","mskProducts");
		Products[1] =new Array(235,192,460);
		Products[2] =new Array("hppdttomatow","hppdtsyrupw","hppdtcanw","hppdtjamw","hppdtpicklew","hppdtpotablew","hppdtpackaginglistw");
		Products[3] =new Array("productco.asp?sanat=10","productco.asp?sanat=20","productco.asp?sanat=40","productco.asp?sanat=30","productco.asp?sanat=50","productco.asp?sanat=70","products-list.asp");
		Products[4] =new Array(106,33,29,19,59,43,59);		
	Forms = new Array();
		Forms[0] =new Array("Forms","mskForms");
		Forms[1] =new Array(278,152,240);
		Forms[2] =new Array("hpfrmregistrationw","hpfrmsuggestionw","hpfrmcomplementsw");
		Forms[3] =new Array("registration.asp","suggestions.html","complement.html");
		Forms[4] =new Array(56,63,52);
	Menus = new Array(Aboutus,Products,Forms);
	LateMoveto=setTimeout("null",1);
	minLeft=0;NameMenu = NameLayer = null;
	ExtraArray = new Array();
		ExtraArray[0] = new Array("0","0","0");
		ExtraArray[1] = new Array("0","0","0");
}
function ehinitialize(){
	Aboutus = new Array();
		Aboutus[0] =new Array("Aboutus","mskAboutus");
		Aboutus[1] =new Array(190,214,390);
		Aboutus[2] =new Array("heatuintroductionw","heatupolicyw","heatumanagersw","heatucertificatesw","heaturepresentativew");
		Aboutus[3] =new Array("introduction.html","policy.html","managers.html","certificates.html","representatives.html");
		Aboutus[4] =new Array(67,36,57,65,86);		
	Products = new Array();
		Products[0] =new Array("Products","mskProducts");
		Products[1] =new Array(235,194,510);
		Products[2] =new Array("hepdttomatow","hepdtsyrupw","hepdtcanw","hepdtjamw","hepdtpicklew","hepdtpotablew","hepdtpackaginglistw");
		Products[3] =new Array("productco.asp?sanat=10","productco.asp?sanat=20","productco.asp?sanat=40","productco.asp?sanat=30","productco.asp?sanat=50","productco.asp?sanat=70","products-list.asp");
		Products[4] =new Array(42,82,84,28,36,62,69);		
	Forms = new Array();
		Forms[0] =new Array("Forms","mskForms");
		Forms[1] =new Array(278,156,270);
		Forms[2] =new Array("hefrmregistrationw","hefrmsuggestionw","hefrmcomplementsw");
		Forms[3] =new Array("registration.asp","suggestions.html","complement.html");
		Forms[4] =new Array(68,64,73);
	Menus = new Array(Aboutus,Products,Forms);
	LateMoveto=setTimeout("null",1);
	minLeft=0;NameMenu = NameLayer = null;
	ExtraArray = new Array();
		ExtraArray[0] = new Array("0","0","0");
		ExtraArray[1] = new Array("0","0","0");
}
function ahinitialize(){
	Aboutus = new Array();
		Aboutus[0] =new Array("Aboutus","mskAboutus");
		Aboutus[1] =new Array(190,194,390);
		Aboutus[2] =new Array("haatuintroductionw","haatupolicyw","haatumanagersw","haatucertificatesw","haaturepresentativew");
		Aboutus[3] =new Array("introduction.html","policy.html","managers.html","certificates.html","representatives.html");
		Aboutus[4] =new Array(37,53,78,100,44);		
	Products = new Array();
		Products[0] =new Array("Products","mskProducts");
		Products[1] =new Array(235,190,560);
		Products[2] =new Array("hapdttomatow","hapdtsyrupw","hapdtcanw","hapdtjamw","hapdtpicklew","hapdtpotablew","hapdtpackaginglistw");
		Products[3] =new Array("productco.asp?sanat=10","productco.asp?sanat=20","productco.asp?sanat=40","productco.asp?sanat=30","productco.asp?sanat=50","productco.asp?sanat=70","products-list.asp");
		Products[4] =new Array(116,41,42,40,95,49,72);
	Forms = new Array();
		Forms[0] =new Array("Forms","mskForms");
		Forms[1] =new Array(276,176,330);
		Forms[2] =new Array("hafrmregistrationw","hafrmsuggestionw","hafrmcomplementsw");
		Forms[3] =new Array("registration.asp","suggestions.html","complement.html");
		Forms[4] =new Array(76,67,117);
	Menus = new Array(Aboutus,Products,Forms);
	LateMoveto=setTimeout("null",1);
	minLeft=0;NameMenu = NameLayer = null;
	ExtraArray = new Array();
		ExtraArray[0] = new Array("0","0","0");
		ExtraArray[1] = new Array("0","0","0");
}
function pinitialize(){
	idLayer = new Array();
	idLayer[0] = new Array("Aboutus","Products","Forms");
	idLayer[1] = new Array(46,46,46);
	idLayer[2] = new Array(467,389,360);
	idLayer[3] = new Array(103,118,78);
	ttpLayer = new Array();
	ttpLayer[0] = new Array("Faq","Shrine","English","Arabi","Home","Email");
	ttpLayer[1] = new Array(69,109,59,34,59,80);
	ttpLayer[2] = new Array(16,18,16,16,16,18);
	ttpLayer[3] = new Array("ttpfaq","ttpgeography","ttpever","ttpaver","ttphome","ttpemail");
	atuArray = new Array();
	atuArray[0] = new Array("patuintroduction","patupolicy","patumanagers","patucertificates","paturepresentative");
	atuArray[1] = new Array("introduction.html","policy.html","managers.html","certificates.html","representatives.html");
	atuArray[2] = new Array(33,74,60,80,73);
	pdtArray = new Array();
	pdtArray[0] = new Array("ppdttomato","ppdtsyrup","ppdtjam","ppdtcan","ppdtpickle","ppdtpotable","ppdtpackeging");
	pdtArray[1] = new Array("productco.asp?sanat=10","productco.asp?sanat=20","productco.asp?sanat=30","productco.asp?sanat=40","productco.asp?sanat=50","productco.asp?sanat=70","products-list.asp");
	pdtArray[2] = new Array(103,35,21,29,59,44,62);
	frmArray = new Array();
	frmArray[0] = new Array("pfrmorder","pfrmsuggestions","pfrmcomplement");
	frmArray[1] = new Array("registration.asp","suggestions.html","complement.html");
	frmArray[2] = new Array(53,63,56);
	mrkArray = new Array();
	tdAlign = "right";
}
function einitialize(){
	idLayer = new Array();
	idLayer[0] = new Array("Aboutus","Products","Forms");
	idLayer[1] = new Array(46,46,46);
	idLayer[2] = new Array(238,313,389);
	idLayer[3] = new Array(103,100,100);
	atuArray = new Array();
	atuArray[0] = new Array("Introduction","Policy","Managers","Certificates","Representative");
	atuArray[1] = new Array("introduction.html","policy.html","managers.html","certificates.html","representatives.html");
	pdtArray = new Array();
	pdtArray[0] = new Array("Tomato","Fruits in Syrup","Jam","Canned Foods","Salty & Sours","Beverages","Product List");
	pdtArray[1] = new Array("productco.asp?sanat=10","productco.asp?sanat=20","productco.asp?sanat=30","productco.asp?sanat=40","productco.asp?sanat=50","productco.asp?sanat=70","products-list.asp");
	frmArray = new Array();
	frmArray[0] = new Array("registration","Suggestions","Complement");
	frmArray[1] = new Array("registration.asp","suggestions.html","complement.html");
	mrkArray = new Array();
	tdAlign = "left";
}
function ainitialize(){
	idLayer = new Array();
	idLayer[0] = new Array("Aboutus","Products","Forms");
	idLayer[1] = new Array(46,46,46);
	idLayer[2] = new Array(442,389,294);
	idLayer[3] = new Array(114,114,140);
	ttpLayer = new Array();
	ttpLayer[0] = new Array("Faq","Shrine","English","Farsy","Home","Email");
	ttpLayer[1] = new Array(69,109,59,43,59,80);
	ttpLayer[2] = new Array(16,18,16,16,16,18);
	ttpLayer[3] = new Array("ttpfaq","ttpgeography","ttpever","ttppver","ttphome","ttpemail");
	atuArray = new Array();
	atuArray[0] = new Array("aatuintroduction","aatupolicy","aatumanagers","aatucertificates","aaturepresentative");
	atuArray[1] = new Array("introduction.html","policy.html","managers.html","certificates.html","representatives.html");
	atuArray[2] = new Array(40,56,80,101,50);
	pdtArray = new Array();
	pdtArray[0] = new Array("apdttomato","apdtsyrup","apdtjam","apdtcan","apdtpickle","apdtpotable","apdtpackeging");
	pdtArray[1] = new Array("productco.asp?sanat=10","productco.asp?sanat=20","productco.asp?sanat=30","productco.asp?sanat=40","productco.asp?sanat=50","productco.asp?sanat=70","products-list.asp");
	pdtArray[2] = new Array(106,41,41,45,90,51,70);
	frmArray = new Array();
	frmArray[0] = new Array("afrmorder","afrmsuggestions","afrmcomplement");
	frmArray[1] = new Array("registration.asp","suggestions.html","complement.html");
	frmArray[2] = new Array(69,81,120);
	mrkArray = new Array();
	tdAlign = "right";
}
switch(classPage){
	case "pHome" :
		phinitialize();
		break;
	case "eHome" :
		ehinitialize();
		break;
	case "aHome" :
		ahinitialize();
		break;
	default :
		if(classPage=="Persian") {pinitialize();}
		else if(classPage=="English"){einitialize();}
		else if(classPage=="Arabic"){ainitialize();}		
		var sbsArray = new Array(atuArray,pdtArray,frmArray);
}
var moving=setTimeout("null",1);
var trColor = new Array("#589441","#26690C");


//**************** End Initialize ****************\\


//**************** Move ****************\\


function slideMenu(prpLayer , num){
	if (IE) {prpLayer.pixelLeft += num;}
	else if (NS6||OP) {prpLayer.left = parseInt(prpLayer.left) + num + "px";}
}

function MovetoOtherlayers(){
	for(var k=0 ; k<ExtraArray[0].length ; k++){
		if ( (NS6 && (parseInt(ExtraArray[0][k].left) > (-ExtraArray[1][k]))) || (IE && (ExtraArray[0][k].pixelLeft > (-ExtraArray[1][k]))) || (OP && (parseInt(ExtraArray[0][k].left) > (-ExtraArray[1][k])))  && ExtraArray[0][k] != 0 ){
			slideMenu(ExtraArray[0][k] , -10);
			clearTimeout(moving);
			moving=setTimeout("MoveOut()",10);
		}
	}
}

function OtherLayers(){
	for(var i=0 ; i<ExtraArray.length ; i++) {
		for(var j=0 ; j<ExtraArray[i].length ; j++) {ExtraArray[i][j] = "0";}
	}
	for(var k=0 ; k<Menus.length ; k++){
		if(Menus[k][0][0] != NameMenu){
			ExtraArray[1][k] = Menus[k][1][2];
			ExtraArray[0][k] = (stdBrowser) ? document.getElementById(Menus[k][0][0]).style : document.all[Menus[k][0][0]].style;
		}
	}
}

function MoveOut(){
	if(NameMenu==null) {MovetoOtherlayers();}
	else{
		if ( (NS6 && (parseInt(prosldMenu.left) < 0)) || (IE && (prosldMenu.pixelLeft < 0)) || (OP && (parseInt(prosldMenu.left) < 0)) ){
				slideMenu(prosldMenu,10);
				clearTimeout(moving);
				moving=setTimeout("MoveOut()",10);
		}
		MovetoOtherlayers();
	}
}

function Ejaculation(nmMenu){
	NameMenu=nmMenu;
	if(NameMenu == null){OtherLayers();}
	else{
		beSubset=true;
		OtherLayers(nmMenu);
		prosldMenu = (stdBrowser) ? document.getElementById(nmMenu).style : document.all[nmMenu].style;
	}
	MoveOut(nmMenu);
}

function MoveTo(){
	if ( (NS6 && (parseInt(prosldMenu.left)>(-minLeft))) || (IE && (prosldMenu.pixelLeft>(-minLeft))) || (OP && (parseInt(prosldMenu.left)>(-minLeft))) ) {
		slideMenu(prosldMenu , -10);
		clearTimeout(moving);
		moving=setTimeout("MoveTo()",10);
	}
}

function Recursion(namsldLayer){
	prosldMenu = (stdBrowser) ? document.getElementById(namsldLayer).style : document.all[namsldLayer].style;
	for(var i=0 ; i< Menus.length ; i++){
		if(namsldLayer == Menus[i][0][0]) {minLeft = Menus[i][1][2];}
	}
	MoveTo();
}

function ClearLatemove(){
	clearTimeout(LateMoveto);
	LateMoveto = setTimeout("null",1);
}

function LateMove(namLayer){
	NameLayer=namLayer;
	clearTimeout(LateMoveto);
	LateMoveto = setTimeout('Recursion(NameLayer);',1600);
}

//**************** Move ****************\\



//**************** Build ****************\\

function BuildHommenu(){
	for(var i=0 ; i<Menus.length ; i++){
		document.writeln("<div id=\""+Menus[i][0][1]+"\" style=\"position:absolute;top:"+Menus[i][1][0]+"px;left:"+Menus[i][1][1]+"px;width:"+Menus[i][1][2]+";height:18;clip:rect(0px "+Menus[i][1][2]+"px 18px 0px);overflow:hidden;z-index:4\">");
		document.writeln("<div id=\""+Menus[i][0][0]+"\" style=\"position:absolute;top:0px;left:"+(-Menus[i][1][2])+"px;width:"+Menus[i][1][2]+";height:18;z-index:6\" onmouseover=\"ClearLatemove()\" onmouseout=\"LateMove(Menus["+i+"][0][0])\">");
		document.writeln("<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\""+Menus[i][1][2]+"\" height=\"18\">");
		document.writeln("<tr height=\"18\">");
		document.write("<td width=\""+(Menus[i][1][2]-18)+"\" height=\"18\" style=\"text-align:left;vertical-align:middle;background:url(\'../images/hbgmenu.gif\') repeat-x left top;\">");
		for(var j=0 ; j<Menus[i][2].length ; j++){
			document.write("<a onmouseover=\"ClearLatemove();Mouseover(Menus["+i+"][2]["+j+"],\'false\')\" onmouseout=\"Mouseout(Menus["+i+"][2]["+j+"],\'false\');\" target=\"_self\" href=\""+Menus[i][3][j]+"\"><img name=\""+Menus[i][2][j]+"\" border=\"0\" src=\"../images/"+Menus[i][2][j]+".gif\" width=\""+Menus[i][4][j]+"\" height=\"14\" style=\"margin:0px 0px 0px 10px;\" \/><\/a>");
		}			
		document.writeln("<\/td>");
		document.write("<td width=\"18\" height=\"18\" style=\"text-align:center;vertical-align:middle;\">");
		document.writeln("<a href=\"#/Parseh.html\" onclick=\"Recursion(Menus["+i+"][0][0]);return false;\"><img border=\"0\" src=\"../images/hearrowmenu.gif\" width=\"18\" height=\"18\" \/><\/a><\/td>");
		document.writeln("<\/tr><\/table><\/div><\/div>");
	}
}



function BuildMenu(){
	var HightBox=0;
	for(var i=0 ; i<idLayer[0].length ; i++){
		HightBox =6+(16*(sbsArray[i][0].length))+sbsArray[i][0].length;
		document.write("<div id=\""+idLayer[0][i]+"\" style=\"position:absolute;visibility:hidden;top:"+idLayer[1][i]+"px;left:"+idLayer[2][i]+"px;width:"+idLayer[3][i]+";height:"+HightBox+";z-index:10\" onmouseover=\"VisibilityLayer(idLayer[0]["+i+"],'show')\" onmouseout=\"VisibilityLayer(idLayer[0]["+i+"],'hide')\">");
		document.write("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\""+idLayer[3][i]+"\" height=\""+HightBox+"\">");
		document.write("<tr height=\"6\"><td width=\""+idLayer[3][i]+"\" height=\"6\"><\/td><\/tr>");
		for(var j=0 ; j<sbsArray[i][0].length ; j++){
			document.write("<tr bgcolor=\""+trColor[0]+"\" height=\"16\" onmouseover=\"bgColor=trColor[1]\" onmouseout=\"bgColor=trColor[0]\">");
			document.write("<td align=\""+tdAlign+"\" valign=\"middle\" width=\""+idLayer[3][i]+"\" height=\"16\">");
			if( (classPage=="Persian") || (classPage=="Arabic") ) {document.write("<a href=\""+sbsArray[i][1][j]+"\" target=\"_self\"><img border=\"0\" src=\"../images/"+sbsArray[i][0][j]+".gif\" width=\""+sbsArray[i][2][j]+"\" height=\"14\" hspace=\"4\"><\/a>");}
			else if(classPage=="English") {document.write("<p class=\"eFontSubset\"><a class=\"EnglishSubset\" href=\""+sbsArray[i][1][j]+"\" target=\"_self\">"+sbsArray[i][0][j]+"<\/a><\/p>");}			
			document.write("<\/td><\/tr><tr height=\"1\"><td width=\""+idLayer[3][i]+"\" height=\"1\"><\/td><\/tr>");
		}
		document.write("<\/table><\/div>");
	}
}

function BuildTooltips(){
	for(var k=0 ; k<ttpLayer[0].length ; k++){
		document.write("<div id=\""+ttpLayer[0][k]+"\" style=\"position:absolute;visibility:hidden;top:0px;left:0px;width:"+ttpLayer[1][k]+";height:"+ttpLayer[2][k]+";z-index:10\">");	
		document.write("<img border=\"0\" src=\"../images/"+ttpLayer[3][k]+".gif\" width=\""+ttpLayer[1][k]+"\" height=\""+ttpLayer[2][k]+"\"></div>");
	}
}


//**************** End Build ****************\\
