﻿// JScript File

function bookmarkPage()
{
  
 
  if ((navigator.appVersion.indexOf("MSIE") > 0) && (parseInt(navigator.appVersion) >= 4))
  {
 
if (window.location.pathname.indexOf("defaultpage") > 0 ){
var sPage = window.location.pathname.substring(0,window.location.pathname.indexOf("defaultpage"));
}else{
var sPage = window.location.pathname.substring(0,window.location.pathname.indexOf("index"));

}


 var sPath = window.location.protocol + '//' + window.location.host + sPage;
//alert(sPath);
//	  alert(window.location.href);
           
	  window.external.AddFavorite(sPath,"ExpandingHorizons");
	}
}

function formSubmit(event, button)
{
  if(event.keyCode == 13)
	{
	  document.getElementById(button).click();
		return false;
	}
}

function dynamicPopup(foto)
{ 
  alpha=window.open("","DynaWin"," toolbar=no,directories=no,menubar=no,resizable=no"); 
  x=alpha.document; 
  x.write("<head><SCRI"+"PT>") 
  x.write("function dymanicResize(){") 
  x.write("window.resizeTo(") 
  x.write("document.im1.width+11,") 
  x.write("document.im1.height+29);") 
  x.write("};document.title=document.im1.src;</SCRIP"+"T></head>") 
  x.write("<body topmargin=0 leftmargin=0 scroll=no>") 
  x.write("<img src='"+foto+"' name='im1' onLoad='dymanicResize()'>") 
  x.write("</body>") 
  x.close() 
  alpha.focus() 
 }
 
 function confirm_delete()
{
				if (confirm("Are you sure you want to delete this item?")==true)
					return true;
				else
					return false;
} 

