if (document.getElementById) {
//the surfer is using IE5+ or NS6+
	var version="compatible"; 
}else{ 
	var version="upgrade";
} 
if (version=="upgrade") {
	alert("This site is designed for IE 5.5+ or Netscape 6x+ or Firefox 1.5+. "
	+ "Please upgrade or use one of these tree browsers to properly view this site.");
}
/*
var cookieEnabled = (navigator.cookieEnabled)? true : false;
//if not IE4+ nor NS6+
if (typeof navigator.cookieEnabled=="undefined" && !cookieEnabled) {
	document.cookie = "testcookie";
	cookieEnabled = (document.cookie.indexOf("testcookie")!=-1)? true : false;
}
if (!cookieEnabled) {
	alert("This site uses cookies. Cookies are pieces of information passed by the website to your computer. "
		+ "Personal information is not stored in cookies on this site, we only use cookies to determine "
		+ "if you logged on to this site. You can configure your browser to accept/block/delete cookies. "
		+ "If you choose to block cookies, you may not be able to use parts of this site.");
}
*/
function loadFrames(frame1,page1,frame2,page2)
{
	eval("parent."+frame1+".location='"+page1+"'");
	eval("parent."+frame2+".location='"+page2+"'");
}

if (document.layers) {navigator.family = "nn4"}
if (document.all) {navigator.family = "ie4"}

function popLayer(a)
{
  desc = "<table class='popup' cellspacing='0' cellpadding='3'>"
    + "<tr><td class='popup'><p class='popup'>" + a + "</td></tr></table>";
		
  if(navigator.family =="nn4") {
		document.popupdiv.document.write(desc);
		document.popupdiv.document.close();
		document.popupdiv.left=popupx;
		document.popupdiv.top=popupy;
	}else if(navigator.family =="ie4"){
		popupdiv.innerHTML=desc;
		popupdiv.style.pixelLeft=popupx;
		popupdiv.style.pixelTop=popupy;
	}
}

function hideLayer()
{
	if(navigator.family =="nn4") {eval(document.popupdiv.top="-500");}
	else if(navigator.family =="ie4"){popupdiv.innerHTML="";}
	else if(navigator.family =="gecko") {document.getElementById("popupdiv").style.top="-500";}
}

function preloading()
{
	for (i=0; i<preloading.arguments.length; i++){
		preImg[i] = new Image();
		preImg[i].src = preloading.arguments[i];
	}
}

function scrollMarquee() {
	if (parseInt(marqueeHandle.style.top)>(marqueeHeight*(-1)+4)) {
		marqueeHandle.style.top=parseInt(marqueeHandle.style.top)-currentSpeed+"px";
	} else {
		marqueeHandle.style.top=marqueeStartpos+"px";
	}
	if (currentSpeed>0) marqueeCount++;
	if (marqueeCount>marqueeStop) {
		clearInterval(marqueeItrvl);
		marqueeStopped=true;
	} 
}

function initMarquee() {
	marqueeHandle=document.getElementById ? document.getElementById("scrollmsg") : document.all.scrollmsg;
	marqueeHeight=marqueeHandle.offsetHeight;
	marqueeHandle.style.top=marqueeStartpos+"px";
	marqueeItrvl=setInterval("scrollMarquee()",100);
}

function startMarquee() {
	currentSpeed=marqueeSpeed;
	if (marqueeStopped) {
		marqueeStopped=false;
		marqueeCount=marqueeStartpos*(-1);
		marqueeItrvl=setInterval("scrollMarquee()",100);
	}
}
function catchEnter(e)
{
	if (!e) { e = window.event; }
	if (e.keyCode) { code = e.keyCode;
	}else if (e.which) { code = e.which; }
	if (code==13) { return false; }else{ return true; }
}
function trim(sTxt)
{
	return sTxt.replace(/^\s+|\s+$/g,'');
}
function openPopup(url, w, h, t, l)
{
	if (typeof w==="undefined") { w = 10; }
	if (typeof h==="undefined") { h = 10; }
	var leftPos = ((typeof l==="undefined")?10:l);
	if (typeof t==="undefined") {
		var bw=w, bh=h, bl=180, bt=0, topPos, leftPos;
		if (document.all) {
			bw = document.body.clientWidth;
			bh = document.body.clientHeight;
			bl = window.screenLeft;
			bt = window.screenTop;
		}else if (document.layers) {
			bw = window.outerWidth;
			bh = window.outerHeight;
			bl = window.screenX;
			bt = window.screenY;
		}
		topPos = Math.floor((bh-h)/2) + bt;
		leftPos = Math.floor((bw-w)/2) + bl;
	}else{ 
		var topPos = t;
	}
	newwindow = window.open(url, "popupwin", "top="+topPos+",left="+leftPos+",height="+h+",width="+w+",scrollbars=no");
	if (!newwindow.opener) newwindow.opener = self;
	if (window.focus) { newwindow.focus(); }
	return false;
}


