
//find out if the browser is IE so we can clear the link focus
var agt=navigator.userAgent.toLowerCase(); 
var is_ie   = (agt.indexOf("msie") != -1); 



// mouseover image swap for arrow


arrowon = new Image(); arrowon.src = "images/arrow.gif"
arrowoff = new Image(); arrowoff.src = "images/empty.gif"
nav_number=12;


function overImage(x)
{
	
	
	if(x != parent.frames[1].page ){ //parent.frames[1].page
	
		nav = "arrow_"+ x;
		document [nav].src = arrowon.src;
	}
	
}

// mouseout image swap for pimary navigation

function outImage(x)
{
	//alert(parent.frames[2].page);
	if(x != parent.frames[1].page){	//parent.frames[1].page
		nav = "arrow_"+ x;
		document [nav].src = arrowoff.src;
	}
			
}

// onclick arrow swap
function swapImage(x)
{
	
	for (i=1; i<=nav_number; i++){
	
		if( i == x )
		{
			
			nav = "arrow_"+ x;
			document [nav].src = arrowon.src;
			
			
		}
		
		else{
		
			nav = "arrow_"+ i;
			document [nav].src = arrowoff.src;
			
		}

	}
	
	//clear out the nasty link focus on IE
	
	for (i=0;i<document.links.length;i++){	
		if (is_ie){
			document.links[i].blur();
		}
	}
	
}

function fixArrow(){
//alert(parent.frames[2].page);
page = parent.frames[1].page;
swapImage(page);
}




// text onclick color swap

var currHot = 1

var isNav, isIE
var coll = ""
var styleObj = ""
if (parseInt(navigator.appVersion) <= 4) {
	if (navigator.appName == "Netscape") {
		isNav = true
	} else {
		isIE = true
		coll = "all."
		styleObj = ".style"
	}
}
// Utility function returns the x coordinate of a positionable object relative to page
function getPageLeft(obj)  {
	if (isNav) {
		return obj.pageX
	} else {
		return obj.offsetLeft
	}
}
// Utility function returns the y coordinate of a positionable object relative to page
function getPageTop(obj)  {
	if (isNav) {
		return obj.pageY
	} else {
		return obj.offsetTop
	}
}
// Set absolute positions of three hidden elements to match visible's relative position 
function init() {
	// get object reference of visible element
	var obj1 = eval("document." + coll + "hot1")
	// get left/top location relative to document
	var pageLeft = getPageLeft(obj1)
	var pageTop = getPageTop(obj1)
	// set position of three elements (hot2, hot3, and hot4)
	
		var obj = eval("document." + coll + "hot2" + styleObj)
		obj.left = pageLeft
		obj.top = pageTop
	
}
// Advance the color by one
function cycleColors() {
	// get reference to element to be hidden
	var objToHide = eval("document." + coll + "hot" + currHot + styleObj)
	alert(objToHide);
	currHot = (currHot == 2) ? 1 : 2
	// get reference to element to be shown
	var objToShow = eval("document." + coll + "hot" + currHot + styleObj)
	// swap
	objToHide.visibility = "hidden"
	objToShow.visibility = "visible"
	
}