//var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
var dataModified=0;
// Handle all the the FSCommand messages in a Flash movie
/*function flashHeader_DoFSCommand(command, args)
{
var flashHeaderObj = InternetExplorer ? flashHeader : document.flashHeader;
isModified(args);
}
// Flash fsCommand Hook for Internet Explorer
if (navigator.appName &&
navigator.appName.indexOf("Microsoft") != -1 &&
navigator.userAgent.indexOf("Windows") != -1 &&
navigator.userAgent.indexOf("Windows 3.1") == -1)
{
document.write(' \n');
}
*/
function openLocationDetails() {
if (!document.classForm.siteRoomID.value) {
alert('Please select a location.');
} else {
window.open('admin/sup_site_detail_view.php?siteRoomID='+document.classForm.siteRoomID.value, 'remote', 'height=600,width=600,screenX=50,left=50,screenY=10,top=10,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0');
}
}
// check if page data has been modified
function isModified(URL) {
if(dataModified) {
if(!confirm("You have modified this page and have not saved your changes.\nClick Ok to continue without saving your changes\nor Cancel to return to this page."))
return false;
}
if(!URL) return true;
switch(URL) {
case "main":
location.href="index.php";
break;
case "inservice":
location.href="index.php?page=course/index.php";
break;
case "calendar":
calURL = "index.php?page=calendar/index.php"; location.href=calURL;
break;
case "resource":
location.href="index.php?page=resource/index.php";
break;
case "help":
location.href="index.php?page=help/index.php";
break;
default:
location.href=URL;
}
}
// sets page status to modified
function setModified() {
if(!dataModified) {
dataModified=1;
document.title+=" * [Modified]";
}
}
function openSupplyTeacherCalendar(year, month) {
window.open('admin/sup_supply_teacher_calendar.php?intYear='+year+'&intMonth='+month, 'remote', 'height=300,width=280,screenX=50,left=50,screenY=10,top=10,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0');
}
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g,'');
if(isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num*100+0.50000000001);
cents = num%100;
num = Math.floor(num/100).toString();
if(cents<10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++)
num = num.substring(0,num.length-(4*i+3))+','+
num.substring(num.length-(4*i+3));
return (((sign)?'':'-') + num + '.' + cents);
}
function setDateActiveToToday(theYear, theMonth, theDay) {
document.classForm.date_active_year.value = theYear;
document.classForm.date_active_month.value = theMonth;
document.classForm.date_active_day.value = theDay;
}
function tableEvenRows(tableID, start, lessMax, className) {
var tab = document.getElementById(tableID);
if(tab) {
var rows = tab.rows;
var evenRow=1;
for(i=start;i