 var isIE = ((document.all)?(true):(false));

 var _childnode = (isIE) ? "0" : "1";
 var kep_effekt = 1;
 var kep_effekt_eng = 1;
 var menu_open = '';
 var menu_working = 0;
 var popup_on = 0;

  function getElementHeight(Elem) {
	if(document.getElementById) {
		var elem = document.getElementById(Elem);
	} else if (document.all){
		var elem = document.all[Elem];
	}
	yPos = elem.offsetHeight;
	return yPos;
  }

  function getElementWidth(Elem) {
	if(document.getElementById) {
		var elem = document.getElementById(Elem);
	} else if (document.all){
		var elem = document.all[Elem];
	}
	yPos = elem.offsetWidth;
	return yPos;
  }
  
  function StopFunctions() {
//  	document.getElementById('flash').style.display = 'none';
  }
  
  function StartFunctions() {
//  	document.getElementById('flash').style.display = '';
  }
  
  function wheel_on(event){
    var delta = 0;
	var irany = 0;
	if(popup_on) {
	    if (!event) /* For IE. */
	            event = window.event;
	    if (event.wheelDelta) { /* IE/Opera. */
	            delta = event.wheelDelta/120;
	            if (window.opera)
	                    delta = -delta;
	    } else if (event.detail) { /** Mozilla case. */
	            delta = -event.detail/3;
	    }
	    if (event.preventDefault)
	            event.preventDefault();
	}
	event.returnValue = false;
  }

function ShowPopup(_width) {
	popup_on = 1;
  	var div = document.getElementById('pop_up');
  	var div2 = document.getElementById('popup_bg');
  	div.style.display='block';
  	div2.style.display='block';
	div2.style.width=clientWidth+'px';
	div2.style.height=myHeight+'px';
	div.style.left = ((clientWidth-_width)/2)+'px';
	ShowHidePU_Item(0, 70, "popup_bg");  			
	setTimeout("ShowPopup2()",'200');	
}

function ShowPopup2() {
	var height = getElementHeight('pop_up');
	if(height > 25) {
		document.getElementById('pop_up').style.top = ((clientHeight-height)/2)+'px';
	}
	else setTimeout("ShowPopup2()",'200');
}

function HidePopup() {
	popup_on = 0;
  	var div = document.getElementById('pop_up');
  	var div2 = document.getElementById('popup_bg');
  	div.style.display='none';
	ShowHidePU_Item(90, 0, "popup_bg");  			
}

function getScrollY() {
  var scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
  }
  return scrOfY;
}


