var agt=navigator.userAgent.toLowerCase();
var is_major=parseInt(navigator.appVersion);
var is_minor=parseFloat(navigator.appVersion);
var is_nav=((agt.indexOf('mozilla')!=-1)&&(agt.indexOf('spoofer')==-1)&&(agt.indexOf('compatible')==-1) && (agt.indexOf('opera')==-1)&&(agt.indexOf('webtv')==-1));
var is_ie=(agt.indexOf('msie')!=-1);
if(is_ie){var agt_ie=agt.substring(agt.indexOf('msie')+5); is_major=parseInt(agt_ie); is_minor=parseFloat(agt_ie);}
var is_dom2=(document.getElementById);
var is_http=(window.location.protocol.indexOf('http')==0);
function jsHide( o ) {if(is_dom2&&document.getElementById(o)){document.getElementById(o).style.visibility='hidden';}else if(is_ie&&is_major>=4&&eval('document.all.'+o)){eval('document.all.'+o+'.style.visibility="hidden"');}else if(is_nav&&is_major>=4&&eval('document.'+o)){eval('document.'+o+'.visibility="hide"');}}
function jsShow( o ) {if(is_dom2&&document.getElementById(o)){document.getElementById(o).style.visibility='visible';}else if(is_ie&&is_major>=4&&eval('document.all.'+o)){eval('document.all.'+o+'.style.visibility="visible"');}else if(is_nav&&is_major>=4&&eval('document.'+o)){eval('document.'+o+'.visibility="show"');}}

// Browser detect
if( is_minor < 3.5 )
   alert( "This page will not function properly in your browser.\n\nYour browser is very old.  Please upgrade your browser to version 4 or later.\n\nOr request the webmaster (of this page) to change their browser compatibility setting in Cool Page to version 3 browsers." );
else {
   if( is_nav && is_minor < 5.0 )
      window.location.replace( 'index_nn4.html' + window.location.search );
}

function HOffset() {
   var window_width = window.innerWidth ? window.innerWidth : (document.body.clientWidth ? document.body.clientWidth : 0);
   return Math.max( 0, Math.floor( (window_width - 1000) / 2 ) - 0 ).toString();
}

function VOffset() {
   var window_height = window.innerHeight ? window.innerHeight : (document.body.clientHeight ? document.body.clientHeight : 0);
   return 0;
}

function DoReposition() {
	var o='IDAlignPage';
	if(is_dom2&&document.getElementById(o)) {
		var e=document.getElementById(o);
		e.style.left=HOffset()+'px';
		e.style.top=VOffset()+'px';
	} else if(is_ie&&is_major>=4&&eval('document.all.'+o)) {
		var e=eval('document.all.'+o);
		e.style.left=HOffset()+'px';
		e.style.top=VOffset()+'px';
	} else if(is_nav&&is_major>=4&&eval('document.'+o)) {
		var e=eval('document.'+o);
		e.left=HOffset();
		e.top=VOffset();
	}
}


