function getxWindowSize(){
	var myWidth = 0;
	if (typeof(window.innerWidth) == 'number') {
		myWidth = window.innerWidth;
	} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		myWidth = document.documentElement.clientWidth;
	} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
		myWidth = document.body.clientWidth;
	}
	return myWidth;
}

function getyWindowSize(){
	var myHeight = 0;
	if (typeof(window.innerWidth) == 'number') {
		myHeight = window.innerHeight;
	} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
		myHeight = document.documentElement.clientHeight;
	} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
		myHeight = document.body.clientHeight;
	}
	return myHeight;
}

function getyScroll(){
	var yScroll = 0;
	if (window.innerHeight && window.scrollMaxY || window.innerWidth && window.scrollMaxX){
		yScroll = window.innerHeight + window.scrollMaxY;
		var deff = document.documentElement;
		var hff = (deff&&deff.clientHeight) || document.body.clientHeight || window.innerHeight || self.innerHeight;
		yScroll -= (window.innerHeight - hff);
	} else if (document.body.scrollHeight > document.body.offsetHeight || document.body.scrollWidth > document.body.offsetWidth){
		yScroll = document.body.scrollHeight;
	} else {
		yScroll = document.body.offsetHeight;
	}
	return yScroll;
}

function getxScroll(){
	var xScroll = 0;
	if (window.innerHeight && window.scrollMaxY || window.innerWidth && window.scrollMaxX){
		xScroll = window.innerWidth + window.scrollMaxX;
		var deff = document.documentElement;
		var wff = (deff&&deff.clientWidth) || document.body.clientWidth || window.innerWidth || self.innerWidth;
		xScroll -= (window.innerWidth - wff);
	} else if (document.body.scrollHeight > document.body.offsetHeight || document.body.scrollWidth > document.body.offsetWidth) {
    xScroll = document.body.scrollWidth;
	} else {
		xScroll = document.body.offsetWidth;
	}
	return xScroll;
}

function showForgotPasswordForm(){
	scroll(0,0);
	$('forgotPasswordForm').style.left = getxWindowSize()/2 - 250 + 'px';
	$('forgotPasswordForm').style.top = getyWindowSize()/2 - 140 + 'px';
	$('forgotPasswordForm').style.display = 'block';
	$('forgotPasswordFormScreen').style.display = 'block';
	$('forgotPasswordFormScreen').style.height = getyScroll() + 'px';
	$('forgotPasswordFormScreen').style.width = getxScroll() + 'px';
 }

function hideForgotPasswordForm(){
	$('forgotPasswordForm').style.display = 'none';
	$('forgotPasswordFormScreen').style.display = 'none';
}
