isIE=document.all;
	isNN=!document.all&&document.getElementById;
	isN4=document.layers;
	i = -1;

function addBookmark() {
	if (window.external)
    external.AddFavorite("http://www.balamand.edu.lb", "University Of Balamand")
  else
    alert("Your browser doesn't support this feature.");
}
function window1(id,ed) 
{
	if (document.form1.email.value == "")
		{
			alert("E-mail is required.");
			document.form1.email.focus();
			return false;
		}
   err = check_email("email", "form1"); if (err == 1) return false;
   err = check_sqlinjection("email", "form1"); if (err == 1) return false;
	
	
	
iwin = window.open(id+"?email="+ed,"IWIN", "status=no,toolbar=no,location=no,menu=no,width=550,height=125,scrollbars=yes");
return true;
}

function setValue()
  {
	index = document.frmSearch.SearchWhere.selectedIndex;
	document.frmSearch.SearchFor.value = "";
	if (index > 3)
	  {
		document.frmSearch.SearchFor.value = document.frmSearch.SearchWhere[document.frmSearch.SearchWhere.selectedIndex].text;
		document.frmSearch.submit();
	  }
	 
  }
  
function getInfo(strName)
 {
    document.frmInfo.hidName.value = strName;
	formhandler(11, 'Alumni%20Information%20Form', 800, 300);
 }
 
 function check_search1()
    {
	 if (document.search_form.Keywords.value.length< 3)
		 {
			  alert("Veuillez vous entrer au moins 3 charactères");   
			  document.search_form.Keywords.focus();
			  return false;
		 }
	 else
		 {
			  document.search_form.submit();
		 }
    }
function put_on(id)
	{
	 document.getElementById(id).style.backgroundColor = "#21407A"
	}
function put_off(id)
	{
	 document.getElementById(id).style.backgroundColor = "#526394"
	}

function popsite()  {
   iwin = window.open("sitemap.asp","",
   "status=no,scrollbars=1,resizable=1,toolbar=no,location=no,menu=no,top=50,left=100,width=500,height=400");
} 
function popup(id, name)  {
   iwin = window.open("print.asp?id="+id+"&PageName="+name,"",
   "status=no,scrollbars=0,resizable=1,toolbar=no,location=no,menu=no,top=15,left=15,width=765,height=550");
} 

function formhandler(id, name, width, height)  {
   iwin = window.open("FormHandler.asp?id="+id+"&PageName="+name,"",
   "status=no,scrollbars=1,resizable=0,toolbar=no,location=no,menu=no,width="+width+",height="+height);
} 

function popupPhoto(photo,btype) 
{
	window.open("viewpic.asp?photo=" + photo ,"photo","width=800,height=600,top=50,left=1150,resizable=yes,scrollbars=0");
	return;
}

myIndex= 0;
function flipNewsImage()
{
	myIndex = Math.round(Math.random()*2)+1;	
	document.getElementById("imgMainNews").src = "images/index/Foundation" + myIndex + ".jpg";
}

function SlideShow(i)
	   {
	     
		 if (i == NoOfImg - 1)
	   	      {
	   	      	i=-1
	   	      }	
	   	  document.getElementById("imgMainNews").src = imgArr[i+1];
	      i++;
		  setTimeout("SlideShow(" + i + ")",3500);
	   	  	
	   }
	   
function SlideShowLabel(i)
	   {
	      
		 if (i == NoOfImg - 1)
	   	      {
	   	      	i=-1
	   	      }	
	   	  document.getElementById("lblMainNews").innerHTML = "<font class='text-small'>" + lblArr[i+1] + "</font>";
	      i++;
	      setTimeout("SlideShowLabel(" + i + ")",3500);
	   	  	
	   }

function SlideShowClick(dir)
	   {
	     
		if ((i == NoOfImg - 1) && (dir == 'f'))
	   	      {
	   	      	i = -1;
	   	        
			  }	
		  
	   	 if ((dir == 'b') && (i == -2))
		    {
				i = NoOfImg - 1;
				document.getElementById("imgMainNews").src = imgArr[i];
				document.getElementById("aPopup").href = "images/AFC/Slide" + i + ".pdf"
				
			}
		 else
		 	{
				document.getElementById("imgMainNews").src = imgArr[i+1];
		 		r = i+1;
				document.getElementById("aPopup").href = "images/AFC/Slide" + i + ".pdf"
			}
		document.frmhid.hidhid.value = i;
	   }


function SlideShowLabelClick(dir)
	   {
	     if ((i == NoOfImg - 1) && (dir == 'f'))
	   	      {
	   	      	i = -1;
			  }	
	   	  
		 if ((dir == 'b') && (i == NoOfImg - 1))
		    {
				document.getElementById("lblMainNews").innerHTML = lblArr[i]
			}
		 else	
		 	document.getElementById("lblMainNews").innerHTML = lblArr[i+1];
	   }

var myChoice, mySelection;

   function CK_MenuItemRedirectPage(){
      myChoice = document.myForm.Reserves.selectedIndex;

      mySelection=document.myForm.Reserves.options[myChoice].value;



      location=mySelection;


   }