﻿/** ENTER Keypress checkup function **/

function CheckEvent13(ev,func) {
	var isIE = false;
	if (navigator.appName.indexOf("Microsoft") > -1 || navigator.appName.indexOf("IE") > -1) {
		isIE = true;
	}
	if ((isIE && event.keyCode == 13) || (!isIE && ev.which == 13)) {
		if (isIE) {
			event.cancelBubble = true;
		} else {
			ev.preventDefault();
			ev.stopPropagation();
		}
		return func();
	}
}

/** login section **/
function restoreValue(inputAt)
{
	if(inputAt.value == "")
	{
		inputAt.value = inputAt.getAttribute('default');
	}
}

function checkValue(inputAt)
{
	if(inputAt.getAttribute('default') == inputAt.value)
	{
		inputAt.value="";	
	}
}


/** calculate the position of the loginBox **/
function changePosition(){
	var leftPosion= document.getElementById("mainT").offsetLeft;
	document.getElementById("loginBoxDiv").style.left = leftPosion+700+"px";
	document.getElementById("loginBoxDiv").style.top ="0px";
}

function changePositionHP(){
	var leftPosion= document.getElementById("mainT").offsetLeft;
	document.getElementById("loginBoxDiv").style.left = leftPosion+720+"px";
	document.getElementById("loginBoxDiv").style.top ="0px";
}