/*

	var pageDiv = document.getElementById('page');	

	function getClientHeight() {
		return document.compatMode=='CSS1Compat' && !window.opera?document.documentElement.clientHeight:document.body.clientHeight;
	}


	window.onresize = function () {
		cW = getClientHeight();
	
		if(cW <= 1003) {
			pageDiv.style.paddingTop = 0;
			document.body.style.backgroundPosition = "center -100px";
		
			return false;
		}

		var toResize = (cW - 1003) / 2.77;
		
		if(toResize > 100)
			toResize = 100;
			
		toResize = (Math.round(toResize));

		document.body.style.backgroundPosition = "center -" + (100 - toResize) + "px";
		pageDiv.style.paddingTop = toResize + "px";
	}
	
	window.onload = window.onresize;
	
*/

	function removeClass( objNode, strCurrClass ) {
		replaceClass( objNode, '', strCurrClass );
	}

	function addClass( objNode, strNewClass ) {
		replaceClass( objNode, strNewClass, '' );
	}
	
	function replaceClass( objNode, strNewClass, strCurrClass ) {
		var strOldClass = strNewClass;
		if ( strCurrClass && strCurrClass.length ){
			strCurrClass = strCurrClass.replace( /\s+(\S)/g, '|$1' );
		
		if ( strOldClass.length ) strOldClass += '|';
			strOldClass += strCurrClass;
		}
	
		objNode.className = objNode.className.replace( new RegExp('(^|\\s+)(' + strOldClass + ')($|\\s+)', 'g'), '$1' );
		objNode.className += ( (objNode.className.length)? ' ' : '' ) + strNewClass;
	}
		
	(function () {
		var menuItems = document.getElementById('menu-second').childNodes;
	
		for (var i = 0; i < menuItems.length-1; i++) {
			menuItems[i].onmouseover = function () { addClass(this, "over"); }
			menuItems[i].onmouseout = function () { removeClass(this, "over"); }
		}
	})();
