
include ("supersleight.js");

function OpenURL(url)
{
	myRef = window.open(url, 'mywin', 'left=20,top=20,width=660,height=500,toolbar=0,statusbar=0,resizable=0');	
}

//***************************************************
//******************* DHTML *************************
//***************************************************
function Show(idName, show)
{
	var who = document.getElementById(idName);	

	if (show == true)
		who.style.visibility = "visible";
	else
		who.style.visibility = "hidden";
}



//***************************************************
//******************* ROLLOVER **********************
//***************************************************
function SetBg(who, fileName, pathName)
{		
	var fileExtension = ".png";
	var src = pathName + fileName + fileExtension;
	
	who.style.backgroundImage = "url('" + src + "')";
	bg_fnFixPng(who);
}

function SetCurser(mouseType)
{
	// curser types: "default"
	//				 "pointer"
	
	document.body.style.cursor = mouseType;
}

/*function SetBg()
{
	document.getElementById("myId").style.backgroundImage = "url('myPath/myFile.png')";
}

function SetBg(idName, fileName)
{	
	var pathName = "menu/";
	var fileExtension = ".png";
	var who = document.getElementById(idName);	
	
	who.style.backgroundImage = "url('" + pathName + fileName +  fileExtension + "')";
}*/

//***************************************************
//************** EVENT HANDLERS *********************
//***************************************************

function MouseOver(idName, fileName, location)
{
	SetCurser("pointer");
	var  pathName = "";

	if (location == "below")
		pathName = "menu/menuBelow/";
	
	if (location == "above")
		pathName = "menu/menuAbove/";	
	
	SetBg(idName, fileName, pathName);
}

function MouseOut(idName, fileName, location)
{
	SetCurser("default");
	var  pathName = "";

	if (location == "below")
		pathName = "menu/menuBelow/";
	
	if (location == "above")
		pathName = "menu/menuAbove/";	
	
	SetBg(idName, fileName, pathName);
}

function Click()
{
	// not implemented yet
}
