		var scope="global";
		
		<!-- Popup functions Begin
		
		function popUpMinimal(href,name,height,width){
		window.open(href,name, "menubar=no, status=no,height=" + height + ",width=" + width + ",scrollbars");
		}				
	
		function fitscreen(){
		window.moveTo(12,0);
		window.resizeTo(flashwidth,flashheight);
		}

		// End Popup Functions-->

	function goToURL(targetURL) {
		window.location = targetURL;
	}	
	
// Date/Time Finder (from the Javascript Source) Begins-->

function populate(objForm,selectIndex,selectedForm) {
	// Date time thingie for population	
	if (selectedForm == "startDate") {
		
		timeA = new Date(objForm.year.options[objForm.year.selectedIndex].text, objForm.month.options[objForm.month.selectedIndex].value,1);
		timeDifference = timeA - 86400000;
		timeB = new Date(timeDifference);
		var daysInMonth = timeB.getDate();
		for (var i = 0; i < objForm.day.length; i++) {
		objForm.day.options[0] = null;
		}
		for (var i = 0; i < daysInMonth; i++) {
		objForm.day.options[i] = new Option(i+1);
		}
		document.f1.day.options[0].selected = true;
		
	} else if (selectedForm == "endDate") {
	
		timeA = new Date(objForm.year.options[objForm.year2.selectedIndex].text, objForm.month.options[objForm.month2.selectedIndex].value,1);
		timeDifference = timeA - 86400000;
		timeB = new Date(timeDifference);
		var daysInMonth = timeB.getDate();
		for (var i = 0; i < objForm.day.length; i++) {
		objForm.day2.options[0] = null;
		}
		for (var i = 0; i < daysInMonth; i++) {
		objForm.day2.options[i] = new Option(i+1);
		}
		document.f1.day2.options[0].selected = true;
	
	}
}		
		
function getYears(targetElement) {

	// You can easily customize what years can be used
	var years = new Array(1997,1998,1999,2000,2001,2002,2003,2004,2005)

	for (var i = 0; i < document.f1.year.length; i++) {
	document.f1.year.options[0] = null;
	}
	timeC = new Date();
	currYear = timeC.getFullYear();
	for (var i = 0; i < years.length; i++) {
	document.f1.year.options[i] = new Option(years[i]);
	}
	document.f1.year.options[2].selected=true;
	}
	window.onLoad = getYears;


	// Date/Time Finder (from the Javascript Source) Ends-->
		
function openURL(formName, selectName) { 
	
	selInd = selectName.selectedIndex ;
	goURL = selectName.options[selInd].value ;
	top.location.href = goURL; 
	
	}

//--> 

function openURL2(formName, selectName) { 
	
	eval("selInd = document." + formName + "." + selectName + ".selectedIndex ;") ; 
	eval("goURL = document." + formName + "." + selectName + ".options[selInd].value;") ;
	top.location.href = goURL; 

	}		
	// onChange='openURL("userForm", "userFilter")'	
	
function confirmSubmit(confirmMessage){
// confirms your selection
	var agree=confirm(confirmMessage);
	if (agree)
		return true ;
	else
		return false ;
}
	
function checkSelectTitle(selected,formName,elementName){
// checks selection for an invalid request
		eval("formLocation = document." + formName);
		var valueCheck = eval("document." + formName + "." + elementName + ".value");
		if (valueCheck != selected) {
		formLocation.submit();
	return true ;	
	} else {
	return false ;
	}	
}	
function checkSelectTitlePopup(selected,formName,elementName,directory,fileName){
// checks selection for an invalid request
	eval("formLocation = document." + formName);
	var valueCheck = eval("document." + formName + "." + elementName + ".value");
	if (valueCheck != selected) {
		alert(form);
		window.open ('includes/modes/sections/' + directory + '/' + fileName + elementName.value, 'popup', 'height=400,width=500,scrollbars');
		window.name = 'opener';
	} else {
	return false ;
	}	
}	

function doPopup(directory, fileName) {
	window.open ('includes/modes/sections/' + directory + '/' + fileName, 'popup', 'height=400,width=500,scrollbars');
	window.name = 'opener';
}

function doPopupPulldown(directory, fileName) {
	eval ("formLocation = window.document." + fileName + ".value"); 
	if (formLocation == "title") {
	  return false ;
	}
	else {
	  window.open ('includes/modes/sections/' + directory + '/' + formLocation, 'popup', 'height=400,width=500,scrollbars');
	  window.name = 'opener';
	}
}
function doPopupLarge(directory, fileName) {
	window.open ('includes/modes/sections/' + directory + '/' + fileName, 'popup', 'height=500,width=575,scrollbars');
	window.name = 'opener';
}

function doPopupVariable(directory, fileName, height, width) {
	window.open ('includes/modes/sections/' + directory + '/' + fileName, 'popup', 'height=' + height +' width=' + width + ',scrollbars,resizable');
	window.name = 'variable';
}

function hide(div) {
	<!-- surprisingly, Netscape syntax works in both IE6 and Mozilla -->
	document.getElementById(div).style.visibility='hidden';
}

function unhide(div) {
	<!-- surprisingly, Netscape syntax works in both IE6 and Mozilla -->
	document.getElementById(div).style.visibility='visible';
}
function move(fbox, tbox) {
	var arrFbox = new Array();
	var arrTbox = new Array();
	var arrLookup = new Array();
	var i;
	for (i = 0; i < tbox.options.length; i++) {
		arrLookup[tbox.options[i].text] = tbox.options[i].value;
		arrTbox[i] = tbox.options[i].text;
	}
	var fLength = 0;
	var tLength = arrTbox.length;
	for (i = 0; i < fbox.options.length; i++) {
		arrLookup[fbox.options[i].text] = fbox.options[i].value;
		if (fbox.options[i].selected && fbox.options[i].value != "") {
			arrTbox[tLength] = fbox.options[i].text;
			tLength++;
		}
		else {
			arrFbox[fLength] = fbox.options[i].text;
			fLength++;
   		}
	}
	arrFbox.sort();
	arrTbox.sort();
	fbox.length = 0;
	tbox.length = 0;
	var c;
	for (c = 0; c < arrFbox.length; c++) {
		var no = new Option();
		no.value = arrLookup[arrFbox[c]];
		no.text = arrFbox[c];
		fbox[c] = no;
	}
	for (c = 0; c < arrTbox.length; c++) {
		var no = new Option();
		no.value = arrLookup[arrTbox[c]];
		no.text = arrTbox[c];
		tbox[c] = no;
   	}
}
function reportMultiple() {
	var permissions = new Array() ;
	var the_select = window.document.combo_box.list2;
	for (loop=0; loop < the_select.options.length; loop++) {
		permissions [loop] = the_select.options[loop].value;
	}
	window.document.combo_box.toSubmitArray.value = permissions;  	
 	return true;
}

function submitMonthYear() {
  document.monthYear.method = "post";
  document.monthYear.action = "index.php?mode=home&section=calendar&month=" + document.monthYear.month.value + "&day=" + document.monthYear.day.value + "&year=" + document.monthYear.year.value;
  document.monthYear.submit();
}

function changetext(o, newText){
  if(document.getElementById)document.getElementById(o).innerHTML=newText;
  else if(document.all)document.all(o).innerHTML=newText;
  else if(document.layers)document.layers[o].document.write(newText);
  document.close();
}

function newWindowForm() {
  var popUp = window.open ('','popUp','height=600,width=850,scrollbars');
  document.scheduleMeeting.target = 'popUp';
}

function checkAll(check) {
    for (i=0;i<25;i++) {
		if (check == 'toggle') {
			document.forms[0].elements[i].checked =
			!document.forms[0].elements[i].checked ;
		} // end if toggle
		else {
			if (check == 'true') {
         		document.forms[0].elements[i].checked=true;
         	} // end check = true
      		else {
         		document.forms[0].elements[i].checked=false;
			} // else not check = true
		} // else not toggle
    } // end for loop
	return false;
} // end checkAll



function getMouseXY(e, XorY) {
	// Main function to retrieve mouse x-y pos.  Orientation variable defines
	// Requires EVENT, which is variable 'e'
	
// Detect if the browser is IE or not.
	// If it is not IE, we assume that the browser is NS.
	var IE = document.all?true:false

	// If NS -- that is, !IE -- then set up for mouse capture
	if (!IE) document.captureEvents(Event.MOUSEMOVE)
	
	var tempX = 0;
	var tempY = 0;

if (IE) { // grab the x-y pos.s if browser is IE
    tempX = event.clientX + document.body.scrollLeft
    tempY = event.clientY + document.body.scrollTop
  } else {  // grab the x-y pos.s if browser is NS
    tempX = e.pageX
    tempY = e.pageY
  }  
  // catch possible negative values in NS4
  if (tempX < 0){tempX = 0;}
  if (tempY < 0){tempY = 0;}  
  // show the position values in the form named Show
  // in the text fields named MouseX and MouseY

  // filter result for X or Y
  if ( XorY == 'x') { 
  	return tempX;
  } else { 
	return tempY;
  }

}

// FUNCTION transferInnerHTML --------------------------------------------------------------------------
function transferInnerHTML (sourceDIV, destinationDIV){
	// Get Contents of Source Div
	var temporaryContentHTML = sourceDIV.innerHTML;
	sourceDIV.innerHTML = '';
	destinationDIV.innerHTML = temporaryContentHTML;
}

// FUNCTION writeError --------------------------------------------------------------------------
function writeError (sourceDIV, message){
	// Get Contents of Source Div
	var formattedMessage = message + '<br>';
	
	sourceDIV.innerHTML = sourceDIV.innerHTML + formattedMessage;
}

// FUNCTION validate --------------------------------------------------------------------------
// Validates an input type based on type, copntent
function validate (type, elementToValidate, errorMessage, errorDiv){
	
	switch(type)
	{
	case 'isNotEmpty':
		// Validation for a "not empty" field
	  	if (elementToValidate != '' ) { return true; } else { writeError(errorDiv, errorMessage); return false;}
		break;
	  	
	case 'isValidEmailAddress':		
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;
		if (filter.test(elementToValidate)) { return true; } else { writeError(errorDiv, errorMessage); return false; }	
		break;

	case 'isValidURL':		
		var filter = /^(http:\/\/www.|https:\/\/www.|ftp:\/\/www.|www.){1}([\w]+)(.[\w]+){1,2}$/;
		if (filter.test(elementToValidate)) { return true; } else { writeError(errorDiv, errorMessage); return false; }	
		break;	
		
	default:
		return false;
	}
}

function clearTextField (foo) {
	foo.value='';
}


//-->
