function oWin(theURL, Name, popW, popH, scroll) 
{
	var winleft = (screen.width - popW) / 2;
	var winUp = (screen.height - popH) / 2 - 100;
	winProp = 'width='+popW+',height='+popH+',left='+winleft+',top='+winUp+',scrollbars='+scroll+''
	Win = window.open(theURL, Name, winProp);
	if (parseInt(navigator.appVersion) >= 4) { Win.window.focus(); }
}

function getPos(oTarget)
{
	var oPos = {
		x: 0,
		y: 0
	};
	while (oTarget != document.body && oTarget != null)
	{
		oPos.y += oTarget.offsetTop;
		oPos.x += oTarget.offsetLeft;
		oTarget = oTarget.offsetParent;
	}
	return oPos;
}

function oDiv(divname)
{
	var oDiv = document.getElementById(divname);
	if (oDiv != null)
	{
		var oPosx
		var oPosy

		if(divname == 'dev')
		{
			oPosx = screen.width - 250;
			oPosy = screen.height / 2 - 200;
		}

		else
		{
			oPosx = (screen.width - popW) / 2;
			oPosy = (screen.height - popH) / 2 - 100;
		}
		oDiv.style.display = 'none';
		oDiv.style.left = oPosx + 'px';
		oDiv.style.top = oPosy + 'px';
		oDiv.style.display = 'block';
	}
}

function kDiv(divname)
{
	var oDiv = document.getElementById(divname);
	if (oDiv != null)
		oDiv.style.display = 'none';
}

var code = '';
function dev(evt)
{
    	var add = document.layers ? evt.which : document.all ? event.keyCode : document.getElementById ? evt.keyCode : 0;	
	code += add;
	if(code == '109686986' || code == '189686986')
	{
		oDiv('dev');
		code = '';
	}
	if(add == '46')
		code = '';

}

document.onkeydown = function(event) { dev(event); }