function openWin(url,wx,wy,wname,scroll) {
	px = (screen.width  - wx) / 2;
	py = (screen.height - wy) / 2;
	subWin = window.open(url,"" + wname + "", "location=no,menubar=no,resizable=no,scrollbars=" + scroll + ",status=no,toolbar=no,left=" + px + ",top=" + py + ",width=" + wx + ",height=" + wy + "");
	subWin.focus();
}


  function popup_window( url, id, width, height )
  {
    var tempvar=document.location.toString();
    var passedparams = tempvar.lastIndexOf("?");
    if(passedparams > -1)
      url += tempvar.substring(passedparams);
    popup = window.open( url, id, 'toolbar=no,scrollbars=no,location=no,statusbar=no,menubar=no,resizable=no,width=' + width + ',height=' + height + '' );
    popup.focus();
  }


var browserName=navigator.appName;
if (browserName=="Netscape")
{
   function closeWindow()
   {
     window.open('','_parent','');
     window.close();
   }
}
else
{
  if (browserName=="Microsoft Internet Explorer")
  {
     function closeWindow()
     {
        window.opener = "whocares";
        window.close();
     }
  }
}
function displayUrlNewWindow(url, width, height, displayToolbars, displayScrollbars, resizable) {
   var properties = "width=" + width + ",height=" + height;
   properties += ",location,directories,status,menubar,copyhistory";
   if (displayToolbars) properties += ",toolbar";
   if (displayScrollbars) properties += ",scrollbars";
   if (resizable) properties += ",resizable";
   window.open(url, "_blank", properties);
}
function displayUrlSameWindow(url) {
   window.open(url, "_self");
}
function displayUrlOtherWindow(url, otherWindow) {
   window.open(url, otherWindow);
}
function sendEmail(address, subject, body) {
   var first = true;
   var href = "mailto:" + address;
   if (subject!=""){ href += "?subject=" + escape(subject); first = false; }
   if (body!=""){
      if (first) {href += "?";} else {href += "&";}
      href += "body=" + escape(body); first = false;
   }
   window.location.href = href;
}
function getParameters_(queryString)
{
  if(queryString==null)
  return "";
  var querySubstr = "";
  if(queryString.length>1)
  querySubstr = queryString.substring(1, queryString.length);
  querySubstr = querySubstr.replace("&", "%26");
  return querySubstr;
}
function getParameters()
{
  var par = getParameters_(window.location.search);
  return par;
}
