PopupWindow = "";

// *************************************************************************************************
// Execute when window is loading
// *************************************************************************************************
function OpenPopUp(windowsname,address,width,height,scrollbars,resizable)
{
	var w = 480, h = 340;
		
	if (document.all || document.layers)
	{
	   w = screen.availWidth;
	   h = screen.availHeight;
	}
	var popW = width, popH = height;
	
	var leftPos = (w-popW)/2, topPos = (h-popH)/2;
	
	if(PopupWindow)
	{
		if(!PopupWindow.closed)
		{
			PopupWindow.close();
		}
	}
	PopupWindow = window.open(address, windowsname,'width=' + popW + ',height=' + popH + ',top=' + topPos + ',left=' + leftPos + ',scrollbars=' + scrollbars + ',resizable=' + resizable + ',status=0,toolbar=0,location=0,menubar=0,directories=0');
	PopupWindow.focus();
}

//**************************************************************************************************************
function noRightClick() 
{
	var ie=(document.all);
	var ns=(document.layers);
	var ns6=(document.getElementById && !ie);
	
	strMessage = "Please contact Axio. for the use of pictures.";

	function IE() {
		if (event.button > 1)
		{ 
			//alert(strMessage);
			return false;
		}
	}
	function NS(e) {
		if (document.layers || (document.getElementById && !document.all))
		{
			if (e.which > 1)
			{ 
				//alert(strMessage);
				return false;
			}
		}
	}
	document.onmousedown=IE;
	document.onmouseup=NS;
	document.oncontextmenu=new Function("return false");
	
}

function detectOnState(ele, className)
{
    var onObject = document.getElementById(ele);
    if (navigator.appName.indexOf("Microsoft")!=-1)
        onObject.className = className;
    else
        onObject.setAttribute("class", className);
}
function detectOffState(ele, className)
{
    var OffObject = document.getElementById(ele);
    if (navigator.appName.indexOf("Microsoft")!=-1)
        OffObject.className = className;
    else            
        OffObject.setAttribute("class", className);
}