<!--
	// Global variables
	rnd.today = new Date();
	rnd.seed = rnd.today.getTime();
	newImg = new Array ("Images/FolderClose.gif", "Images/FolderOpen.gif"); // load images
	if (typeof(newImg) == 'undefined') newImg = new Array("");
	playPause = new Array ("PSD/Pause.gif", "PSD/Play.gif");
	var isIE = (document.all) ? true : false;
	var isNetscape6 = (document.getElementById&&!document.all) ? true : false;
	var isNetscape4 = (document.layers) ? true : false;
	var normalColor = '#000000', highlitedColor = '#FF0000';
	var expdate = new Date();
	var domain = "MarcosConsulting.com";
	var current = 0;
	var last = newImg.length - 1;
	var pics = null;
	var delay = 4000; // delay in milliseconds (5000 = 5 secs)
	var button = 0;
	var answer = 0;
	var answerstring = 0;
	var numkey = true;
	var lastkey	=	"";
	var browserMessage = "This site best viewed with Microsoft Internet Explorer.";
	var visits = 0;
	expdate.setTime(expdate.getTime() +  3E11);  // Set expiration date to ten years from now.

	// menu variables

	var NoOffFirstLineMenus=7;				// Number of first level items
	var LowBgColor='#A7B5C4';				// Background color when mouse is not over
	var LowSubBgColor='#A7B5C4';			// Background color when mouse is not over on subs
	var HighBgColor='#D0DAE4';				// Background color when mouse is over
	var HighSubBgColor='#D0DAE4';			// Background color when mouse is over on subs
	var FontLowColor='black';				// Font color when mouse is not over
	var FontSubLowColor='black';			// Font color subs when mouse is not over
	var FontHighColor='white';				// Font color when mouse is over
	var FontSubHighColor='white';			// Font color subs when mouse is over
	var BorderColor='white';				// Border color
	var BorderSubColor='white';				// Border color for subs
	var BorderWidth=0;						// Border width
	var BorderBtwnElmnts=1;					// Border between elements 1 or 0
	var FontFamily="'Century Gothic', Arial, Helvetica, sans-serif"	// Font family menu items
	var FontSize=11;						// Font size menu items
	var FontBold=0;							// Bold menu items 1 or 0
	var FontItalic=0;						// Italic menu items 1 or 0
	var MenuTextCentered='left';			// Item text position 'left', 'center' or 'right'
	var MenuCentered='left';				// Menu horizontal position 'left', 'center' or 'right'
	var MenuVerticalCentered='top';			// Menu vertical position 'top', 'middle','bottom' or static
	var ChildOverlap=.0;					// horizontal overlap child/ parent
	var ChildVerticalOverlap=.0;			// vertical overlap child/ parent
	var StartTop=71;						// Menu offset x coordinate
	var StartLeft=0;						// Menu offset y coordinate
	var VerCorrect=0;						// Multiple frames y correction
	var HorCorrect=0;						// Multiple frames x correction
	var LeftPaddng=3;						// Left padding
	var TopPaddng=2;						// Top padding
	var FirstLineHorizontal=0;				// SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
	var MenuFramesVertical=1;				// Frames in cols or rows 1 or 0
	var DissapearDelay=1000;				// delay before menu folds in
	var TakeOverBgColor=1;					// Menu frame takes over background color subitem frame
	var FirstLineFrame='navig';				// Frame where first level appears
	var SecLineFrame='space';				// Frame where sub levels appear
	var DocTargetFrame='space';				// Frame where target documents appear
	var TargetLoc='';						// span id for relative positioning
	var HideTop=0;							// Hide first level when loading new document 1 or 0
	var MenuWrap=1;							// enables/ disables menu wrap 1 or 0
	var RightToLeft=0;						// enables/ disables right to left unfold 1 or 0
	var UnfoldsOnClick=0;					// Level 1 unfolds onclick/ onmouseover
	var WebMasterCheck=0;					// menu tree checking on or off 1 or 0
	var ShowArrow=1;						// Uses arrow gifs when 1
	var KeepHilite=1;						// Keep selected path highligthed
	var Arrws=['Images/tri.gif',5,10,'Images/tridown.gif',10,5,'Images/trileft.gif',5,10];	// Arrow source, width and height

	// menu functions
	function BeforeStart(){return}
	function AfterBuild(){return}
	function BeforeFirstOpen(){return}
	function AfterCloseAll(){return}
	
	Menu1=new Array("Home","index.php?Page=Home","",0,20,127);
	
	Menu2=new Array("Resume","Javascript:{}","",2);
		Menu2_1=new Array("View","index.php?Page=Resume","",0,20,127);	
		Menu2_2=new Array("Download","http://www.marcosconsulting.com/Documents/NewResume.doc","",0,20,127);	
	
	Menu3=new Array("Certifications","index.php?Page=Certificate","",0,20,127);
	
	Menu4=new Array("Tools","Javascript:{}","",2);
		Menu4_1=new Array("Calculator","index.php?Page=Calculator","",0,20,127);	
		Menu4_2=new Array("Calendar","index.php?Page=Calendar","",0,20,127);	
	
	Menu5=new Array("Links","index.php?Page=Links","",0,20,127);
	
	Menu6=new Array("Contact Us","index.php?Page=Contact","",0,20,127);
	
	//Menu7=new Array("Movies","Javascript:{}","",2);
		//Menu7_1=new Array("Movie Night","index.php?Page=MovieNight","",0,20,127);	
		//Menu7_2=new Array("Movie Library","index.php?Page=Library","",0,20,127);	
		
	Menu7=new Array("Biography","index.php?Page=Biography","",0,20,127);

// The following code is used for the mouse over
	if (document.images) {
		Map_On = new Image();
		Map_Off = new Image();
		Map_On.src = "Images/MapImage.gif";
		Map_Off.src = "Images/Condo.gif";
		Condo_On = new Image();
		Condo_Off = new Image();
		Condo_On.src = "Images/Condo.gif";
		Condo_Off.src = "Images/Condo.gif";
		FloorPlan_On = new Image();
		FloorPlan_Off = new Image();
		FloorPlan_On.src = "Images/FloorPlan.gif";
		FloorPlan_Off.src = "Images/Condo.gif";
	}

	expdate.setTime(expdate.getTime() +  3E11);  // Set expiration date to ten years from now.

	// check to see if cookie exist?

	if(!(visits = getCookie("visits")))  {
		visits = 0;
		homePageTitle = "Welcome to my home page";
		if  (!(isNetscape6 || isIE))
			alert(browserMessage);
	}
	// set the cookie
	
	visits++;
	setCookie("visits", visits, expdate, "/", null, false);
	
	if ((visits % 5) == 0)
		if  (!(isNetscape6 || isIE))
			alert(browserMessage);

		
	// Swap images
	
	function changeImages() {
	
	  if (document.images)
	    for (var i=0; i<changeImages.arguments.length; i+=2) {
	      document[changeImages.arguments[i]].src =
				eval(changeImages.arguments[i+1] + ".src");
	    }
	}

	// This function set the date and time
	
	function setDateTime() {
	
		var date = new Date();
		var month = date.getMonth();
		var year = date.getFullYear();
		var day = date.getDate();
		var hours = date.getHours();
		var minutes = date.getMinutes();
		var seconds = date.getSeconds();
		var AMorPM = (hours <12) ? 'AM' : 'PM';

		var textDate = getMonthName(month) + " " + day + ", " + year;
		var textTime = ((hours > 12) ? hours - 12 : hours) + ":" + ((minutes < 10) ? '0' + minutes : minutes) + ":" + ((seconds < 10) ? '0' + seconds : seconds) + ' ' + AMorPM;

		if (isNetscape4) {
			textDate = "<font size='2'><b>" + textDate + "</b></font>";
			document.layers.nDate.document.write(textDate);
			document.layers.nDate.document.close();
			textTime = "<font size='2'><b>" + textTime + "</b></font>";
			document.layers.nTime.document.write(textTime);
			document.layers.nTime.document.close();
		}
		else
			if (isIE) {
				document.all.date.innerText = textDate;
				document.all.time.innerText = textTime;
			}
			else if (isNetscape6) {
				document.getElementById("date").innerHTML=textDate;
				document.getElementById("time").innerHTML=textTime;
			}
		setTimeout('setDateTime()',  1000);
	}

	function getMonthName(month) {
		// create an array to hold the names of the months
		var monthName = new Array(12);
		
		monthName[0] = "January";
		monthName[1] = "February";
		monthName[2] = "March";
		monthName[3] = "April";
		monthName[4] = "May";
		monthName[5] = "June";
		monthName[6] = "July";
		monthName[7] = "August";
		monthName[8] = "September";
		monthName[9] = "October";
		monthName[10] = "November";
		monthName[11] = "December";
		
		// return the name of the month in the specified language
		return monthName[month];
	}
	
	// Calculator function
			
	function Calculator(button)
	{
		var action = document.thisform.elements[button].name;
		
		if (numkey == false)
		{
			numkey = true;
			if (action != "*" && action != "/")
			{
				answerstring = "0";
				document.thisform.answer.value = answerstring;
			}
			else
				answer = 0;				
		}
		
		if (action == "=")
			action = lastkey;
			
		if (action == "1" || action == "2" || action == "3" || action == "4" ||
			action == "5" || action == "6" || action == "7" || action == "8" ||
			action == "9" || action == "0" || (action == "."))
		{
			numkey = true;
			answerstring = document.thisform.answer.value + action;
			if (action == ".")
				document.thisform.answer.value = answerstring;
			else
				document.thisform.answer.value = (answerstring * 1);
			return true;
		}
		
		switch (action)
		{
			case "-/+" :
				answerstring = (answerstring * -1);
				document.thisform.answer.value = answerstring;
				numkey = false;
				if (answer == 0)
					answer = answerstring;
				return true;
				break;
			case "C" :
				answer = 0;
				answerstring = "0";
				break;
			case "CE" :
				answerstring = "0";
				break;
			case "<" :
				if ((answerstring * 1) != 0)
				{
					var len = answerstring.length -1;
					if (len <= 0)
						answerstring = "0";
					else
						answerstring = answerstring.substring(0, len);
				}
				break;
			case "+" :
				if (answer != 0)
					answer = answer + (answerstring * 1);
				else
					answer = (answerstring * 1);
				answerstring = answer;
				numkey = false;
				lastkey = action;
				break;
			case "-" :
				if (answer != 0)
					answer = answer - (answerstring * 1);
				else
					answer = (answerstring * 1);
				answerstring = answer;
				numkey = false;
				lastkey = action;
				break;
			case "*" :
				if (answer != 0)
					answer = answer * (answerstring * 1);
				else
					answer = (answerstring * 1);
				answerstring = answer;
				numkey = false;
				lastkey = action;
				break;
			case "/" :
				if (answer != 0)
					answer = answer / (answerstring * 1);
				else
					answer = (answerstring * 1);
				answerstring = answer;
				numkey = false;
				lastkey = action;
				break;
			case "=" :
				answerstring = answer;
				numkey = false;
				break;
		}
		document.thisform.answer.value = answerstring;
		return true;
	}

	//  Used to open a popup window

	function OpenWindow(URL, WindowName, FeatureList) {

		var popW = 240;
		var popH = 245;
		var NewWin = null;
					
		if (FeatureList == null)
			var FeatureList = "resizable=no,width=" + popW + ",height=" + popH + ",toolbar=no,status=no,scrollbars=no,titlebar=no";
			
		if (NewWin != null) 
			if (!NewWin.closed) {
				NewWin.close(); 
	 	    NewWin_closed = true;
			}

		NewWin = window.open(URL, WindowName, FeatureList);
		NewWin.focus();
		return;
 	}
	
	// get cookie by name
	
	function getCookie(name) {
	  var cookies = document.cookie;
	  var start = cookies.indexOf(name + '=');
	  if (start == -1) return null;
	  var len = start + name.length + 1;
	  var end = cookies.indexOf(';',len);
	  if (end == -1) end = cookies.length;
	  return unescape(cookies.substring(len,end));
	}
	
	// create a cookie
	
	function setCookie(name, value, expires, path, domain, secure) {
	  value = escape(value);
	  expires = (expires) ? ';expires=' + expires.toGMTString() : '';
	  path    = (path)    ? ';path='    + path : '';
	  domain  = (domain)  ? ';domain='  + domain : '';
	  secure  = (secure)  ? ';secure' : '';
	
	  document.cookie =
	    name + '=' + value + expires + path + domain + secure;
	}
	
	// remove a cookie
	
	function deleteCookie(name, path, domain) {
	  var expires = ';expires=Thu, 01-Jan-70 00:00:01 GMT';
	  (path)    ? ';path='    + path : '';
	  (domain)  ? ';domain='  + domain : '';
	
	  if (getCookie(name))
	    document.cookie = name + '=' + expires + path + domain;
	}	
	
	function clearClassDescription() {

		var classDescriptionText = "To find out more about the classes, scroll over the offered classes on the left for more information.";
		
		if (isIE) {
			document.all.ClassDescription.innerText = classDescriptionText;
		}
		else if (isNetscape6) {
			document.getElementById("ClassDescription").innerHTML = classDescriptionText;
		}
	}
	
	// the following functions are for the slideshow
	// change the image
	
	function chgImg(direction) {
		if (document.images) {
			ImgNum = ImgNum + direction;
			if (ImgNum > ImgLength) 
				ImgNum = 0;
			if (ImgNum < 0) 
				ImgNum = ImgLength;
			document.slideshow.src = NewImg[ImgNum];
			if (isIE)
				document.all.slidetext.innerText = ImgText[ImgNum];
			else if (isNetscape6) 
				document.getElementById("slidetext").innerHTML=ImgText[ImgNum];
	   }
	}
	
	function stop() {
		if (lock == true) {
			lock = false;
			window.clearInterval(run);
		}
	}

	// set the slidechow auto
	
	function auto() {
		if (lock == true) {
			lock = false;
			window.clearInterval(run);
		}
		else if (lock == false) {
			lock = true;
			run = setInterval("chgImg(1)", delay);
	   }
	}
	//******************************************************************//	
	// expand or contract
	//******************************************************************//	
	function expandLayer(obj, imgObj) {
		var nObj = 'n' + obj;
		var xObj = 'x' + obj;
		if (isIE) 
			if (document.all[xObj].style.display == 'none') {
				document.all[xObj].style.display = 'block';
				document.images[imgObj].src = newImg[1];
			} 
			else {
				document.all[xObj].style.display = 'none';
				document.images[imgObj].src = newImg[0];
			}
	}
	//******************************************************************//	
	// change the color when invalid field
	//******************************************************************//	
	function changeColor(fieldName, newColor) {
		if (isIE) document.all[fieldName].style.color = newColor;
		else if (isNetscape6) document.getElementById(fieldName).style.color = newColor;
			else if (isNetscape4) eval('document.' + fieldName + '.color = ' + newColor); 
	}
	//******************************************************************//	
	// Random number generator
	//******************************************************************//	
	function rnd() {
		rnd.seed = (rnd.seed*9301+49297) % 233280;
		return rnd.seed/(233280.0);
	}
	function rand(number) {
		return Math.ceil(rnd()*number);
	}
	//******************************************************************//	
	// Slide show (picture rotator)
	//******************************************************************//	
	function next(location) {
		current++; 
		if (current > last) { first(location); }
		document.images[location].src = newImg[current];
	}
	function previous(location) {
		current--;
		if (current < 0) { last(location); }
		document.images[location].src = newImg[current];
	}
	function first(location) {
		current = 0;
		document.images[location].src = newImg[current];
	}
	function last(location) {
		current = last;
		document.images[location].src = newImg[current];
	}
	function rotate(location) {
		if (newImg.length == 0) return;
		current = rand(last);
		next(location);	
		pics = window.setTimeout("rotate('slideShow')", delay);
	}
	function setPicture(num) {
		window.clearTimeout(pics);
		document.slideShow.src = menuImg[num];
	}
	function pause() {
		window.clearTimeout(pics);
	}
	//******************************************************************//	
	// This function changes the play button to pause and visa versa
	//******************************************************************//	
	function setButton() {
		switch (button) {
			case 0:
				button = 1;
				pause();
				break;
			case 1:
				button = 0;
				rotate('slideShow');
				break;
		}
		document.images["playButton"].src = playPause[button];
	}
	//******************************************************************//	
	// This function does nothing
	//******************************************************************//	
	function voidFunction(message) {
		if (typeof(message) == 'undefined' || typeof(message) == 'null') window.status = '';
		else window.status = message;
	}
	//******************************************************************//	
	// This function display an error message
	//******************************************************************//	
	function displayMessage(message) {
		alert(message);
	}
	//******************************************************************//	
	// This function changes an image	
	//******************************************************************//	
	function changeImage(obj, image){ 
		eval('document.images["' + obj + '"].src = "' + image + '"');
	}
	//******************************************************************//	
	// validatre a phone number
	//******************************************************************//	
	function isPhoneNumber(phoneNumber) {
		var reg = /[0-9\-\.\)\(\s]{10,}/;
		return reg.test(phoneNumber);
	}
	//******************************************************************//	
	// validate a zip code
	//******************************************************************//	
	function isZipCode(zipCode) {
		 var reg = /[0-9]{5}(-[0-9]{4})?/;
		 var reg2 = /[0-9]{10,}/;
		 return (reg.test(zipCode) && !reg2.test(zipCode));
	 } 
	//******************************************************************//	
	// validate an email address
	//******************************************************************//	
	function isEmailAddress(emailAddress) {
		var reg1 = /(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/;  // not valid
		var reg2 = /^.+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/;  // valid
		return (!reg1.test(emailAddress) && reg2.test(emailAddress))  // if syntax is valid
	}
	//******************************************************************//	
	// validatre a password
	//******************************************************************//	
	function isPassword(password) {
		var reg = /[0-9a-zA-Z_]{1,15}/;  //at least 1 number and letter including the underscore
		return reg.test(password);
	}
	//******************************************************************//	
	// This function will validate all the fields on the ContactUs screen
	//******************************************************************//	
	function validateContactForm(formName) {
		var ok = true, message = '\nThe field(s) highligthed in RED are invalid:\n\n';
		if (typeof(formName) == 'undefined') formName = 0;
		changeColor('_Name', normalColor); 
		changeColor('_Email', normalColor);
		changeColor('_Phone', normalColor);
		changeColor('_Subject', normalColor);
		if (document.forms[formName].Name.value.length == 0 && document.forms[formName].Email.value.length == 0 && 
			document.forms[formName].Phone.value.length == 0 && document.forms[formName].Subject.value.length == 0 && 
			document.forms[formName].Comments.value.length == 0) {
			changeColor('_Name', highlitedColor); 
			changeColor('_Email', highlitedColor);
			changeColor('_Phone', highlitedColor);
			changeColor('_Subject', highlitedColor);
			document.forms[formName].elements[0].focus();
			ok = false;	}
		if (document.forms[formName].Comments.value.length == 0) {
			document.forms[formName].Comments.focus();
			message += "Missing description of your question or comment. \n";
			ok = false;	}
		if (document.forms[formName].Subject.value.length == 0) {
			changeColor('_Subject', highlitedColor); 
			document.forms[formName].Subject.focus();
			message += "Missing subject line. \n";
			ok = false;	}
		if (document.forms[formName].Phone.value.length == 0 || !isPhoneNumber(document.forms[formName].Phone.value)) {
			changeColor('_Phone', highlitedColor); 
			document.forms[formName].Phone.focus();
			message += "Missing or invalid phone number. \n";
			ok = false;	}
		if (document.forms[formName].Email.value.length == 0 || !isEmailAddress(document.forms[formName].Email.value)) {
			changeColor('_Email', highlitedColor); 
			document.forms[formName].Email.focus();
			message += "Missing or invalid email address. \n";
			ok = false;	}
		if (document.forms[formName].Name.value.length == 0) {
			changeColor('_Name', highlitedColor); 
			document.forms[formName].Name.focus();
			message += "Missing name. \n";
			ok = false;	}
		if (!ok) displayMessage(message);
		return ok;
	}
	//******************************************************************//	
	// clear the values in the fields
	//******************************************************************//	
	function clearFields() {
		document.forms[0].MovieID.value = '';
		document.forms[0].Title.value = '';
		document.forms[0].Description.value = '';
		document.forms[0].ActorName.value = '';
		document.forms[0].FormatID.options.selectedIndex = 0;  
		document.forms[0].AspectID.options.selectedIndex = 0;  
		document.forms[0].GenreID.options.selectedIndex = 0;  
		document.forms[0].Rating.options.selectedIndex = 0;
		document.forms[0].OnLoanTo.checked = false;
	}
	//******************************************************************//	
	// The following 6 function are used to manipulate select boxes
	//******************************************************************//	
	function deleteOption(object,index) {
		object.options[index] = null;
	}

	function addOption(object,text,value) {
		var defaultSelected = true;
		var selected = true;
		var optionName = new Option(text, value, defaultSelected, selected)
		object.options[object.length] = optionName;
	}

	function copySelected(fromObject,toObject) {
		for (var i=0, l=toObject.options.length;i<l;i++) {
			if (toObject.options[i].value == "")
	     	deleteOption(toObject,i);
    	}
		for (var i=0, l=fromObject.options.length;i<l;i++) {
			if (fromObject.options[i].selected)
					if (fromObject.options[i].value != "")
				addOption(toObject,fromObject.options[i].text,fromObject.options[i].value);
	    }
		for (var i=fromObject.options.length-1;i>-1;i--) {
			if (fromObject.options[i].selected)
			deleteOption(fromObject,i);
    	}
	}
	
	function copyAll(fromObject,toObject) {
		for (var i=0, l=toObject.options.length;i<l;i++) {
			if (toObject.options[i].value == "")
	     	deleteOption(toObject,i);
	    }
		for (var i=0, l=fromObject.options.length;i<l;i++) {
			if (fromObject.options[i].value != "") 
		  	addOption(toObject,fromObject.options[i].text,fromObject.options[i].value);
		}
		for (var i=fromObject.options.length-1;i>-1;i--) {
			deleteOption(fromObject,i);
		}
	}

	function populateHidden(fromObject,toObject) {
		var output = '';
		for (var i=0, l=fromObject.options.length;i<l;i++) {
			output += escape(fromObject.options[i].value);
				if (i<(l-1))
					output += ',';
		}
		toObject.value = output;
	}	
	//******************************************************************//	
	// This function will validate all the fields on the Attending  screen
	//******************************************************************//	
	function validateAttendingForm(formName) {
		var ok = true, message = '\nThe field(s) highligthed in RED are invalid:\n\n';
		if (typeof(formName) == 'undefined') formName = 0;
		changeColor('_Name', normalColor); 
		changeColor('_Email', normalColor);
		changeColor('_Phone', normalColor);
		changeColor('_NumberOfPeople', normalColor);
		if (document.forms[formName].Name.value.length == 0 && document.forms[formName].Email.value.length == 0 && 
			document.forms[formName].Phone.value.length == 0 && 
			document.forms[formName].NumberOfPeople.options[document.forms[formName].NumberOfPeople.selectedIndex].value.length == 0) {
			changeColor('_Name', highlitedColor); 
			changeColor('_Email', highlitedColor);
			changeColor('_Phone', highlitedColor);
			changeColor('_NumberOfPeople', highlitedColor);
			document.forms[formName].elements[0].focus();
			ok = false;	}
		if (document.forms[formName].NumberOfPeople.options[document.forms[formName].NumberOfPeople.selectedIndex].value.length == 0) {
			changeColor('_NumberOfPeople', highlitedColor); 
			document.forms[formName].NumberOfPeople.focus();
			message += "Invalid number of guest. \n";
			ok = false;	}
		if (document.forms[formName].Phone.value.length == 0 || !isPhoneNumber(document.forms[formName].Phone.value)) {
			changeColor('_Phone', highlitedColor); 
			document.forms[formName].Phone.focus();
			message += "Missing or invalid phone number. \n";
			ok = false;	}
		if (document.forms[formName].Email.value.length == 0 || !isEmailAddress(document.forms[formName].Email.value)) {
			changeColor('_Email', highlitedColor); 
			document.forms[formName].Email.focus();
			message += "Missing or invalid email address. \n";
			ok = false;	}
		if (document.forms[formName].Name.value.length == 0) {
			changeColor('_Name', highlitedColor); 
			document.forms[formName].Name.focus();
			message += "Missing name. \n";
			ok = false;	}
		if (!ok) displayMessage(message);
		return ok;
	}
	//******************************************************************//	
	// This function will validate all the fields on the Preference screen
	//******************************************************************//	
	function validatePreferenceForm() {
		var ok = true, message = '\nThe field(s) highligthed in RED are invalid:\n';
		
		changeColor('DisplayRows_', normalColor); 

		if ( document.PreferenceForm.DisplayRows.value < 1 || document.PreferenceForm.DisplayRows.value > 500 ) {
			changeColor('DisplayRows_', highlitedColor);
			document.PreferenceForm.DisplayRows.focus();
			message += "\nMax Rows must be a number between 1 and 500";
			ok = false;
		}
		if ( isNaN(document.PreferenceForm.DisplayRows.value)  ) {
			changeColor('DisplayRows_', highlitedColor);
			document.PreferenceForm.DisplayRows.focus();
			message += "\nYou must use NUMBERS only";
			ok = false;
		}
		
		if (!ok) 
			displayMessage(message);
		else {
			setCookie();
		}
		return ok;
	}
	//******************************************************************//	
	// This function sets the cookies
	//******************************************************************//	
	function setCookie() {
		Set_Cookie('DisplayRows', document.PreferenceForm.DisplayRows.value, new Date(2099, 11, 31), '/', domain, 0);
		Set_Cookie('FieldOrder', document.PreferenceForm.Preference.value, new Date(2099, 11, 31), '/', domain, 0);
	}
	//******************************************************************//	
	// The next 3 function are used to create, delete or get a cookie
	//******************************************************************//	
	function Get_Cookie(name) {
	  var start = document.cookie.indexOf(name + '=');
	  var len = start + name.length + 1;
	  if ((!start) && (name != document.cookie.substring(0,name.length)))
		return null;
	  if (start == -1)
		return null;
	  var end = document.cookie.indexOf(';',len);
	  if (end == -1) end = document.cookie.length;
	  return unescape(document.cookie.substring(len,end));
	}
	
	function Set_Cookie(name,value,expires,path,domain,secure) {
	  document.cookie = 
		name + '=' + escape(value) +
		( (expires) ? ';expires=' + expires.toGMTString() : '') +
		( (path) ? ';path=' + path : '') + 
		( (domain) ? ';domain=' + domain : '') +
		( (secure) ? ';secure' : '');
	}
	
	function Delete_Cookie(name,path,domain) {
	  if (Get_Cookie(name))
		document.cookie =
		  name + '=' +
		  ( (path) ? ';path=' + path : '') +
		  ( (domain) ? ';domain=' + domain : '') +
		  ';expires=Thu, 01-Jan-1970 00:00:01 GMT';
	}
// End of script -->
