var jobsQueue=0; var isListening=false; var isHover=true; function ShrinkGrow(element,event) { var posWithin=false; try {posWithin=Position.within(element,event.clientX,event.clientY)} catch(e) {} if ((posWithin) && (!isHover)) {isHover=true;new Effect.Appear('iboxcontent');} if ((!posWithin) && (isHover)) {isHover=false;new Effect.Fade('iboxcontent');} } function loadInit() { triggerChain(); } function fixizeDiv(div) {} function relativizeDiv(div) {} function triggerChain() { Ajax.Responders.register({onCreate:aCreate,onComplete:aComplete,onFailure:aFailure}); new Ajax.Updater("header","/usages/divhf.php",{method:"post",parameters:"d=h",evalScripts:true}); new Ajax.Updater("footer","/usages/divhf.php",{method:"post",parameters:"d=f&p="+encodeURIComponent('USA Grade Entry System'),evalScripts:true}); new Ajax.Updater("sidebar","/usages/divhf.php",{method:"post",parameters:"d=s",evalScripts:true}); new Ajax.Updater("authdiv","/usages/authform.php",{method:"post",evalScripts:true}); } function setStatusTop() { $("statusbox").style.top=jt_scrollTop()+"px"; } function displayStatus(jq) { var div=$("statusbox"); if (jq>0) { var s='Loading ... '; if (jq>1) s+='
'+jq+' job(s) pending.'; var contents='
'+s+'
'; var leftMargin=0; var winW=jt_winW(); div.innerHTML=contents; div.style.display="block"; div.style.visibility="visible"; div.style.top=jt_scrollTop()+"px"; div.style.left=(winW-div.offsetWidth-leftMargin)+"px"; while ((div.style.left.replace('px','')/1+div.offsetWidth+leftMargin)>winW) { div.style.left=(winW-div.offsetWidth-leftMargin)+"px"; } // note:: firefox does not add same listener more than once, but IE does, hence the checking if (!isListening) { isListening=true; jt_AddListener(window,"scroll",setStatusTop); } } else { div.style.visibility="hidden"; div.style.display="none"; div.innerHTML=""; isListening=false; jt_RemListener(window,"scroll",setStatusTop); } } //normal sequence: create,loading,loaded,interactive,complete function aCreate() { jobsQueue++; displayStatus(jobsQueue); enableControls($("xform"),false); // prototype enabling/disabling forms is too slow } function aFailure() {alert('An unknown error has occured.')} function aComplete() { jobsQueue--; displayStatus(jobsQueue); enableControls($("xform"),true); // prototype enabling/disabling forms is too slow } function submitFeedback(f) { var emailaddy=$("emailaddy").value||""; var message=$("message").value||""; if ((emailaddy) && (message)) { var params=Form.serialize(f); new Ajax.Updater("authmsg","/usages/feedback.php",{method:"post",parameters:params,evalScripts:true}); } else { if (!emailaddy) MyAppAlert("Please enter something for your email address."); else if (!message) MyAppAlert("Please enter something for your message."); } return false; } function confirmUnload() { if (jobsQueue>0) { return "You have pending updates. If you navigate away from this page, you might lose any unsaved data."; } } function returnToParent() { history.back(); }document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write(''); document.write('
'); document.write(''); document.write('
'); document.write('
'); document.write('
'); document.write(''); window.onload=loadInit; window.onbeforeunload=confirmUnload;