<!--
function checksubmit(submitbtn){
submitbtn.form.submit()
checksubmit=blocksubmit
return false
}

function blocksubmit(){
if (typeof formerrormsg!="undefined")
alert(formerrormsg)
return false
}

function open_window(url) {
popup = window.open(url,"popup","toolbar=0,location=0,directories=0,status=1,menubar=0,scrollbars=yes,resizable=yes,width=480,height=410");
    if (!popup.opener)
        popup.opener=self;
    popup.focus();
} 

function open_window2(url) {
popup = window.open(url,"popup","toolbar=1,location=0,directories=0,status=1,menubar=1,scrollbars=yes,resizable=yes,width=510,height=410");
popup.focus();
}

function openramosus(url, name, width, height)
{  popupWin = window.open(url,name,'width=' + width + ',height=' + height + ',scrollbars=yes,toolbar=no,resizable=yes,menubar=no,location=no,status=yes,screenX=50,screenY=50,top=50,left=50')
    if (!popupWin.opener)
        popupWin.opener=self;
    popupWin.focus();
}
function openpopup(url, name, width, height)
{  popupWin = window.open(url,name,'width=' + width + ',height=' + height + ',scrollBars=yes,toolbar=0,resizable=yes,location=0,status=0,screenX=50,screenY=50,top=50,left=50')
    if (!popupWin.opener)
        popupWin.opener=self;
    popupWin.focus();
}

function openpopup2(url, name, width, height, toolbar)
{  popupWin = window.open(url,name,'width=' + width + ',height=' + height + ',scrollBars=auto,toolbar='+toolbar+',resizable=yes,location=0,status=0,screenX=150,screenY=50,top=50,left=150')
    if (!popupWin.opener)
        popupWin.opener=self;
    popupWin.focus();
}


function openpopup3(mylink, name, percent, toolbar){
    var w = 650, h = 450; // default sizes
    var winleft = 50
    var winUp = 50
    if (window.screen) {
        w = window.screen.availWidth * percent / 100;
        h = window.screen.availHeight * percent * 1.5/ 100;
        winleft = (window.screen.availWidth - w) / 2;
        winUp = (window.screen.availHeight - h) / 2;
    }
    var href;
    if (typeof(mylink) == 'string')
       href=mylink;
    else
       href=mylink.href;
       
    popupWin3 = window.open(href,name,'width=' + w + ',height=' + h + ',scrollBars=yes,toolbar='+toolbar+',resizable=yes,location=0,status=0,screenX='+winleft+',screenY='+winUp+',top='+winUp+',left='+winleft+'')
    if (!popupWin3.opener)
        popupWin3.opener=self;
    popupWin3.focus();

}

/*ex. submitjs.inc*/
function setFocus() {
    if (document.activity)
    if (document.activity.elements[0].type == "text" || document.activity.elements[0].type == "textarea")
    document.activity.elements[0].focus();
}
var thechoice = null;
function checkresponse(form){
    var msg;
    var noErrors=true;
    if(thechoice==""||thechoice==null||thechoice=="0"){
    msg="Please choose an option\nfrom the dropdown box\nbefore clicking.";
        noErrors=false;}
    if(noErrors){
        return true;}
    else{
        alert(msg);
        return false;}
}
function checkselectstudent(form){
    var msg;
    var noErrors=true;
    if(thechoice==""||thechoice==null||thechoice=="0"){
    msg="You must select at least\none student's name\nbefore clicking.";
        noErrors=false;}
    if(noErrors){
        return true;}
    else{
        alert(msg);
        return false;}
}


function checkFaults(form){
if ((document.activity.theemail.value == "") || (document.activity.theemail.value == null)) { 
    if  (!confirm("You have not entered a return email address.\nWhile this is OK, are you sure that you have provided\nthe recipient of this message sufficient information\nto contact you if required?\n\nPress OK to send your message as is."))
        return false; 
        }        

}
// end hiding scripting -->

