<!--
	function cusChkSurvey(f) {
				
		var i;
		var nam;
		var val;
				
		for(i=0;i<f.elements.length;i++) {
					
			nam = f.elements[i].name;
			val = f.elements[i].value;
				
			if((nam.indexOf('num') != -1)||(nam.indexOf('pct') != -1)) {
				if(isNaN(val) == true) {
					alert('This requires a numeric value.');
					f.elements[i].focus();
					return false;
				}//if()
			}//if()
					
		}//for()
				
	}//cusChkSurvey()
	
	//**********************************************************************
	// checkRequired()
	// author:	Paul Jodoin
	// date:	9/04/01, 6/14/02
	// purpose: Checks a form for required values
	// rules:	all spaces denoted with _ 
	//			must use a full description to define the missing field.	
	// mods:	added support for select list
	//**********************************************************************
	function checkRequired(form) {
		
		var i;
		var x;
		var validate;
		var element = new String();
		var field = new String();
		var output = new String();
		var spcArr = new Array();
			
		// initialize
		output = '';
			
		for(i = 0; i < form.elements.length; i++) {
			element = form.elements[i].name;
			// check for the existence of the options array
			
			switch(form.elements[i].type) {
				case 'select-one':
					if((element.indexOf('selReq') != -1)&&(form.elements[i].options[form.elements[i].selectedIndex].value == '')) {
						if(element.indexOf('selReq') != -1) {
							field = element.substr(6, element.length - 6);
						}
						spcArr = field.split('_');
						if(spcArr.length) {
							for(x = 0; x < spcArr.length; x++) {
								output += spcArr[x] + ' ';
							}//for()
							output = output.slice(0, output.length - 1);
						}
						else {
							output = field;
						}//if()
						alert('Please select ' + output + '.');
						form.elements[i].focus();
						return false;
					}//if()	
					break;
				case 'text':
					if((element.indexOf('txtReq') != -1)&&(form.elements[i].value == '')) {
						field = element.substr(6, element.length - 6);
						spcArr = field.split('_');
						if(spcArr.length) {
							for(x = 0; x < spcArr.length; x++) {
								output += spcArr[x] + ' ';
							}//for()
							output = output.slice(0, output.length - 1);
						}
						else {
							output = field;
						}//if()
						alert('Please enter ' + output + '.');
						form.elements[i].focus();
						return false;
					}//if()	
					break;
				case 'textarea':
					if((element.indexOf('txtReq') != -1)&&(form.elements[i].value == '')) {
						field = element.substr(6, element.length - 6);
						spcArr = field.split('_');
						if(spcArr.length) {
							for(x = 0; x < spcArr.length; x++) {
								output += spcArr[x] + ' ';
							}//for()
							output = output.slice(0, output.length - 1);
						}
						else {
							output = field;
						}//if()
						alert('Please enter ' + output + '.');
						form.elements[i].focus();
						return false;
					}//if()	
					break;
				case 'radio':
					if(element.indexOf('radReq') != -1) {
						validate = true;
						if(form.elements[element].length > 0) {
							for(x=0;x<form.elements[element].length;x++) {
								if(form.elements[element][x].checked == true) {
									validate = false;
								}//if()
							}//for()
						}
						else {
							if(form.elements[i].checked == true) {
								validate = false;
							}//if()
						}//if()
						if(validate == true) {
							field = element.substr(6, element.length - 6);
							spcArr = field.split('_');
							if(spcArr.length) {
								for(x = 0; x < spcArr.length; x++) {
									output += spcArr[x] + ' ';
								}//for()
								output = output.slice(0, output.length - 1);
							}
							else {
								output = field;
							}//if()
							alert('Please select a ' + output + '.');
							form.elements[i].focus();
							return false;
						}//if()
					}//if()	
					break;
				case 'checkbox':
					if(element.indexOf('chkReq') != -1) {
						validate = true;
						if(form.elements[element].length > 0) {
							for(x=0;x<form.elements[element].length;x++) {
								if(form.elements[element][x].checked == true) {
									validate = false;
								}//if()
							}//for()
						}
						else {
							if(form.elements[i].checked == true) {
								validate = false;
							}//if()
						}//if()
						if(validate == true) {
							field = element.substr(6, element.length - 6);
							spcArr = field.split('_');
							if(spcArr.length) {
								for(x = 0; x < spcArr.length; x++) {
									output += spcArr[x] + ' ';
								}//for()
								output = output.slice(0, output.length - 1);
							}
							else {
								output = field;
							}//if()
							alert('Please select a ' + output + '.');
							form.elements[i].focus();
							return false;
						}//if()
					}//if()	
					break;
				default:
					break;
			}//switch()
		}//for()
			
	}//checkRequired()

	
	//**********************************************************************
	// selectAll()
	// edited by:	Paul Jodoin
	// date:	02/13/02
	// purpose: selects all of the values in a multiple select box
	// rules:	full object name of select -- 
	//			ex: document.formName.selectName
	//**********************************************************************			
	function selectAll(listObj) {
		
		if(typeof listObj != 'undefined') {
			for (var i=0; i < listObj.length; i++) {  //select all of the items	on submit
				listObj.options[i].selected = true;
			}//next
		}//if()
				
	}//end function  
	
	//**********************************************************************
	// switchBox()
	// edited by:	Paul Jodoin
	// date:	02/13/02
	// purpose: moves values from one select box to another
	// rules:	name of the button pressed, full object name of select
	//			select source, full name of select target -- 
	//			ex: this, document.formName.selectName1, 
	//			document.formName.selectName2
	// dependencies: requires the checkBrowser() function
	//**********************************************************************			
	function switchBox(btn, listObj, targetObj)
		{
		
		var sBrowser = new String();
		var selectedItem;
		
		// grab the browser
		sBrowser = checkBrowser();
		
		// make sure something is selected		
		if(listObj.selectedIndex != -1) {
				
			// loop through once and send the items to the target
			for(var i =0;i < listObj.length;i++){
				if((listObj.options[i].selected) && (listObj.options[i].value != null)){
					selectedItem = listObj.options[i]; 
					targetObj.options[targetObj.length] = new Option(selectedItem.text, selectedItem.value);   //create new items in target select box
				}//end if
			}//next
			
			// clear the selected index	
			listObj.options[listObj.selectedIndex] = null;
				
			// be sure to do this last -- refresh Netscape 4 and less to resize select
			if((sBrowser.indexOf('nav')!=-1)&&(parseFloat(sBrowser)==4)) {
				history.go(0);
			}//end if 
					
		}//end if
						
	}//end function 
	
	//**********************************************************************
	// switchOne()
	// edited by:	Paul Jodoin
	// date:	02/15/02
	// purpose: moves values from one select box to another
	// rules:	name of the button pressed, full object name of select
	//			select source, full name of select target -- 
	//			ex: this, document.formName.selectName1, 
	//			document.formName.selectName2
	// dependencies: requires the checkBrowser() function
	//**********************************************************************			
	function switchOne(btn, listObj, targetObj)
		{
		
		var sBrowser = new String();
		var selectedItem;
		
		// grab the browser
		sBrowser = checkBrowser();
		
		// make sure something is selected		
		if((listObj.selectedIndex != -1)&&(targetObj.length == 0)) {
				
			// loop through once and send the items to the target
			for(var i=0;i < listObj.length;i++){
				if((listObj.options[i].selected) && (listObj.options[i].value != null)){
					selectedItem = listObj.options[i]; 
					targetObj.options[targetObj.length] = new Option(selectedItem.text, selectedItem.value);   //create new items in target select box
					break;
				}//end if
			}//next
			
			// clear the selected index
				
			listObj.options[i] = null;
			
			delSelected(listObj);
				
			// be sure to do this last -- refresh Netscape 4 and less to resize select
			if((sBrowser.indexOf('nav')!=-1)&&(parseFloat(sBrowser)==4)) {
				history.go(0);
			}//end if 
					
		}//end if
						
	}//end function 
				
	// this function will be modified to call the openDialog function
	function openWindow(url) {
		var Nav4 = ((navigator.appName == "Netscape") && (parseInt(navigator.appVersion) >= 4))
		var IE4 = ((navigator.appName == "Microsoft Internet Explorer") && (parseInt(navigator.appVersion) >= 4))
		// One object tracks the current modal dialog opened from this window.
		window.name = 'main';
		var win;
		var left;
		var top;
		var attr = new String();
				
		if(Nav4) {
			attr = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width=400,height=400,screenX=10,screenY=10';
		}
		else { 
			attr = 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width=400,height=400,top=10,left=10';
		}//if()
		if((!Nav4)&&(!IE4)) {
			win = window.open(url, 'win', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,width=400,height=400');
		}
		else {	
			win = window.open(url, 'win', attr);
		}//if()
	}//end function	
		
	
	//**********************************************************************
	// delSelected()
	// edited by:	Paul Jodoin
	// date:	02/13/02
	// purpose: deletes selected values from a select box
	// rules:	name of select -- ex: document.formName.selectName
	//**********************************************************************		
	function delSelected(listObj) {
		
		// loop through and delete	
		if(typeof listObj != 'undefined') {
			for( var i = listObj.length - 1; i >= 0; i-- ){
				if (listObj.options[i].selected == true) {
					listObj.options[i] = null;
				}//end if
			}//next
		}//if()
						
	}//end function
	
	
	//**********************************************************************
	// disableElement()
	// edited by:	Paul Jodoin
	// date:	10/14/03, 10/15/03, 10/29/03
	// purpose: disable a target element
	// rules:
	// edits: added support for the passed in string of named targets
	//**********************************************************************		
	
	function disableElement(element, form, disableList, enableList) {
		
		var y; //counter
		var x; //counter
	
		if(typeof form != 'undefined') {
			
			if(disableList != '') {
				disableList = disableList.split(',');
			}//if()
			
			if(enableList != '') {
				enableList = enableList.split(',');
			}//if()
			
			//disable elements
			for(y=0;y<disableList.length;y++) {
				
				if(form.elements[disableList[y]]) {	
				
					form.elements[disableList[y]].disabled = true;
					if(form.elements[disableList[y]].length > 0) {
						for(x=0;x<form.elements[disableList[y]].length;x++) {
							form.elements[disableList[y]][x].disabled = true;
						}//for()
					}//if()
				
				}//if()
						
			}//for()
			
			//enable elements
			for(y=0;y<enableList.length;y++) {
				
				if(form.elements[enableList[y]]) {
					
					if(form.elements[enableList[y]].length > 0) {
						for(x=0;x<form.elements[enableList[y]].length;x++) {
							form.elements[enableList[y]][x].disabled = false;
						}//for()
					} 
					else {
						form.elements[enableList[y]].disabled = false;
					}//if()
					
				}//if()
						
			}//for()
			
		}//if()

	}//disableElement()
	
	function closeWindow() {
		setTimeout('window.close()', 2000);
	}//closeWindow()
	

	//**********************************************************************
	// getCookie()
	// edited by:	James Kogut
	// date:	08/23/2004
	// purpose: checks for cookies
	//**********************************************************************	
	function getCookie() {
		
		var cookieStr = new String();
		var sOutStr = new String();
			
		// initialize
		sOutStr = '';
		cookieStr = document.cookie;
			
		if(cookieStr.indexOf('on')==-1) {
			sOutStr += '<font color=\"red\"><b>Warning!</b> We have detected that you may not have';
			sOutStr += ' cookies enabled in your browser settings.<br />Cookies are required to access';
			sOutStr += ' the functionality of this site. Please enable cookies in your browser';
			sOutStr += ' settings or upgrade your browser to a version that';
			sOutStr += ' supports cookies.</font>'
		}//if()		
			
		document.write(sOutStr);
			
	}//getCookie()
	
	//************************************************************************
	// edited by: Paul Jodoin
	// date: 2/14/2002	
	// purpose: return the browser and version in a string
	//************************************************************************
	function checkBrowser() {
			
		// the string browser type and the string to be returned
		var sBrowser = new String();
		sBrowser = '';
		
		// convert all characters to lowercase to simplify testing
		var agt = navigator.userAgent.toLowerCase();

		// *** BROWSER VERSION ***
		var is_major = parseInt(navigator.appVersion);
		var is_minor = parseFloat(navigator.appVersion);
			
		// ************************NETSCAPE***********************************
		// Note: Opera and WebTV spoof Navigator.  We do strict client detection.
		// If you want to allow spoofing, take out the tests for opera and webtv.
		var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
		            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
		            && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
			if(is_nav) {
				bIsNav = true;
				if(is_major == 2) { sBrowser = '2nav' };
				if(is_major == 3) { sBrowser = '3nav' };
				if(is_major == 4) { sBrowser = '4nav' };
				if(is_major == 5) { sBrowser = '6nav' };
			}//if()
			
		// ************************GECKO***********************************
		var is_gecko = (agt.indexOf('gecko') != -1);
			if(is_gecko) { sBrowser = 'gecko' };

		// ************************IE***********************************
		var is_ie = ((agt.indexOf('msie') != -1) && (agt.indexOf('opera') == -1));
			if(is_ie) {
				if(is_major < 4) { sBrowser = '3ie' };
				if((is_major == 4) && (agt.indexOf('msie 4')!=-1)) { sBrowser = '4ie' };
				if(is_major >= 4) { sBrowser = 'ie4up' };
				if((is_major == 4) && (agt.indexOf('msie 5.0')!=-1)) { sBrowser = '5ie' };
				if((is_major == 4) && (agt.indexOf('msie 5.5') !=-1)) { sBrowser = '5.5ie' };
				if((is_major == 4) && (agt.indexOf('msie 6')!=-1)) { sBrowser = '6ie'; };
			}//if()
	
		// ************************AOL***********************************
		// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
		// or if this is the first browser window opened.  Thus the
		// variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.	
		var is_aol = (agt.indexOf('aol') != -1);
			if(is_aol) {
				sBrowser = 'aol';
				//if(agt.indexOf('IE 3')) { sBrowser = '3aol' };
				//if(agt.indexOf('IE 4')) { sBrowser = '4aol' };
				if(agt.indexOf('aol 5') != -1) { sBrowser = '5aol' };
				if(agt.indexOf('aol 6') != -1) { sBrowser = '6aol' };
			}//if()

		// ************************OPERA*********************************
		var is_opera = (agt.indexOf('opera') != -1);
			if(is_opera){
				if((agt.indexOf('opera 2') != -1 || agt.indexOf('opera/2') != -1)) { sBrowser = '2opera' };
				if((agt.indexOf('opera 3') != -1 || agt.indexOf('opera/3') != -1)) { sBrowser = '3opera' };
				if((agt.indexOf('opera 4') != -1 || agt.indexOf('opera/4') != -1)) { sBrowser = '4opera' };
				if((agt.indexOf('opera 5') != -1 || agt.indexOf('opera/5') != -1)) { sBrowser = '5opera' };
			}//if()
			
		// ************************WEBTV*********************************
		var is_webtv = (agt.indexOf('webtv') != -1); 
			if(is_webtv) { sBrowser = 'webtv' };
			
		// ************************TVNAVIGATOR*********************************
		var is_TVNavigator = ((agt.indexOf('navio') != -1) || (agt.indexOf('navio_aoltv') != -1)); 
			if(is_TVNavigator) { sBrowser = 'TVNavigator' };
		var is_AOLTV = is_TVNavigator;
			if(is_AOLTV) { sBrowser = 'AOLTv' };
			
		// ************************HOTJAVA*********************************
		var is_hotjava = (agt.indexOf('hotjava') != -1);
			if(is_hotjava) {
				if(is_major == 3) { sBrowser = '3hotjava' };
			}//if()
				
		return sBrowser;
			
	}//checkBrowser()
	
	
	//*******************************
	//*******************************
	function PopUpWindow(sUrl, iWidth, iHeight)
	{
		var sWindowString;
		var dNew = new Date();
		var sRandName = dNew.getUTCMilliseconds();
		sRandName = sRandName.toString();

		sWindowString = "width=" + iWidth + ",height=" + iHeight + ",toolbar=1,scrollbars=yes,location=0,directories=0,status=0,menubar=0,resizable=yes";
		newWindow = window.open(sUrl, sRandName, sWindowString);
	}

	function PopUpCenterWindow(sUrl, iWidth, iHeight, sScroll)
	{
		var sWindowString;
		var dNew = new Date();
		var sRandName = dNew.getUTCMilliseconds();
		sRandName = sRandName.toString();

		var Xpos= (screen.availWidth - iWidth)/2;
		var Ypos= (screen.availHeight - iHeight)/2-10;

		if (sScroll == "")
			{
			sScroll = "no";
			}

		sWindowString = "width=" + iWidth + ",height=" + iHeight + ",screenX=" + Xpos + ",screenY="  + Ypos + ",toolbar=0,scrollbars=" + sScroll + ",location=0,directories=0,status=0,menubar=0,resizable=yes";
		newWindow = open(sUrl, sRandName, sWindowString);
		newWindow.moveTo(Xpos, Ypos);
		newWindow.location=sUrl;
	}

	function CenterWindow()
	{
		var Xpos= (screen.availWidth - 475)/2;
		var Ypos= (screen.availHeight - 750)/2;
		window.moveTo(Xpos, Ypos);
	}

	//**********************************************************************
	// hasClass(), stripe()
	// edited by: Nick Gaydos
	// date: 09/14/2004
	// purpose: set zebra stripes for that greenbar look
	// source: based off of http://www.alistapart.com/articles/zebratables/
	// use: <body onload="stripe('playlist', '#fff', '#edf3fe');">
	// rules:
	// edits: 
	//**********************************************************************

		// this function is needed to work around 
		// a bug in IE related to element attributes
		// this function is related to stripe(id) below for zebra stripes or that greenbar look
		function hasClass(obj) {
			var result = false;
				if (obj.getAttributeNode("class") != null) {
					result = obj.getAttributeNode("class").value;
				}
			return result;
		}   

		function stripe(id) {

			// the flag we'll use to keep track of 
			// whether the current row is odd or even
			var even = false;
  
			// if arguments are provided to specify the colours
			// of the even & odd rows, then use the them;
			// otherwise use the following defaults:
			var evenColor = arguments[1] ? arguments[1] : "#fff";
			var oddColor = arguments[2] ? arguments[2] : "#eee";
  
			// obtain a reference to the desired table
			// if no such table exists, abort
			var table = document.getElementById(id);
			if (! table) { return; }
	  
			// by definition, tables can have more than one tbody
			// element, so we'll have to get the list of child
			// &lt;tbody&gt;s 
			var tbodies = table.getElementsByTagName("tbody");

			// and iterate through them...
			for (var h = 0; h < tbodies.length; h++) {
	  
				// find all the &lt;tr&gt; elements... 
				var trs = tbodies[h].getElementsByTagName("tr");
		    
				// ... and iterate through them
				for (var i = 0; i < trs.length; i++) {

					// avoid rows that have a class attribute
					// or backgroundColor style
					if (! hasClass(trs[i]) &&
						! trs[i].style.backgroundColor) {
 				  
							// get all the cells in this row...
							var tds = trs[i].getElementsByTagName("td");
			      
							// and iterate through them...
							for (var j = 0; j < tds.length; j++) {
			      
								var mytd = tds[j];

								// avoid cells that have a class attribute
								// or backgroundColor style
								if (! hasClass(mytd) &&
								    ! mytd.style.backgroundColor) {
			      
									mytd.style.backgroundColor =
										even ? evenColor : oddColor;            
									}
							}
						}
	
					// flip from odd to even, or vice-versa
					even =  ! even;
			    }
			}
		}
	
	var sBrowser = new String();
	
	sBrowser = checkBrowser();
	
	
	//************************************************************************
	// edited by: Paul Jodoin
	// date: 2/14/2002	
	// purpose: return the browser and version in a string
	//************************************************************************
	function checkBrowser() {
			
		// the string browser type and the string to be returned
		var sBrowser = new String();
		sBrowser = '';
		
		// convert all characters to lowercase to simplify testing
		var agt = navigator.userAgent.toLowerCase();

		// *** BROWSER VERSION ***
		var is_major = parseInt(navigator.appVersion);
		var is_minor = parseFloat(navigator.appVersion);
			
		// ************************NETSCAPE***********************************
		// Note: Opera and WebTV spoof Navigator.  We do strict client detection.
		// If you want to allow spoofing, take out the tests for opera and webtv.
		var is_nav = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('spoofer')==-1)
		            && (agt.indexOf('compatible') == -1) && (agt.indexOf('opera')==-1)
		            && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));
			if(is_nav) {
				bIsNav = true;
				if(is_major == 2) { sBrowser = '2nav' };
				if(is_major == 3) { sBrowser = '3nav' };
				if(is_major == 4) { sBrowser = '4nav' };
				if(is_major == 5) { sBrowser = '6nav' };
			}//if()
			
		// ************************GECKO***********************************
		var is_gecko = (agt.indexOf('gecko') != -1);
			if(is_gecko) { sBrowser = 'gecko' };

		// ************************IE***********************************
		var is_ie = ((agt.indexOf('msie') != -1) && (agt.indexOf('opera') == -1));
			if(is_ie) {
				if(is_major < 4) { sBrowser = '3ie' };
				if((is_major == 4) && (agt.indexOf('msie 4')!=-1)) { sBrowser = '4ie' };
				if(is_major >= 4) { sBrowser = 'ie4up' };
				if((is_major == 4) && (agt.indexOf('msie 5.0')!=-1)) { sBrowser = '5ie' };
				if((is_major == 4) && (agt.indexOf('msie 5.5') !=-1)) { sBrowser = '5.5ie' };
				if((is_major == 4) && (agt.indexOf('msie 6')!=-1)) { sBrowser = '6ie'; };
			}//if()
	
		// ************************AOL***********************************
		// KNOWN BUG: On AOL4, returns false if IE3 is embedded browser
		// or if this is the first browser window opened.  Thus the
		// variables is_aol, is_aol3, and is_aol4 aren't 100% reliable.	
		var is_aol = (agt.indexOf('aol') != -1);
			if(is_aol) {
				sBrowser = 'aol';
				//if(agt.indexOf('IE 3')) { sBrowser = '3aol' };
				//if(agt.indexOf('IE 4')) { sBrowser = '4aol' };
				if(agt.indexOf('aol 5') != -1) { sBrowser = '5aol' };
				if(agt.indexOf('aol 6') != -1) { sBrowser = '6aol' };
			}//if()

		// ************************OPERA*********************************
		var is_opera = (agt.indexOf('opera') != -1);
			if(is_opera){
				if((agt.indexOf('opera 2') != -1 || agt.indexOf('opera/2') != -1)) { sBrowser = '2opera' };
				if((agt.indexOf('opera 3') != -1 || agt.indexOf('opera/3') != -1)) { sBrowser = '3opera' };
				if((agt.indexOf('opera 4') != -1 || agt.indexOf('opera/4') != -1)) { sBrowser = '4opera' };
				if((agt.indexOf('opera 5') != -1 || agt.indexOf('opera/5') != -1)) { sBrowser = '5opera' };
			}//if()
			
		// ************************WEBTV*********************************
		var is_webtv = (agt.indexOf('webtv') != -1); 
			if(is_webtv) { sBrowser = 'webtv' };
			
		// ************************TVNAVIGATOR*********************************
		var is_TVNavigator = ((agt.indexOf('navio') != -1) || (agt.indexOf('navio_aoltv') != -1)); 
			if(is_TVNavigator) { sBrowser = 'TVNavigator' };
		var is_AOLTV = is_TVNavigator;
			if(is_AOLTV) { sBrowser = 'AOLTv' };
			
		// ************************HOTJAVA*********************************
		var is_hotjava = (agt.indexOf('hotjava') != -1);
			if(is_hotjava) {
				if(is_major == 3) { sBrowser = '3hotjava' };
			}//if()
				
		return sBrowser;
			
	}//checkBrowser()

//-->