var m1mn1=new Array(
225
,"Passover Resorts","/passover_resorts/",0,""
,"Vacations","/vacations/",1,"m1mn1_3"
,"Tours","/tours/",1,"m1mn1_4"
,"Kosher Cruises","/kosher_cruises/",0,""
,"Passover Cruises","/passover_resorts/cruises/",0,""
,"Weddings & Honeymoons","/jewish_weddings_honeymoons/",0,""
,"Bar & Bat Mitzvah","/bar_bat_mitzvah/",0,""
,"Winter Sun","/vacations/summer_and_winter_sun/",0,""
,"Kosher Hotels Worldwide","/vacations/kosher_hotels_and_resorts/",0,""
,"Apartment & Villa rentals","/apartments_villas_rentals/",0,"");

var m1mn1_1=new Array(
60
,"Main","/main/",0,""
,"Areas + Cruises","/main/",0,"");

var m1mn4=new Array(
165
,"Hotels","/israel_hotels/",1,"m1mn4_1"
,"On-Line Hotels Booking","http://wct.co.il/TJT",0,""
,"Tours & Guides","/israel_tours_tour_guides/",0,""
,"Travel Services","/travel_services_israel/",0,""
,"Attractions","/israel_attractions/",0,""
,"Apartment Rentals","/apartments_villas_rentals/israel/",0,""
,"Hostels in Israel","/israel_hostels/",0,""
,"BG Airport Fast Track","/ben_gurion_airport_fast_track/",0,""
,"Zimmers & Rural","/vacations/israel_rural/",0,""
,"Passover Resorts","/passover_resorts/israel/",0,"");

var m1mn4_1=new Array(
165
,"Jerusalem","/israel_hotels/jerusalem/",0,""
,"Tel Aviv","/israel_hotels/tel_aviv/",0,""
,"Eilat","/israel_hotels/eilat/",0,""
,"Dead Sea","/israel_hotels/the_dead_sea/",0,""
,"Haifa & Carmel","/israel_hotels/haifa_carmel/",0,""
,"Caesarea & Netanya","/israel_hotels/netanya/",0,""
,"Galilee & Golan","/israel_hotels/galilee_golan/",0,""
,"Ashdod & Ashkelon","/israel_hotels/ashdod_ashkelon/",0,""
,"Herzliya","/israel_hotels/herzliya/",0,""
,"Negev","/israel_hotels/negev/",0,"");

var m1mn1_3=new Array(
165
,"Health","/vacations/health/",0,""
,"Ski & Mountain","/vacations/ski_and_mountain/",0,""
,"Summer & Winter Sun","/vacations/summer_and_winter_sun/",0,""
,"Shavuot Vacations","/vacations/shavuot/",0,""
,"Succot Vacations","/vacations/succot/",0,"");

var m1mn1_4=new Array(
165
,"Kosher Tours","/tours/kosher/",0,""
,"Youth & Students","/tours/student_and_youth/",0,""
,"Heritage","/tours/heritage/",0,""
,"Jewish Singles Travel","/tours/singles/",0,"");

var m1mn2=new Array(
175
,"Kosher City Guide","/city_guides/",0,""
,"Shabbat Times Worldwide","/shabbat_times/",0,""
,"Apartments To Rent","/apartments_villas_rentals/",0,""
,"Insurance","/travel_insurance/",0,""
,"Car Rental","/car_rentals/",0,""
,"Travel Agents","/travel_agents/",0,""
,"Kosher Travel FAQ's","/kosher_travel_faq/",0,""
,"Useful Links","/links/",0,"");


var m1mn2_1=new Array(
85
,"Area","/bb_area/",0,""
,"Subject","/bb_subject/",0,"");

var m1mn2_5=new Array(
175
,"Insurance","/travel_insurance/",0,""
,"Car Rental","/car_rentals/",0,""
,"Travel Agents","/travel_agents/",0,""
,"Apartments To Rent","/apartments/",0,""
,"Useful Links","/links/",0,"");

var m1mn3=new Array(
175
,"Kosher Restaurants","/kosher_restaurants/",0,""
,"Kosher  Hotels","/directory/?top_category_id=140&location_id_1=&location_id_2=&location_id_3=&location_id_4=&search_string=Name+%2F+Keyword+%28optional%29&search=",0,""
,"Synagogues","/directory/?top_category_id=141&location_id_1=&location_id_2=&location_id_3=&location_id_4=&search_string=Name+%2F+Keyword+%28optional%29&search=",0,""
,"Mikva","/directory/?top_category_id=142&location_id_1=&location_id_2=&location_id_3=&location_id_4=&search_string=Name+%2F+Keyword+%28optional%29&search=",0,""
,"Community Centres","/directory/?top_category_id=143&location_id_1=&location_id_2=&location_id_3=&location_id_4=&search_string=Name+%2F+Keyword+%28optional%29&search=",0,""
,"Consulates","/directory/?top_category_id=201&location_id_1=&location_id_2=&location_id_3=&location_id_4=&search_string=Name+%2F+Keyword+%28optional%29&search=",0,""
,"Update Us","/directory/add/?package_id=",0,"");

var disappeardelay=500;  //menu disappear speed onMouseout (in miliseconds)
var delayhide=0;
var hideMnu = new Array();

/////No further editting needed

var ie4=document.all;
var ns6=document.getElementById&&!document.all;

if (ie4||ns6){
	document.write('<div id="mnulvl_10" class="menuitem" onMouseover="clearHideMe(1)" onMouseout="dynamichide(event)"></div>');
	document.write('<div id="mnulvl_20" class="menuitem" onMouseover="clearHideMe(2)" onMouseout="dynamichide(event)"></div>');
	document.write('<div id="mnulvl_30" class="menuitem" onMouseover="clearHideMe(3)" onMouseout="dynamichide(event)"></div>');
	document.write('<div id="mnulvl_40" class="menuitem" onMouseover="clearHideMe(4)" onMouseout="dynamichide(event)"></div>');
}

function getposOffset(curObj, offsettype){
	var totaloffset = (offsettype=="left")?curObj.offsetLeft : curObj.offsetTop;
	var parentEl = curObj.offsetParent;
	while (parentEl!=null){
		totaloffset=(offsettype == "left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
		parentEl=parentEl.offsetParent;
	}
	return totaloffset;
}

function showhide(divObj, e, visible, hidden, menuwidth){
	if (ie4||ns6){
		divObj.style.left = divObj.style.top="-500px";
	}
	if (menuwidth!=""){
		divObj.widthobj=divObj.style;
		//divObj.widthobj.width=menuwidth;
	}
	if (e.type=="click" && divObj.style.visibility==hidden || e.type=="mouseover"){
		divObj.style.visibility=visible;
	}else if (e.type=="click"){
		divObj.style.visibility=hidden;
	}
}

function iecompattest(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;
}

function clearbrowseredge(ancObj, divObj, whichedge){
	var edgeoffset=0;
	if (whichedge=="rightedge"){
		var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15;
		divObj.contentmeasure=divObj.offsetWidth;
		if (windowedge-divObj.x < divObj.contentmeasure){
			edgeoffset=divObj.contentmeasure-obj.offsetWidth;
		}
	}else{
		var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset;
		var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18;
		divObj.contentmeasure=divObj.offsetHeight;
		if (windowedge-divObj.y < divObj.contentmeasure){ //move up?
			edgeoffset=divObj.contentmeasure+ancObj.offsetHeight;
			if ((divObj.y-topedge)<divObj.contentmeasure){ //up no good either?
				edgeoffset=divObj.y+ancObj.offsetHeight-topedge;
			}
		}
	}
	return edgeoffset;
}

function populatemenu(divObj, menuArray, newHrefID){
	if (!(ie4||ns6)){
		return;
	}
	var strCurMenu;
	var strEvents;
	var strImage;
	strCurMenu = "";
	mnuInd = 1;
	for(i = 1; i<menuArray.length; i+=4){
		strEvents = "";
		strImage = "";
		if(menuArray[i+2] > 0){
			strEvents = ' onMouseover="dropdownmenu(this, event, '+ menuArray[i+3] +')" onMouseout="dynamichide(event)"';
			strImage = '<img  id="imglvl_'+newHrefID+mnuInd+'" src="/images/tmnu_arwrt.gif" />';
		}
		strCurMenu = strCurMenu + '<a  id="anclvl_'+newHrefID+mnuInd+'" class="menuitem" href="' + menuArray[i+1] + '"' + strEvents + '>' + menuArray[i] + strImage + '</a>';		
		mnuInd++;
	}
	divObj.innerHTML=strCurMenu;
}

function dropdownmenu(ancObj, e, menucontents){
	if (window.event){
		event.cancelBubble=true;
	}else if (e.stopPropagation){
		e.stopPropagation();
	}
	clearhidemenu("dropdownmenu");
	hrehNum = getLvlNum(ancObj.id);
	if(hrehNum == 0){
		dropmenuobj = document.getElementById("mnulvl_10");
		topOffSet = ancObj.offsetHeight;
		rightOffSet = 0;
	}else{
		dropmenuobj = document.getElementById("mnulvl_"+(hrehNum+1)+"0");
		topOffSet = 2;
		rightOffSet = ancObj.offsetWidth-2;
	}
	hrehNum += 1;
	populatemenu(dropmenuobj, menucontents, hrehNum);
	forseHideSons(hrehNum);
	if (ie4||ns6){
		showhide(dropmenuobj, e, "visible", "hidden", menucontents[0]);
		dropmenuobj.x=getposOffset(ancObj, "left");
		dropmenuobj.y=getposOffset(ancObj, "top");
		dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(ancObj, dropmenuobj, "rightedge")+rightOffSet+"px";
		dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(ancObj, dropmenuobj, "bottomedge")+topOffSet+"px";
	}
}

function containsElement(src, trgt){
	if(!trgt) return false;
	if(ie4) return(src.contains(trgt));
	if(ns6){
		while (trgt.parentNode){
			if ((trgt = trgt.parentNode) == src) return true;
		}
		return false;
	}
}

function getFromElement(e){
	if(ie4)	return (e.fromElement);
	if(ns6)	return (e.currentTarget);
	return (null);
}

function getToElement(e){
	if(ie4)	return (e.toElement);
	if(ns6)	return (e.relatedTarget);
	return (null);
}

function isMenuElement(el){
	if(el == null) return false;
	return ((el.id.indexOf("anclvl") == 0) || (el.id.indexOf("mnulvl") == 0) || (el.id.indexOf("imglvl") == 0));
}

function getLvlNum(elID){
	elNum = (elID.substr(elID.indexOf("_")+1))*1;
	return (Math.floor(elNum / 10));
}

function getSubNum(elID){
	elNum = (elID.substr(elID.indexOf("_")+1))*1;
	return (elNum%10);
}

function forseHideSons(parentNum){
	if (!(ie4||ns6)) return;
	parentNum ++;
	childStrDiv = ("mnulvl_"+parentNum+"0");
	objDiv = document.getElementById(childStrDiv);
	while((typeof objDiv != "undefined") && (objDiv != null)){
		objDiv.style.visibility="hidden";
		parentNum++;
		childStrDiv = ("mnulvl_"+parentNum+"0");
		objDiv = document.getElementById(childStrDiv);
	}
}

function hideUntilToEl(fl, tl){
	for(i=fl; i>tl; i--){
		delayhidemenu("mnulvl_"+i+"0");
	}
}

function hideAll(fl){
	for(i=fl; i>0; i--){
		delayhidemenu("mnulvl_"+i+"0");
	}
	hideMnu = new Array();
}

function dynamichide(e){
	if(!(ie4||ns6)) return;
	if (window.event){
		event.cancelBubble=true;
	}else if (e.stopPropagation){
		e.stopPropagation();
	}
	fromElment = getFromElement(e);
	toElement = getToElement(e);
	fl = getLvlNum(fromElment.id);
	fs = getSubNum(fromElment.id);
	if(!isMenuElement(toElement)){
		hideAll(fl+1);		//	hide all menues - from child up to base level
		return;
	}
	tl = getLvlNum(toElement.id);
	ts = getSubNum(toElement.id);
	if(fl < tl) return;
	if(fl == tl){
		if(fs == ts){
			return;
		}else{
			objImg = document.getElementById("imglvl_"+(fl)+(fs));
			if(containsElement(fromElment, objImg)){
				delayhidemenu("mnulvl_"+(fl+1)+"0");	//	hide child menu
			}
			return;
		}
	}
	hideUntilToEl(fl+1, tl);	//hide all menues - from child up to to menu
	return;
}

function hidemenu(strDivID){
	if (!(ie4||ns6)) return;
	objDiv = document.getElementById(strDivID);
	if((typeof objDiv != "undefined")&&(objDiv != null)){
		objDiv.style.visibility="hidden";
	}
}

function delayhidemenu(strDivID){
	if (!(ie4||ns6)) return;
	mnuLvl = getLvlNum(strDivID);
	delayhide=setTimeout("hidemenu(\'"+strDivID+"\')",disappeardelay);
	hideMnu[mnuLvl] = delayhide;
}

function clearHideMe(mnuLvl){
	if (typeof hideMnu[mnuLvl] != "undefined"){
		clearTimeout(hideMnu[mnuLvl]);		
	}
}

function clearhidemenu(from){
	clearTimeout(delayhide);
}
