function login(showhide){
 if(showhide == "show"){
  document.getElementById('login').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
 } else if(showhide == "hide"){
  document.getElementById('login').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
 }
}

function check(showhide){
 if(showhide == "show"){
  document.getElementById('comp-check').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
 } else if(showhide == "hide"){
  document.getElementById('comp-check').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
 }
}

function forgot(showhide){
 if(showhide == "show"){
  document.getElementById('forgot').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
 } else if(showhide == "hide"){
  document.getElementById('forgot').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
 }
}

function register(showhide){
 if(showhide == "show"){
  document.getElementById('register').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
 } else if(showhide == "hide"){
  document.getElementById('register').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
 }
}

function retrieval(showhide){
 if(showhide == "show"){
  document.getElementById('retrieval').style.visibility="visible"; /* If the function is called with the variable 'show', show the login box */
 } else if(showhide == "hide"){
  document.getElementById('retrieval').style.visibility="hidden"; /* If the function is called with the variable 'hide', hide the login box */
 }
}


function jsNewWindow(jsTarget, jsWidth, jsHeight)
{
var winWidth = jsWidth;
var winHeight = jsHeight;
var winleft = 0;
var winTop = 0;
if (((winWidth == null) && (winHeight == null)) || ((winWidth == 0) && (winHeight == 0))) {
   if (screen) {
      winWidth = (screen.width - 100);
      winHeight = (screen.height - 150);
      winleft = (screen.width/2)-winWidth/2;
      winTop = (screen.height/2)-(winHeight+50)/2;
   }
}
   window.open(jsTarget,"","top="+winTop+",left="+winleft+",width=" + winWidth + ",height=" + winHeight + ",toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes");
}


function checkchars(cur){
  var maxlength=255
  if (cur.message.value.length>maxlength){
    alert("Please restrain your input to 255 characters or less.")
    return false
  }
}