function sideLinks(){
var arr=new Array();  //	arrMM=new Array("LinkTitle", "LinkURL", "SubMenuNum"); 	//
arr[1]=new Array("Visas", "visas.html", "null");	// null for no subs 
arr[2]=new Array("Services", "#" ,"2");
arr[3]=new Array("Transportation", "transportation.html", "null");
arr[4]=new Array("Emergency Phone Numbers", "emergency.html", "null");
arr[5]=new Array("University Information", "#", "5");
arr[6]=new Array("Sports and Recreation", "sports.html", "null");
arr[7]=new Array("Tel Aviv Culture and Entertainment", "culture.html", "null");
arr[8]=new Array("Tourism", "tourism.html", "null");
arr[9]=new Array("Religious and Social Centers", "religious.html", "null");

 
var str_top = "";
for (var j=1; j<arr.length; j++){
str_top += "<a class=\'main_links\' href=\'"+eval('arr['+j+'][1]')+"\' id=\'heblink+j+\' onMouseOver=\"buildSub(\'"+eval('arr['+j+'][2]')+"\');\" onMouseOut=\"hide(\'"+eval('arr['+j+'][2]')+"\');\">";
str_top += eval('arr['+j+'][0]')+"</a><br>";
}
document.write(str_top);
}

if (document.all) {
       layerRef = "document.all";
}
if(document.getElementById){
	  layerRef = "document.getElementById";
}

function get_width()
   {
     var w=(document.all)?(document.body.clientWidth):(window.innerWidth);
     return w;
    }

 function pos_sublinks()
   {
  var pos_left=get_width();
   pos_left=(pos_left-772)/2;
	if(pos_left<0){
	pos_left=0;
}
  
	//  eval(layerRef+"('textObj').style.left=200");
	  eval(layerRef+"('textObj').style.top=120");
}
//
var x=0;
var sublinks="null";
var cur_link_h="null";
var which="null";

//
arr2=new Array();
arr2[1]=new Array("Working hours in Israel", "services.html#wh");
arr2[2]=new Array("Currency and banks", "services.html#cb");
arr2[3]=new Array("Post office", "services.html#po");
arr2[4]=new Array("Cellular phones", "services.html#cp");
arr2[5]=new Array("Public phones", "services.html#pp");
arr2[6]=new Array("Cable TV", "services.html#tv");
arr2[7]=new Array("Travel agents on campus", "services.html#ta");
arr2[8]=new Array("Insurance", "services.html#in");
arr2[9]=new Array("Shopping", "services.html#sh");

//
arr5=new Array(); 	 
arr5[1]=new Array("Campus map", "http://www2.tau.ac.il/map/unimaple1.asp");
arr5[2]=new Array("Campus phone numbers", "phones-emails.html");
arr5[3]=new Array("Academic calendar", "calendar.html");
arr5[4]=new Array("Computer access", "computer.html");
arr5[5]=new Array("Student ID cards", "id-card.html");
arr5[6]=new Array("Hebrew language studies", "language.html");
arr5[7]=new Array("Bookstore", "bookstore.html");
arr5[8]=new Array("Cultural activities", "cultural.html");
arr5[9]=new Array("Campus first aid", "first-aid.html");
arr5[10]=new Array("Campus dental first aid", "dental-aid.html");
arr5[11]=new Array("Campus security", "security.html");
arr5[12]=new Array("Gates schedule", "gates.html");
arr5[13]=new Array("For Persons with Disabilities", "disabilities.html");




function colourLink(which){
	if(which!='null'){
		if(document.all){
		document.all(which).style.color='#D54105';
		}
		if(document.getElementById){
		document.getElementById(which).style.color='#D54105';
		}
	}
	return;
}
//
function discolourML(which){
	if(which!='null'){
		if(document.all){
		document.all(which).style.color='#404AA9';
		}
		if(document.getElementById){
		document.getElementById(which).style.color='#404AA9';
		}
	}
	return;
}

function buildSub(sublinks) {
	if(sublinks!='null'){
		clearTimeout(x);
		//cur_link_h="heblink"+sublinks;
        	pos_sublinks();
			arr=eval("arr" + sublinks);
			str="<ul style='margin-left: 1.5em; padding-left: 0.5em; margin-right: 0em; margin-top: 0em; margin-bottom: 0em; color: white'>";
			for (var i=1; i<arr.length; i++){
			str+="<li class='bul'><b><a href=\'"+eval('arr['+i+'][1]')+"\' class='menus_sub'>";
			str+=eval('arr['+i+'][0]')+"</a></b></li>";
			 }
			 str+="</ul>";
			 eval(layerRef+"('textObj').style.backgroundColor = '#A1BBE4'");
             eval(layerRef+"('textObj').style.borderStyle= 'solid'");
             eval(layerRef+"('textObj').style.borderColor= '#2055C4'");
                                                      //EDF0F2
             eval(layerRef+"('textObj').style.borderWidth= '1px'");
			 eval(layerRef+"('textObj').innerHTML = str");
			// colourLink(cur_link_h);
			}
//else
//clearSub();
}
//
function clearSub(){
//imgObj.filters[0].apply();
//oImg.src = endImage;
eval(layerRef+"('textObj').innerHTML = ''");
eval(layerRef+"('textObj').style.backgroundColor = 'transparent'");
eval(layerRef+"('textObj').style.borderStyle= 'none'");
eval(layerRef+"('textObj').style.borderColor= 'transparent'");
eval(layerRef+"('textObj').style.borderWidth= '0'");
}

function hide(sublinks){
	if(sublinks!='null'){
x = setTimeout("clearSub()",800);
	}
//discolourML(cur_link_h);
}

function stay_sub(){
//colourLink(cur_link_h);
clearTimeout(x);
}

