/* 
 Nav Functions

*/

var hicolor = "#999999";
var locolor = "#BDBDBD";



function over (objID)
{
	document.getElementById(objID).style.backgroundColor = hicolor;
}

function out (objID)
{
		
		//alert(subpID + " "+ objID)
		//alert(pageID + " "+ objID)
		//alert(subpID != objID);
		//alert(pageID != objID);
		if(!(typeof subpID == "undefined")) // there is a submenu
		{
			
			// if its not the currently selected page then switch it to a low color!
			
			if (pageID != objID) {
				if (subpID != objID)
					document.getElementById(objID).style.backgroundColor = locolor;
			
			}
			
				
		}else
		{
			if( pageID != objID )
				document.getElementById(objID).style.backgroundColor = locolor;
		}
	
	
}

function setNav(){
	document.getElementById(pageID).style.backgroundColor = hicolor;
	
	// if theres a subpage menu set it
	if(!(typeof subpID == "undefined"))
	{
		document.getElementById(subpID).style.backgroundColor = hicolor;
		
	}

}


/*
	Catalogue Item Image


*/

function showItem(num)
{
	// show the selected image
	document.images.itemImage.src= "images/"+ eval("im"+num) ;
	
	// hilite the seected icon
	//alert(num);
	for(i=1;i<=3;i++)
	{
		//alert("loop" + i);
		if(i == num)
		{
			//alert("equals" + num);
			var thmb = "thumb"+i;
			//alert(thmb);
			document.getElementById(thmb).style.border="2px solid #EFBB71";;
			
		}else
		{
			//alert("got	"+num);
			var thmb = "thumb"+i;
			//alert( document.getElementById(thmb) );
			document.getElementById(thmb).style.border="2px solid white";
		}
		
	}
	
}
/*
	Status bar functions

*/


function sbar(inTxt)
{
	//alert(inTxt);
	window.status = inTxt;
	
	
	
}

function sclear()
{
	window.status = "";
}


function show_large(file,w,h)
{
	var large;
	large = window.open("../img/large/large.html",
						"magnify",
						"width="+w+",height="+ (h +35) +",toolbar=no"
						);
	
	// document head
	large.document.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n");
	large.document.write("<html xmlns=\"http://www.w3.org/1999/xhtml\">\n");
	large.document.write("<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\" />\n");
	large.document.write("<title>Magnified View</title>\n<style type=\"text/css\">\n");
	large.document.write("body{margin:0;\n")
	large.document.write("font-family:Verdana, Arial, Helvetica, sans-serif;font-size:12px;}\n")
	large.document.write("a:active{text-decoration:none;color:#666666;}\n");
	large.document.write("a:link{text-decoration:none;color:#666666;}\n")
	large.document.write("a:visited{text-decoration:none;color:#666666;}\n");
	large.document.write("a:hover{text-decoration:none;color:#EFBB71;}\n");
	large.document.write("</style>\n</head>\n<body>\n");
	large.document.write("<img src=\"../img/large/"+file+"\" alt=\"\" \/>\n");
	large.document.write("<br />\n<div align=\"center\"><a href=\"javascript:window.close();\"><strong>Close this window</strong></a></div>\n");
	large.document.write("</body>\n</html>");
	large.focus()
	
}
