function openPopUP(page) {
	msg = window.open(page,'PopUp','width=555,height=590,directories=no,location=no,menubar=no,scrollbars=yes,resizable=no,status=no,toolbar=no,systemmenu=no');
	msg.focus();
}

function openPopUPError(page) {
	msg = window.open(page,'PopUpError','width=600,height=555,directories=no,location=no,menubar=no,scrollbars=yes,resizable=no,status=no,toolbar=no,systemmenu=no');
	msg.focus();
}

function openPicture(page) {
	msg = window.open(page,'Pcitre','width=600,height=555,directories=no,location=no,menubar=no,scrollbars=yes,resizable=yes,status=no,toolbar=no,systemmenu=no');
	msg.focus();
}

function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

function showHint(id) {
	document.getElementById(id).style.top = (findPosY(document.getElementById('gif'+id))-37)+'px';
	document.getElementById(id).style.left = (findPosX(document.getElementById('gif'+id))+10)+'px';
	document.getElementById(id).style.display = 'block';
}

function hideHint(id) {
	document.getElementById(id).style.display = 'none';
}

function showUpIfScrolled() {
	var obj = document.getElementById('button-up');
	if (obj) {
		if (navigator.appName == "Microsoft Internet Explorer") {
			if (document.body.clientHeight > getScreenSize()) {
				obj.style.display = 'inline';
			}
		}
		else {
			if(document.height > getScreenSize()) {
				obj.style.display = 'inline';
			}
		}
	}
}


function getScreenSize() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && document.documentElement.clientHeight ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && document.body.clientHeight ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}
