//<!--
/*checks to see which browser version and kicks out IE3*/
window.onerror=null;
var netsgood = 0;
var goodIE = 0;
browserName = navigator.appName.substring(0,8);
browserVer = parseFloat(navigator.appVersion);
if (browserName == "Netscape" && browserVer >= 3)
{ netsgood = 1; }
if (browserName == "Microsof" && browserVer >= 4.0)
{ goodIE = 1; }
if (netsgood || goodIE) {

/*pop up script for enlarged images*/

var EnlargeWin = null;

function PopUp(bgcol,winw,winh,imgwidth,imgname,altxt,imgtxt,linkcol) {

	if (EnlargeWin && EnlargeWin.open && !EnlargeWin.closed) {
		
		EnlargeWin.close();
	}
	
	EnlargeWin = open('', 'enlargewin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width='+winw+',height='+winh);
   	
   	EnlargeWin.document.open();
   	
   	EnlargeWin.document.write('<html><head><title>Enlarged image</title></head><body bgcolor="'+bgcol+'"><table width="'+imgwidth+'" border="0" cellpadding="0" cellspacing="0" align="center"><tr><td><img src="'+imgname+'" border="0" vspace="5" alt="'+altxt+'" /></td></tr><tr><td><p><font face="Helvetica,arial" size="2">'+imgtxt+'</font></p></td></tr><tr><td align="right"><p>&nbsp;<br /><a href="javascript:window.close();"><font face="Helvetica, arial" size="1" color="'+linkcol+'">Close Window</font></a></p></td></tr></table></body></html>'); 
   	
   	EnlargeWin.document.close();
   	
   	EnlargeWin.focus();
}
}
//-->






















function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
};

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
};

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
};

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
};

function newWindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=1,status=yes,print=no,menubar=yes,resizable=1,width=650,height=375,left = 100,top = 100');");
}

function newWindowmenu(mypage, myname, w, h, scroll) 
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,status=no,toolbar=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function newWindow2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=1,status=yes,print=no,menubar=yes,resizable=1,width=675,height=450,left = 100,top = 100');");
}

function NewWindow(mypage, myname, w, h, scroll) 
{
var winl = (screen.width - w) / 2;
var wint = (screen.height - h) / 2;
winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no,status=no,toolbar=no'
win = window.open(mypage, myname, winprops)
if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function newWindowmenu(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=1,status=yes,print=no,menubar=yes,resizable=1,width=650,height=500,left = -150,top = -150');");
}


function helpwindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=1,status=yes,print=no,menubar=yes,resizable=1,width=650,height=375,left = 100,top = 100');");
}


function getCookieVal (offset)
	{
	var endstr = document.cookie.indexOf (";", offset);
	if (endstr == -1)
	endstr = document.cookie.length;
	return unescape(document.cookie.substring(offset, endstr));
	};

function GetCookie (name)
	{
	var arg = name + "=";
	var alen = arg.length;
	var clen = document.cookie.length;
	var i = 0;
	while (i < clen)
		{
		var j = i + alen;
		if (document.cookie.substring(i, j) == arg)
		return getCookieVal (j);
		i = document.cookie.indexOf(" ", i) + 1;
		if (i == 0) 
		break; 
		}
	return null;
	};

function SetCookie (name, value)
	{
	var argv = SetCookie.arguments;
	var argc = SetCookie.arguments.length;
	var expires = (2 < argc) ? argv[2] : null;
	var path = (3 < argc) ? argv[3] : null;
	var domain = (4 < argc) ? argv[4] : null;
	var secure = (5 < argc) ? argv[5] : false;
	document.cookie = name + "=" + escape (value) +
	((expires == null) ? "" : ("; expires=" + expires.toGMTString())) +
	((path == null) ? "" : ("; path=" + path)) +
	((domain == null) ? "" : ("; domain=" + domain)) +
	((secure == true) ? "; secure" : "");
	};
	
function video()
{ 
	// break out of frameset, forced by web-based email clients
	if (top.location != location) {
   	 top.location.href = document.location.href ;
  	}

	self.moveTo(("80"),("10"))
	var h = 480            // default Netscape size
	if (navigator.userAgent.indexOf("Netscape") == -1) h = 480    // IE size
	if (parseInt(navigator.appVersion) >= 4) 
	{
		if (window.resizeTo) self.resizeTo(480,h);
	} else {
		self.resizeTo(("450"),("480"));
	}
	void(innerWidth=450);
	void(innerHeight=480);
}
function newvideowindow(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=1,status=yes,print=no,menubar=yes,resizable=1,width=470,height=280,left = -150,top = -150');");
}

function newvideowindow2(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=yes,location=0,statusbar=1,status=yes,print=no,menubar=yes,resizable=1,width=470,height=280,left = -150,top = -150');");
}


function clickpop()
	{
	var expdate = new Date();
	var visit;
	expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
	if(!(visit = GetCookie("visit"))) 
	visit = 0;
	visit++;
	SetCookie("visit", visit, expdate, "/", null, false);
	if(visit == 3) 
		{
		twin=window.open('/click_pop.cfm','twin','resizable=yes,toolbar=no,status=no,location=no,height=250,width=300,scrollbars=auto');
		}
	else if (visit > 30)
		{
		ResetCounts();
		}
	};
	
function ResetCounts()
	{
	var expdate = new Date();
	expdate.setTime(expdate.getTime() +  (24 * 60 * 60 * 1000 * 365)); 
	visit = 0;
	SetCookie("visit", visit, expdate , "/", null, false);
	history.go(0);
	};