	window.onerror=null;
if (document.images) {
  names = new Array("home", "about", "packages", "portfolio", "services", "contact" );
  items = new Array(10);
  for (i=0; i<=11; i++)
     {
	 items[i] = new Image(); }
	 items[0].src = "images/home_off.gif";
     items[1].src = "images/about_off.gif";
     items[2].src = "images/packages_off.gif";
	 items[3].src = "images/portfolio_off.gif";
   	 items[4].src = "images/services_off.gif";
     items[5].src = "images/contact_off.gif";
	
	 items[6].src = "images/home_on.gif";
     items[7].src = "images/about_on.gif";
     items[8].src = "images/packages_on.gif";
	 items[9].src = "images/portfolio_on.gif";	
     items[10].src = "images/services_on.gif"; 
     items[11].src = "images/contact_on.gif";
	 }

  function swap(des,num) {
    if (document.images)
      { document.images[names[des]].src = items[num].src; }
  }


function getposOffset(overlay, offsettype){
var totaloffset=(offsettype=="left")? overlay.offsetLeft : overlay.offsetTop;
var parentEl=overlay.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}

function overlay(curobj, subobjstr, opt_position){
if (document.getElementById){
var subobj=document.getElementById(subobjstr)
subobj.style.display=(subobj.style.display!="block")? "block" : "none"
var xpos=getposOffset(curobj, "left")+((typeof opt_position!="undefined" && opt_position.indexOf("right")!=-1)? -(subobj.offsetWidth-curobj.offsetWidth) : 0) 
var ypos=getposOffset(curobj, "top")+((typeof opt_position!="undefined" && opt_position.indexOf("bottom")!=-1)? curobj.offsetHeight : 0)
subobj.style.left=xpos+"px"
subobj.style.top=ypos-200+"px"
return false
}
else
return true
}

function overlayclose(subobj){
document.getElementById(subobj).style.display="none"
}

