function noop_c3() {}

function getScrollTop() {
	var scrollTop = 0;

	if (window.pageYOffset) {
		scrollTop = window.pageYOffset;
	}
	else if (window.document.documentElement && window.document.documentElement.scrollTop) {
		scrollTop = window.document.body.scrollTop;
	}
	else if (window.document.body) {
		scrollTop = window.document.body.scrollTop;
	}

	return scrollTop;
}

function getPosX(obj) {
	var curleft = 0;

	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;

	return curleft;
}

function getPosY(obj) {
	var curtop = 0;

	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;

	return curtop;
}

function getWindowHeight() {
	var myHeight = 0;

	if (document.body && document.body.clientHeight) {
		//IE 4 compatible
		myHeight = document.body.clientHeight;
	}
	else if (typeof(window.innerHeigth) == 'number') {
		//Non-IE
		myHeight = window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight) {
		//IE 6+ in 'standards compliant mode'
		myHeight = document.documentElement.clientHeight;
	}

	return myHeight;
}

function getWindowWidth() {
	var myWidth = 0;

	if (document.body && document.body.clientWidth) {
		//IE 4 compatible
		myWidth = document.body.clientWidth;
	}
	else if (typeof(window.innerWidth) == 'number') {
		//Non-IE
		myWidth = window.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientWidth) {
		//IE 6+ in 'standards compliant mode'
		myWidth = document.documentElement.clientWidth;
	}

	return myWidth;
}

function getBrowserVersion(){
  return navigator.appVersion.substring(0,1);
}

function checkBrowserName(name){
  if (navigator.userAgent.indexOf(name)>-1) {
    return true;
  }
  return false;
}

function changeRequestPage(obj) {
	document.location.href=pageArray[obj.value];
}

String.prototype.fillToLength = function(theLength, theFillValue) {
    var l = this.length;
    var n = this;
    for (var i = l; i < theLength; i++) {
        n = String(theFillValue) + n;
    }
    return n;
};
Number.prototype.fillToLength = function(theLength) {
    var nbr = new String(this);
    return nbr.fillToLength(theLength, "0");
};

Date.prototype.getFullDay = function() {
    var day = new Number(this.getDate());
    return day.fillToLength(2);
};

Date.prototype.getFullMonth = function() {
    var month = new Number(this.getMonth() + 1);
    return month.fillToLength(2);
};

function showMoHead(id) {
	$("head_mo_" + id).style.display = "block";
}

function hideMoHead(id) {
	$("head_mo_" + id).style.display = "none";
}

function initPage() {
	if (!Browser.Engine.trident) {
		$("noscroll_spacer").width = $("noscroll_spacer").width + 4;
	}

	reposElements();
//	if (document.all) $("scroll2_container").style.height=document.body.offsetHeight;
}


function reposElements() {
	setTimeout("reposElements()", 100);
	var newX = $("wrapper_lower").getPosition().x;
	$("noscroll_container").setStyles({display:"block", position:"absolute", left:newX});
}

