
function stoperror() {return true;}
window.onerror=stoperror;


 if(top!=self)  {setTimeout('esc()',2000);  function esc() {top.location=self.location;} }
 

sfHover = function() {
	var sfEls = document.getElementById("nav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);





function setMargins() {
	
		 var winwidth=1000;
	     var marg=100;
		 var op=-1;
		 if (navigator.userAgent) { op=navigator.userAgent.search(/Opera/) }; 
		 
         if (window.innerWidth) {winwidth= window.innerWidth;}
            else if (document.body.offsetWidth) {winwidth=document.body.offsetWidth;}
			     else {winwidth=screen.availWidth;}
         var bodywidth_pc=94*Math.pow(800.0/winwidth,0.66);
		 var marg_pc=Math.round((100-bodywidth_pc)/2);
		 marg=winwidth*marg_pc/100;		
         document.body.style.marginLeft=marg;
         if (op>-1) { document.body.style.marginRight=marg-3; } else { document.body.style.marginRight=marg; }
		 
		 pheader=document.getElementById('pageheader');
		 if (pheader) {
              if (document.all) { pheader.style.width='100%'; } 
			     else { if (op>-1) {hwidth_pc=100-2*marg_pc;} else {hwidth_pc=100-2.025*marg_pc; }
				   pheader.style.width=hwidth_pc+'%'; 	 
				 }
		}
		
}
   setMargins();


   

 function reload_window() { 
 
 
	 
	   firefox=-1;
       if (navigator.userAgent) { firefox=navigator.userAgent.search(/Firefox/);  } 
	   if (firefox==-1) { window.location.reload(); }
	      else { 
		      if (navigator.cookieEnabled) {
                 if ( document.cookie.indexOf('resize=') ==-1 ) {
                  alert('For best display, please reload the page after resizing your window');  
                  today = new Date();
                  expiry = new Date(today.getTime() + 24*60*60*1000);   // cookie expires after 1 day
                  document.cookie='resize=yes; expires='+expiry.toGMTString()+'; path=/'; 
				 }
			  }
			  else { alert('Please reload this page'); }
				
          }
		  
		  
	setMargins() ;	  
	

		  
}
 
  window.onresize=reload_window;


 