// disable submit button after first click on forms
function SubmitTheForm(formname) {

var submitted = false;		
if(submitted == true) { return; }
formname.submit();
formname.Submit.value = 'Please wait';
formname.Submit.disabled = true;
submitted = true;

}


// Check for features admin - makes sure either or, not both
	 function chkLink() {
		 if (document.getElementById('exlink').value != "" && document.getElementById('pagelink').value != "") {
			alert ("Only one of the link boxes can be filled in"); 
			return false;
			}
		}
//help windows
function messageWindow(title)
{
var msg ="click";
 styleStr = 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbar=yes,resizable=yes,width=720';
  msgWindow = window.open("../../helps/feathelp.html","mesgWindow", styleStr);

}


function printThis() 
{ 
var usertype=navigator.userAgent.toLowerCase(); 
if (window.print) { 
setTimeout('window.print();',200); 
} 
else if (usertype.indexOf("mac") != -1) { 
alert("Press 'Cmd+p' on your keyboard to print article."); 
} 
else { 
alert("Press 'Ctrl+p' on your keyboard to print article.") 
} 
} 


/*SELECT MENU */
	function goToPage(newLoc){
	newPage= newLoc.options[newLoc.selectedIndex].value
		if (newPage != "") {
		window.location = newPage
		}
	}



//***SET PAGE TEXT SIZE AND SAVE TO COOKIE***
	function ts(textSize) {
		if (document.getElementById) {
			document.getElementById('content').style.fontSize = textSize;
						
			// change td classes
				var tds = document.getElementsByTagName('td');
				if (tds) {
				for (var i = 0; i < tds.length; i++) {
				if (tds[i].className == 'arial' || tds[i].className == 'list' || tds[i].className == 'shortcut' || tds[i].className == 'leader' ) {
				tds[i].style.fontSize = textSize;
							}
						}
			// change div classes
				var divs = document.getElementsByTagName('div');
				if (divs) {
				for (var j = 0; j < divs.length; j++) {
				if (divs[j].className == 'arial' || divs[j].className == 'list' || divs[j].className == 'shortcut' || divs[j].className == 'leader' ) {
				divs[j].style.fontSize = textSize;
							}
						}
					

				}
			}
			// end chamnge td classes

			//set cookie with chosen text size
			document.cookie = name + '=' + 'text' + '=' +escape(textSize)
			
		} else 	{
			alert("Sorry, you need a newer browser, like IE 6 or NS 6+ to use this");
		}
	}


// preload menu images
 dot=new Image(10,14);
 dot.src="images/sqdot.gif";
 dotoff=new Image(10,14);
 dotoff.src="images/sqdotoff.gif";
  dotover=new Image(10,14);
 dotover.src="images/sqdotover.gif";
   dotdrop=new Image(10,14);
 dotdrop.src="images/sqdotdrop.gif";

//*** RETRIEVE TEXT SIZE COOKIE AND SET PAGE TEXT SIZE***

	function getCookie(cookieName) {

	
		if (document.cookie == '') {  // if no cookies return 
		return false;
		} else { 
		//N/S book P233
		thisCookie = document.cookie.split('; '); //separate all retrieved cookies

		for (i=0; i<thisCookie.length; i++)  { //loop through each cookie
			if (cookieName == thisCookie[i].split('=')[0])  { //check if cookieName exists
				var sz =  (thisCookie[i].split('=')[1]); // access cookie value and assign it to variable (sz)
				document.getElementById('content').style.fontSize = sz;  // change fontsizes on pages
					// change td classes
						var tds = document.getElementsByTagName('td');
						var divs = document.getElementsByTagName('div');
						if (tds) {
						for (var i = 0; i < tds.length; i++) {
						if (tds[i].className == 'arial' || tds[i].className == 'list' || tds[i].className == 'shortcut' || tds[i].className == 'leader') {
						tds[i].style.fontSize = sz;
								}
							}
						}
					// chamnge div classes
						if (divs) {
						for (var j = 0; j < divs.length; j++) {
						if (divs[j].className == 'arial' || divs[j].className == 'list' || divs[j].className == 'shortcut' || divs[j].className == 'leader') {
						divs[j].style.fontSize = sz;
								}
							}
						}

				} 
				
			}
			
		}
	}




