document.onmousedown = rtclicknocopy

window.defaultStatus ="University of the Philippines in Iloilo High School Class of 1977" 

var mymessage = "PLEASE RESPECT INTELLECTUAL PROPERTY. The contents of this site, including the scripts, written materials, graphics and audio files, are COPYRIGHT PROTECTED. Please do not copy and post its contents, in part or in whole, on ANY commercial, non-profit, or personal website and other similar media. Thank you.";

// function rtclicknocopy(keyp){
//  if (navigator.appName == "Netscape" && keyp.which == 3) {
//    alert(mymessage);
//    return false;
//  }

//  if (navigator.appVersion.indexOf("MSIE") != -1 && event.button == 2) {
//    alert(mymessage);
//    return false;
//  }
//}

function newWindowPopUp(pagefile) {
	navWindow = window.open(pagefile, 'nav', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,top=40px,left=85px,width=600px,height=500px');
	navWindow.focus();
}			


function portraitWin(pagefile) {
	navWindow = window.open(pagefile, 'nav', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=yes,resizable=no,top=100px,left=178px,width=250px,height=400px')
	navWindow.focus()
}			

//global variable for error flag
var errFound = false;

// display an error alert and return to erroneous data
function errorAlert(elem, text) {
   // abort if we already found an error, one error handling at a time
   if (errFound) return;
   window.alert(text);
   elem.select();
   elem.focus();

   errFound = true;
}


// main validation function

// login form
function validAccessForm() {
   errFound = false;
   // blank
   if (!validBlank(document.accessForm.username.value))
      errorAlert(document.accessForm.username,"INVALID: Username must be specified");
   if (!validBlank(document.accessForm.password.value))
      errorAlert(document.accessForm.password,"INVALID: Password must be specified");
   return !errFound; /* true if there are no errors */
}


