//detect browser type and version
browser = (((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 3 )) || ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4 )))

// STAY OUT OF FRAMES
if (window !=window.top)
        top.location.href = location.href;


//if desired browser type and version detected, preload rollover images
if (browser)
		{
		index = new Image();
		index.src = "images/03_rb_nav_home.gif";
		index = new Image();
		index.src = "images/03_rb_nav_home_over.gif";
		gyr = new Image();
		gyr.src = "images/04_rb_nav_gyr.gif";
		gyr = new Image();
		gyr.src = "images/04_rb_nav_gyr_over.gif";
		tyr = new Image();
		tyr.src = "images/05_rb_nav_tyr.gif";
		tyr = new Image();
		tyr.src = "images/05_rb_nav_tyr_over.gif";
		faq = new Image();
		faq.src = "images/06_rb_nav_faq.gif";
		faq = new Image();
		faq.src = "images/06_rb_nav_faq_over.gif";
		cs = new Image();
		cs.src = "images/07_rb_nav_cs.gif";
		cs = new Image();
		cs.src = "images/07_rb_nav_cs_over.gif";
		help = new Image();
		help.src = "images/08_rb_nav_help.gif";
		help = new Image();
		help.src = "images/08_rb_nav_help_over.gif";
		}
		

//set up function to handle image rollover event
function swap(imgName,imgSrc)
	{
	if (browser)
		{
		document.images[imgName].src = imgSrc;
		}
	}


//function to handle "Need Help?" popup window
function popupWin(url)
	{
	window.open(url,"popUp","toolbar=no,directories=no,location=0,width=480,height=320,resizable=yes,scrollbars=yes,top=20,left=20")
	}

//function to handle "ValueRewards" and "more info" popup window	
function popupWin2(url) 
	{
	window.open(url,"popUp","toolbar=no,directories=no,location=0,width=565,height=480,resizable=yes,scrollbars=yes,top=0,left=0")
	}

//function to handle "Description" popup window	
function popupWin3(url) 
	{
	window.open(url,"popUp","toolbar=no,directories=no,location=0,width=500,height=359,resizable=yes,scrollbars=yes,top=20,left=20")
	}

function MM_findObj(n, d)
	{ //v3.0
	  var p
	  var i
	  var 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);
	  return x;
	}

// Print this window
function printWindow(){
browserVersion = parseInt(navigator.appVersion)
if (browserVersion >= 4) window.print();
}
// END - print window

// history link
function goHist(a)
 
{  
 history.go(a);
      // Go back one.

}
// END - history link
//FUNCTIONS TO HANDLE TAB FOCUS
var isNN = (navigator.appName.indexOf("Netscape")!=-1);
function autoTab(input,len, e) {
var keyCode = (isNN) ? e.which : e.keyCode; 
var filter = (isNN) ? [0,8,9] : [0,8,9,16,17,18,37,38,39,40,46];
if(input.value.length >= len && !containsElement(filter,keyCode)) {
input.value = input.value.slice(0, len);
input.form[(getIndex(input)+1) % input.form.length].focus();
}
function containsElement(arr, ele) {
var found = false, index = 0;
while(!found && index < arr.length)
if(arr[index] == ele)
found = true;
else
index++;
return found;
}
function getIndex(input) {
var index = -1, i = 0, found = false;
while (i < input.form.length && index == -1)
if (input.form[i] == input)index = i;
else i++;
return index;
}
return true;
}
// END - Handle Tab Focus