
// -----------------------------------------------------------------------
// This JavaScript controls the operation of the center navigation bar of 
// items being selected and deselected.  It includes a browser
// check; only Netscape Navigator versions >= 3 and Microsoft
// Internet Explorer versions >= 4 will use the JavaScript functionality.

// alert("hi..");
Name = navigator.appName;
Ver  = parseInt(navigator.appVersion);
Platform = navigator.platform

if ((Name == "Netscape" && Ver >= 3) || (Name == "Microsoft Internet Explorer" && Ver >= 4))
	Ver = "n3"
else
	Ver = "other"

if (Ver == "n3")
{
	imgCount = 7;
	onMenu  = new MakeArray(imgCount);
	offMenu = new MakeArray(imgCount);

	offMenu[1].src  = "images/buttons/con_off.gif";
	offMenu[2].src  = "images/buttons/com_off.gif";
	offMenu[3].src  = "images/buttons/his_off.gif";
	offMenu[4].src  = "images/buttons/mis_off.gif";
	offMenu[5].src  = "images/buttons/fee_off.gif";
	offMenu[6].src  = "images/buttons/new_off.gif";
	offMenu[7].src  = "images/buttons/hom_off.gif";


	onMenu[1].src  = "images/buttons/con_on.gif";
	onMenu[2].src  = "images/buttons/com_on.gif";
	onMenu[3].src  = "images/buttons/his_on.gif";
	onMenu[4].src  = "images/buttons/mis_on.gif";
	onMenu[5].src  = "images/buttons/fee_on.gif";
	onMenu[6].src  = "images/buttons/new_on.gif";
	onMenu[7].src  = "images/buttons/hom_on.gif";


}

function MakeArray(n)
{
	this.length = n;
	for (var i=1; i<=n; i++)
	{
		this[i] = new Image();
	}
	return this
}

function select(loc, num)
{
	if (Ver == "n3")
	{
		document.images[loc].src = onMenu[num].src;
	}
}

function deselect(loc, num)
{
	if (Ver == "n3")
	{
		document.images[loc].src = offMenu[num].src;
	}
}
// -----------------------------------------------------------------------

// Text box marquee by Dave Methvin, Windows Magazine
// May be used/modified if credit line is retained
// Modified with Inline Style Tags to add Font Colors by Thomas A. Rowe 1998.

// CHANGE THESE TO ALTER THE SCROLL SPEED
ScrollSpeed = 200;  // milliseconds between scrolls
ScrollChars = 2;    // chars scrolled per time period

function ScrollMarquee() {
  window.setTimeout('ScrollMarquee()',ScrollSpeed);
  var msg = document.marquee1.text.value;
  document.marquee1.text.value = msg.substring(ScrollChars) + msg.substring(0,ScrollChars);
}

// -----------------------------------------------------------------------
function SetCookie (name, value) {
         var argv = SetCookie.arguments;
         var argc = SetCookie.arguments.length;
         var expires = (argc > 2) ? argv[2] : null;
         var path = (argc > 3) ? argv[3] : null;
         var domain = (argc > 4) ? argv[4] : null;
         var secure = (argc > 5) ? 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 setC(prod_val) {
   var expdate = new Date ();
   expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000 * 31));
   SetCookie ("product", prod_val, expdate);
}

// -----------------------------------------------------------------------
// 
// -----------------------------------------------------------------------
function showLegal()
{
//	alert("in proc");
	window.open("http://www2.epix.net/~acpsr/legal.htm", "LegalNotice", "width=350,height=300,scrollbars=yes,noresize");
}

// -----------------------------------------------------------------------
// 
// -----------------------------------------------------------------------
function showY2K()
{
	window.open("http://www2.epix.net/~acpsr/y2k.htm", "Y2KNotice", "width=350,height=300,scrollbars=yes,noresize");
}

// -----------------------------------------------------------------------
// 
// -----------------------------------------------------------------------
function showPricing()
{
//	alert("product is" & product);
	window.open("http://www2.epix.net/~acpsr/atl_pricing.htm", "AltlasPricing", "width=350,height=500,scrollbars=yes,noresize");
}

