function MM_reloadPage(init) {  //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
alert('here');
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}

// 12/30/08 - added "display" version of above because using visibility shows random lines on page
function MM_displayHideLayers() { 
var i,p,v,obj,args=MM_displayHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'inline':(v=='hide')?'none':v; }
obj.display=v; }
}

function jumpMenu(strTarget, strSelectObject, intInitialOption){
	eval(strTarget + ".location='" + strSelectObject.options[strSelectObject.selectedIndex].value + "'");
	if (intInitialOption) strSelectObject.selectedIndex = 0;
}

function DisplayTimestamp() {
	var mydate=new Date();
	var year=mydate.getYear();
	if (year < 1000){
		year+=1900;
	}
	var day=mydate.getDay();
	var month=mydate.getMonth();
	var daym=mydate.getDate();

	var hour = mydate.getHours();
	var minutes = mydate.getMinutes();
	var seconds = mydate.getSeconds();
	var meridian = "AM";

	if (hour > 12) {
		hour -= 12;
		meridian = "PM";
	}

	var time = hour + ":" + minutes + ":" + seconds + " " + meridian;

	if (daym<10)
	daym="0"+daym
	var dayarray=new Array("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday")
	var montharray=new Array("January","February","March","April","May","June","July","August","September","October","November","December")
	document.write("<small><font color='000000' face='Arial'>Today's Date: <b>"+dayarray[day]+", "+montharray[month]+" "+daym+", "+year+ " " + time + "</b></font></small>")
}
var OldElementID = "";

// the following script is specifically for the training registration page
	function UpdateSessionTimeValues(strValue, strOption, strDate) {
		
		var NewSelect, NewElementID, strNewElementStyle
		var arrOptions	= strOption.split("|");
		var arrValues	= strValue.split("|");
		
		NewElementID = "id_" + strDate;
		NewSelect = document.formClassReg.sessionID;
		  for (i = NewSelect.length; i > 0; i--) {
			NewSelect.options[i-1] = null;
		  }		
			for (i=0; i<arrOptions.length; i++) {
				NewSelect.options[i] = new Option(arrOptions[i], arrValues[i]);
			}
		document.formClassReg.sessionDate.value = strDate;
		if (OldElementID.length > 0){
			UpdateLastClicked()
		}
		document.getElementById(NewElementID).style.background='#FF0000';
		OldElementID = NewElementID;

	}

	function UpdateLastClicked(){
		document.getElementById(OldElementID).style.background='#FFFFFF';
	}

	function ShowReoccurDates(){
	var objForm = document.edit;
	var strValueID = objForm.reoccurID.selectedIndex;
	var intValue = parseInt(strValueID);
		if (strValueID > 0){
			if (intValue > 1 )  {
				document.getElementById('id_reoccurs_until').style.display='block';
			}
			else {
				document.getElementById('id_reoccurs_until').style.display='none';
			}
		}
		else {
				document.getElementById('id_reoccurs_until').style.display='none';
		}
	}

<!-- // load htmlarea
_editor_url = "/htmlarea/";                     // URL to htmlarea files
var win_ie_ver = parseFloat(navigator.appVersion.split("MSIE")[1]);
if (navigator.userAgent.indexOf('Mac')        >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Windows CE') >= 0) { win_ie_ver = 0; }
if (navigator.userAgent.indexOf('Opera')      >= 0) { win_ie_ver = 0; }
if (win_ie_ver >= 5.5) {
 document.write('<scr' + 'ipt src="' +_editor_url+ 'editor.js"');
 document.write(' language="Javascript1.2"></scr' + 'ipt>');  
} else { document.write('<scr'+'ipt>function editor_generate() { return false; }</scr'+'ipt>'); }
// -->

function InsertMovieObject(objMovie)
{
document.write('<object classid="clsid: 02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab" width="320" height="240">\n');
document.write('<param name="src" value="' + objMovie + '" />\n');
document.write('</object>\n');
}
