function gbl_NavMOver(eItem){
	eItem.DefaultBgColor = eItem.style.backgroundColor;
	eItem.DefaultTxtColor = eItem.style.color;
	eItem.style.backgroundColor = "#b0c4de";
	eItem.style.cursor="hand";
}
			
function gbl_NavMOut(eItem){
	eItem.style.backgroundColor = eItem.DefaultBgColor;
	eItem.style.color=eItem.DefaultTxtColor
}

function gbl_downloadfile(){

	location.href = gbl_downloadfile.arguments[0];
}

function gbl_opennewwindow(URL){
	var aWindow;
	aWindow=window.open(URL, "image", "scrollbars,resizable,width=550,height=630,left=10,top=10");
	aWindow.focus();
}

function gbl_ModelNavMOver(){
	document['modelpicture'].src = gbl_ModelNavMOver.arguments[0];
	document['modeltitle'].src = gbl_ModelNavMOver.arguments[1];
}

function gbl_printpage(){
	if (navigator.platform.toLowerCase().indexOf("mac") != -1 && !window.netscape){
		alert("Press command + P");
	}
	else {window.print();}
}


function gbl_toggleSpecCategory(selectedCategory) {

	var specTable = document.getElementById("spec_table");
	var trTags = specTable.getElementsByTagName("tr");
	
	for(var i = 0; i < trTags.length; i++) {
		if(trTags[i].id != "static")
			(trTags[i].id.indexOf("listingCategory" + selectedCategory) > -1) || (selectedCategory == 0)  ? trTags[i].style.display = "block" : trTags[i].style.display = "none";
	}
}

function gbl_ButtonImageMgr(imgObj,out){
	
	imgString = imgObj.src
	
	if(imgObj.onMouseOver != '') {
		if (out)
			{imgObj.src = imgString.replace(/_roll/ig,"_on");}
		else{
			if (imgString.search(/_on/i) > 0)
				{imgObj.src = imgString.replace(/_on/ig,"_roll");}
			else
				{imgObj.src = imgString.replace(/_roll/ig,"_on");}
		}	
	}
}

//for 'jump to location in page' lists
//can add this to the onchange event hander of the select tag
function gbl_jumpto(objSelect) {
	var strSelectValue;
	strSelectValue = objSelect[objSelect.selectedIndex].value;
	if(strSelectValue!=""){
		var strURL = document.URL;
		var pos = strURL.lastIndexOf('#');
		if (pos != -1)
			{
				strURL = strURL.substring(0, strURL.lastIndexOf('#')) + "#" + strSelectValue;
				document.location = strURL;
			}
		else
			document.location = strURL + "#" + strSelectValue;
	}
}
