/* site_functions.js
 * put site specific javascript functions here
 * is already included in header.tpl
 */
 //<!--      

function isNumberKey(evt) {
   var charCode = (evt.which) ? evt.which : event.keyCode
   if (charCode > 31 && (charCode < 48 || charCode > 57))
      return false;

   return true;
}

function popup(sPicURL,width,height) { 
    window.open(sPicURL, "", "resizable=1,HEIGHT=" + height + ",WIDTH=" + width); 
}

function updateTabNav(tabName){
    var tabNavImg = document.getElementById("tabNav");
    tabNavImg.src = "images/buttons/tabNav_" + tabName + ".gif";
}

function resetTabNav(selectedTab){
    var tabNavImg = document.getElementById("tabNav");
    if(selectedTab != ''){
        tabNavImg.src = "images/buttons/tabNav_" + selectedTab + ".gif";
    } else {
        tabNavImg.src = "images/buttons/tabNav_ini.gif";
    }
}

// USER TYPES EMAIL INTO FORM AND USES THIS FUNCTION TO REDIRECT TO A 'SEND PASSWORD TO MY EMAIL' PAGE
function requestpass(){
    var e = document.login.email.value;
    if(e == ""){
        alert("Please enter your email in the box and try again.");
        
    } else {
        uri = "actions/forgot_password.php?email=" + e;
        top.location.replace(uri);
    }
}

//-->