
function openWindow(surl,windowName,params) {
// We have to double-encode some URL strings to account for an IE bug where
// IE un-encodes the URL before passing it to this function. This line
// causes the function to un-encode the URL if the URL was double-encoded
// but was (correctly) passed without decoding by a sane browser.
  if (surl.indexOf('%2520') != -1) {
    surl = unescape(surl);
  }
  if (window.windowHandle && !windowHandle.closed) { // if window exists and not closed, close it
    if (window.windowHandle.name == windowName) windowHandle.close();
  }    
  windowHandle = window.open(surl,windowName,params);
}


