var PopupWindow = ""
var hideTimeOut = "";
var hideLayerFlag = 0;
var myLayersArray = new Array();

//************************************************************************************************
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 funcValidate(strField,strFieldLimitation)
{
	if(!strField) return false;
	var Chars = strFieldLimitation
	
	for (var i = 0; i < strField.length; i++)
	{
		if (Chars.indexOf(strField.charAt(i)) == -1)
		{
			alert("Please enter number field");
			return false;
		}
	}	
}
//************************************************************************************************
function defaultFocus()
{
	if (document.forms[0][0])
			document.forms[0][0].focus();
}
