var Mtop = 0;
var Mleft = 0;

function mymouse(){
Mtop = event.clientY;
Mleft = event.clientX;
//window.status = window.location.pathname;
//if(1==2 && window.location.pathname != ThisPath + '/index.php' && window.location.pathname != ThisPath + '/')window.status = Mtop + ' x ' + Mleft;//window.location.pathname + ': ' + 
}


function mykey(){
//alert(event.keyCode);
if(event.ctrlKey && (IE || O) && event.keyCode == "90")//(IE || O) && 26
	window.scrollBy(0, 100);
if(event.ctrlKey && (IE || O) && event.keyCode == "88")//24
	window.scrollBy(0, -100);
if(event.altKey && event.keyCode == 81)alert(document.cookie);
if(event.altKey && event.keyCode == 83 && window.location.pathname.indexOf('.')==-1){
	//window.location = '';//'index.php?page=' + PAGE + '&admin=' + (REGESTRATION > 0 ? 0 : 1);
	var splitpathname = window.location.pathname.split("/");
	//alert(window.location.protocol + "//" + window.location.host + "/" + splitpathname[1] + "/" + PAGE + "/admin:" + (REGESTRATION > 0 ? 0 : 1));
	window.location = window.location.protocol + "//" + window.location.host + "/" + splitpathname[1] + "/" + PAGE + "/admin:" + (REGESTRATION > 0 ? 0 : 1);
}
if(event.ctrlKey && event.keyCode == "13"){
	var smsform = elem('sms_form') ? elem('sms_form').style.left : "-100px";
	smsform = 1 * smsform.substr(0, smsform.length - 2);	
	if(smsform > 0)
		smssending();
}
}

function positionmenu(){
if(elem('MenuArticle'))
	elem('MenuArticle').style.left = -500;
}
document.onmousemove = mymouse;
document.onkeydown = mykey;
document.onclick = positionmenu;

