function findPosX(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 IEH() {
		
	if( !window.opera && navigator.appName == "Microsoft Internet Explorer" ) IE = true; else IE = false;
	var nI = document.getElementById("mg").getElementsByTagName("li");	
	var mgI = document.getElementById("mg").getElementsByTagName("h2");
		
	for (var i=0; i<nI.length; i++) {
		
		nI[i].onmouseover=function() {
		 	
			this.className = "h";
				
			if (navigator.appName.indexOf("Explorer")!=-1) {	
				if (document.documentElement) {				
					plusX = document.documentElement.scrollLeft;
					docX = document.documentElement.offsetWidth + plusX;
				} else {					
					plusX = document.body.scrollLeft;
					docX = document.body.offsetWidth + plusX;
				}
			} else {
				docX = document.body.clientWidth;
			}
					
			pozycja = parseInt(findPosX(this))+150;	
				
			if( pozycja > docX ) {
				if( this.firstChild.nodeName == 'H2' ) {				
					if( IE ) {					
						this.childNodes.item(1).className = 'ie';					
					} else {
						this.childNodes.item(1).className = 't';					
					}
				}
			} else {			
				if( pozycja+150 > docX ) {				
					if( this.firstChild.nodeName == 'H2' ) {
						if( IE ) {					
							this.childNodes.item(1).className = 'ie_t';
						} else {
							this.childNodes.item(1).className = 't_t';					
						}
					}
				} else {				
					if( this.parentNode.parentNode.nodeName == 'DIV' ) this.childNodes.item(1).className = '';
				}
			}
		}
		 
		nI[i].onmouseout=function() {	 	
		 	this.className='';
		}
	}
}

function IEH2() {
	var nI = document.getElementById("mp").getElementsByTagName("li");
	
	for (var i=0; i<nI.length; i++){
		nI[i].onmouseover=function() {
			this.className+=" h";
		}
		
		nI[i].onmouseout=function() {
			this.className="";
		}
	}
}

function IEH3() {
	var nI=document.getElementById("pp_m").getElementsByTagName("li");
	for (var i=0; i<nI.length; i++){
	 nI[i].onmouseover=function(){this.className+=" h";}
	 nI[i].onmouseout=function(){this.className="";}}
}
