/* $Id: openw.js,v 1.1.2.8 2006/07/31 16:34:48 strouchelle Exp $ */

function openWindow(url, width, height) {
  fun = window.open(url+"&width="+width+"&height="+height,'License','width='+width+',height='+height+',scrollbars=no,resizable=yes');
  if (fun)
    fun.focus();
}

function openURL(url, width, height) {
  fun = window.open(url,'Window','width='+width+',height='+height+',scrollbars=yes,resizable=yes');
  if (fun)
    fun.focus();
}


function openPopup( url, name, widgets, openerUrl ) {
  var host = location.hostname;
  var popupWin = window.open( url, name, widgets );

  if ( popupWin && popupWin.opener ) {
    if ( openerUrl ) {
      popupWin.opener.location = openerUrl;
      popupWin.focus();
    }
    popupWin.opener.top.name = "opener";
  }
}

function closePopupWarn () {
  document.getElementById('popupwarn').display = 'none';
  document.getElementById('popupwarn').style.visibility = 'hidden';
}

var isIE;

if (parseInt(navigator.appVersion.charAt(0)) >= 4){
  isIE = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0; 
}

function mouseX (evt) {
  if (evt.pageX) return evt.pageX;
  else if (evt.clientX)
  return evt.clientX + (document.documentElement.scrollLeft ?
  document.documentElement.scrollLeft :
  document.body.scrollLeft);
  else return null;
}

function mouseY(evt) {
  if (evt.pageY) return evt.pageY;
  else if (evt.clientY)
  return evt.clientY + (document.documentElement.scrollTop ?
  document.documentElement.scrollTop :
  document.body.scrollTop);
  else return null;
}

/* OpenLink in 860x400 window */

function OpenLink860x400(val) {
 if (val) {
  var myWin = window.open(val, "_blank",
      "height=400,width=860,location=yes,menubar=yes,resizable=yes,scrollbars=yes,status=yes,titlebar=yes,toolbar=yes");
 }
 return false;
}

