<!--
function mailpage(subject, title, url)
{
  mail_str = "mailto:?subject=" + subject;
  mail_str += "&body=Your friend or colleague recommends the '" + title + "' from Startech Telecommunications.";
  mail_str += "You should check this out at " + url; 
  location.href = mail_str;
}

function bookmark(url, description) {
  netscape = "Netscape User's hit CTRL+D to add a bookmark to this site."
  if (navigator.appName=='Microsoft Internet Explorer') {
    window.external.AddFavorite(url, description);
  } else if (navigator.appName=='Netscape') {
    alert(netscape);
  }
}

function popup(url, name, w, h, scrollable, resizable) {
  var winl = (screen.width - w) / 2;
  var wint = (screen.height - h) / 2;
  winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollable+',resizable='+resizable;
  win = window.open(url, name, winprops)
  if (parseInt(navigator.appVersion) >= 4) {
    win.window.focus();
  }
}

function logoutPrompt() {
  if (confirm("Are you sure you want to end your session?")) {
    return true;
  } else {
    return false;
  }
}

function toggle_submenu(targetId) {
  target = document.all(targetId);
  if (target.style.display == "none"){
    target.style.display="";
  } else {
    target.style.display="none";
  }
}

function verify_captcha(form) {
  var xmlHttp;
  try {
    // Firefox, Opera 8.0+, Safari
    xmlHttp = new XMLHttpRequest();
  } catch (e) {
    // Internet Explorer
    try {
      xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
    } catch (e) {
      try {
        xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
      } catch (e) {
        alert("Your browser does not support AJAX!");
        return false;
      }
    }
  }
  xmlHttp.onreadystatechange = function() {
    if (xmlHttp.readyState == 4) {
      var retval = xmlHttp.responseText;
      if (retval.indexOf("match") != -1) {
	    document.getElementById("autherror").innerHTML = "&nbsp;";
	    form.submit();
      } else {
	    document.getElementById("autherror").innerHTML="<font face=\"Arial\" size=\"2\" color=\"#ff0000\"><b>The Code that you entered is not the correct code from the Verification Image</b></font>";
	  }
	}
  }
  xmlHttp.open("GET", "http://www.startechtel.com/includes/verifycaptcha.php?authcode=" + form.authcode.value, true);
  xmlHttp.send(null);
}
// -->
