<!-- hide from old browsers

var days = new Array();
days[0] = "Sunday";
days[1] = "Monday";
days[2] = "Tuesday";
days[3] = "Wednesday";
days[4] = "Thursday";
days[5] = "Friday";
days[6] = "Saturday";

var months = new Array();
months[0] = "January";
months[1] = "February";
months[2] = "March";
months[3] = "April";
months[4] = "May";
months[5] = "June";
months[6] = "July";
months[7] = "August";
months[8] = "September";
months[9] = "October";
months[10] = "November";
months[11] = "December";

function switchImg(theImg,theCaption) {
	document.getElementById('GalleryImg').src="/gallery/" + theImg;
	document.getElementById('GalleryImg').alt=theCaption;
	document.getElementById('imgCaption').innerHTML=theCaption;
}

/***********************************************
* Bookmark site script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
function evaFav(id) {
    evisImage = new Image();
    evisImage.src =  "http://select.evisitanalyst.com/cgi-bin/insite/harvest/custom.pl?id=13619&ID_" + id + "=1";
}

/* Modified to support Opera */
function bookmarksite(title,url){
evaFav('CT771');
if (window.sidebar) // firefox
	window.sidebar.addPanel(title, url, "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',url);
	elem.setAttribute('title',title);
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite(url, title);
}


function checkEmail(strng) {
	var error = "";

	var emailFilter=/^.+@.+\..{2,6}$/;

	if (!(emailFilter.test(strng))) {
		return false;
	}

	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\] ']/

	if (strng.match(illegalChars)) {
		return false;
	}

	return true;
}

function nl_validator(theForm)
{
	if(!checkEmail(theForm.newsletter.value)) {
		 alert("Please enter a valid Email Address");
		theForm.newsletter.focus();
		 return false;
	}
	
	return (true);
}

function formVal(thefields) {
	thereturn = true;
	fparts = thefields.split(",");
	for (i = 0; i < fparts.length; i++) {
		if (document.getElementById(fparts[i]).value=='') {
			document.getElementById(fparts[i]).style.background='#ff0000';
			thereturn = false;
		}else{
			document.getElementById(fparts[i]).style.background='#ffffff';
		}
	}
	if (thereturn==false) { alert('You must complete all required fields'); }
	return thereturn;
}



	jQuery(document).ready(function($) {
		
		//On Hover Over
		function megaHoverOver(){
			$(this).find(".sub").stop().show(); //Find sub and fade it in
			(function($) {
				//Function to calculate total width of all ul's
				jQuery.fn.calcSubWidth = function() {
					rowWidth = 0;
					//Calculate row
					$(this).find("ul").each(function() { //for each ul...
						rowWidth += $(this).outerWidth(); //Add each ul's width together
						
					});
				};
			})(jQuery); 

			if ( $(this).find(".row").length > 0 ) { //If row exists...

				var biggestRow = 0;	

				$(this).find(".row").each(function() {	//for each row...
					$(this).calcSubWidth(); //Call function to calculate width of all ul's
					//Find biggest row
					if(rowWidth > biggestRow) {
						biggestRow = rowWidth;
					}
				});

				$(this).find(".sub").css({'width' :biggestRow}); //Set width
				$(this).find(".subinner").css({'width' :biggestRow}); //Set width
				$(this).find(".row:last").css({'margin':'0'});  //Kill last row's margin

			} else { //If row does not exist...

				$(this).calcSubWidth();  //Call function to calculate width of all ul's
				$(this).find(".sub").css({'width' : rowWidth}); //Set Width
				$(this).find(".subinner").css({'width' : rowWidth}); //Set Width

			}
		}
		//On Hover Out
		function megaHoverOut(){
		  $(this).find(".sub").stop().hide();  //after fading, hide it
		}
		
		//Set custom configurations
		var config = {
			 sensitivity: 1, // number = sensitivity threshold (must be 1 or higher)
			 interval: 1, // number = milliseconds for onMouseOver polling interval
			 over: megaHoverOver, // function = onMouseOver callback (REQUIRED)
			 timeout: 1, // number = milliseconds delay before onMouseOut
			 out: megaHoverOut // function = onMouseOut callback (REQUIRED)
		};

		
		$("#topnav ul li").hoverIntent(config); //Trigger Hover intent with custom configurations
		
		
	});


// - end hiding -->
