var isIE = document.all?true:false;
var isNS = document.layers?true:false;

function ShowCategories()
{
	var hwnd;
	hwnd = window.open("/globalmanager/categories/popupcategories.php","Categories", "toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width=450,height=250");
	hwnd.focus();
}
function ShowProducts()
{
	var hwnd;
	hwnd = window.open("/globalmanager/products/popupproducts.php","Products", "toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width=760,height=450");
	hwnd.focus();
}
function ShowReleases()
{
	var hwnd;
	hwnd = window.open("/globalmanager/press/popupreleases.php","PressReleases", "toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width=760,height=450");
	hwnd.focus();
}
function ShowNews()
{
	var hwnd;
	hwnd = window.open("/globalmanager/news/popupnews.php","News", "toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width=760,height=450");
	hwnd.focus();
}
function ShowDefaultTexts()
{
	var hwnd;
	hwnd = window.open("/management/text/popupdefaulttext.php","Text", "toolbar=0,location=0,status=0,scrollbars=0,resizable=0,width=760,height=250");
	hwnd.focus();
}

function onlyDigits(e,decReq) 
{
	var key = (isIE) ? window.event.keyCode : e.which;
	var obj = (isIE) ? event.srcElement : e.target;
	var isNum = (key > 47 && key < 58) ? true:false;
	var dotOK = (key==46 && decReq=='decOK' && (obj.value.indexOf(".")<0 || obj.value.length==0)) ? true:false;
	if(key < 32)
	   return true;
	return (isNum || dotOK);
}

function CheckDigits(argVal, argString)
{
	if(isNaN(parseFloat(argVal)))
	{
		alert ('Please enter only digits in ' + argString);
    	return false;
  	}
  	else
  	{
  		return true;
  	}
}

