// check IE version
function getInternetExplorerVersion()
// Returns the version of Internet Explorer or a -1
// (indicating the use of another browser).
{
  var rv = -1; // Return value assumes failure.
  if (navigator.appName=='Microsoft Internet Explorer')
  {
    var ua=navigator.userAgent;
    var re=new RegExp("MSIE ([0-9]{1,}[\.0-9]{0,})");
    if (re.exec(ua) != null)
      rv=parseFloat( RegExp.$1 );
  }
  return rv;
}

// we need a hack because of what stupid IE7 did to 'prompt'
function ie_prompt(str) {
  var settings="dialogWidth:300px; dialogHeight:200px; center:yes; edge:raised; scroll:no; status:no;";
  return window.showModalDialog("http://www.outandaboutlb.org/include/ie7_prompt.html", str, settings);
}

// wrap the prompt hack 
function cb_prompt(str) {
  var ver=getInternetExplorerVersion();
  try {
    if (ver>=7) {
      return ie_prompt(str);
    }
    else {
      return prompt(str, "");
    }
  }
  catch (e) { 
    return false; 
  }
}

