//this function will submit a form using javascript
//this does not work properly on netscape 4

function newSearch() {
	var theform = document.Form1;
	var rawwords = theform.textfield.value;
	if (rawwords == '') { 
		alert('Please enter your search criteria.');
	
	} else {
		var query = escape(rawwords);

		window.location.href = 'http://www.google.com/custom?domains=kent.edu&sitesearch=kent.edu&Submit=go&q=' + query;
	}
}

	function newWindow (name,url)
		{
			
			externalLinkRegEx = /^https?:[\/\\]{2}/i;
			
				cookieStr = document.cookie;
				cookieWinRegEx = /CSOFFSCREENPOPUPSALLOWED=\d/i;
				rxVal = /\d+/;
				try
				{
					if (cookieStr && cookieStr.match(cookieWinRegEx))
					{
						strVal=cookieStr.match(cookieWinRegEx);
						if (strVal)
							blnPopUpsOffScreen=strVal.toString().match(rxVal);
						else
							bInPopUpsOffScreen = 0;
					}
					else
						blnPopUpsOffScreen=0;
				}
				catch (oErr)
				{
					blnPopUpsOffScreen=0;
				}
				if(blnPopUpsOffScreen==1)
				{
					
					intTop=window.screen.height - 9;
					intLeft=window.screen.width - 9;
					intHeight=1;
					intWidth=1;
				}
				else
				{
					
					intTop=(window.screen.height / 2) - 109;
					intLeft=(window.screen.width / 2) - 210;
					intHeight=218;
					intWidth=421;
				}
			
				if(!url.match(externalLinkRegEx) && url.indexOf('kurrentPageID') == -1)
				{
					try
					{
						if( url.indexOf ('?') == -1 )
							url = url + '?kurrentPageID=' + kurrentPageID;
						else
							url = url + '&kurrentPageID=' + kurrentPageID;
					}
					catch (oErr)
					{ /* Do Nothing */ }
				}
			
			
			re = new RegExp();
			re = /&amp;/gi;
			url = url.replace(re,"&");
			
			
			
			
			if(url.search(/[\/\\]/g) >= 0 && blnPopUpsOffScreen==0)
			{
				
				if(document.CS_StaticURL && window.location.href.indexOf(document.CS_StaticURL) == -1)
					url = '/commonspot/utilities/longproc.cfm?onlyurlvars=1&url=' + escape(url);
			}
			
			
			if(arguments.length >= 2 && arguments[2])
			{
				strOptions=arguments[2];
				
				strTopPos=strOptions.match(/top=\s*(\d+)/i);
				if(strTopPos && strTopPos[1] >=0)
				{
					intTop=strTopPos[1];
					strOptions=strOptions.replace(/top=\s*\d+\s*,?/i,'')
				}
				strLeftPos=strOptions.match(/left=\s*(\d+)/i);
				if(strLeftPos && strLeftPos[1] >=0)
				{
					intLeft=strLeftPos[1];
					strOptions=strOptions.replace(/left=\s*\d+\s*,?/i,'')
				}
				strHeight=strOptions.match(/height=\s*(\d+)/i);
				if(strHeight && strHeight[1] >=0)
				{
					intHeight=strHeight[1];
					strOptions=strOptions.replace(/height=\s*\d+\s*,?/i,'')
				}
				strWidth=strOptions.match(/width=\s*(\d+)/i);
				if(strWidth && strWidth[1] >=0)
				{
					intWidth=strWidth[1];
					strOptions=strOptions.replace(/width=\s*\d+\s*,?/i,'')
				}
				
				strWinOptions = strOptions;
			}
			else
				strWinOptions = 'toolbar=no,resizable=yes,scrollbars=yes,menubar=no,location=no';
			strWinOptions = strWinOptions + ',top='+ intTop + ',left=' + intLeft + ',height=' + intHeight + ',width=' + intWidth;
			
			
				winWindow=window.open(url,name,strWinOptions);
			
			if (!winWindow)
				alert('Unable to open window - please make sure the pop-up blocker is disabled for this site');
			if(arguments.length==4 && arguments[3]==1 && winWindow)
				return winWindow;
		}
		
		function newWindow (name,url)
		{
			
			externalLinkRegEx = /^https?:[\/\\]{2}/i;
			
				cookieStr = document.cookie;
				cookieWinRegEx = /CSOFFSCREENPOPUPSALLOWED=\d/i;
				rxVal = /\d+/;
				try
				{
					if (cookieStr && cookieStr.match(cookieWinRegEx))
					{
						strVal=cookieStr.match(cookieWinRegEx);
						if (strVal)
							blnPopUpsOffScreen=strVal.toString().match(rxVal);
						else
							bInPopUpsOffScreen = 0;
					}
					else
						blnPopUpsOffScreen=0;
				}
				catch (oErr)
				{
					blnPopUpsOffScreen=0;
				}
				if(blnPopUpsOffScreen==1)
				{
					
					intTop=window.screen.height - 9;
					intLeft=window.screen.width - 9;
					intHeight=1;
					intWidth=1;
				}
				else
				{
					
					intTop=(window.screen.height / 2) - 109;
					intLeft=(window.screen.width / 2) - 210;
					intHeight=218;
					intWidth=421;
				}
			
				if(!url.match(externalLinkRegEx) && url.indexOf('kurrentPageID') == -1)
				{
					try
					{
						if( url.indexOf ('?') == -1 )
							url = url + '?kurrentPageID=' + kurrentPageID;
						else
							url = url + '&kurrentPageID=' + kurrentPageID;
					}
					catch (oErr)
					{ /* Do Nothing */ }
				}
			
			
			re = new RegExp();
			re = /&amp;/gi;
			url = url.replace(re,"&");
			
			
			
			
			if(url.search(/[\/\\]/g) >= 0 && blnPopUpsOffScreen==0)
			{
				
				if(document.CS_StaticURL && window.location.href.indexOf(document.CS_StaticURL) == -1)
					url = '/commonspot/utilities/longproc.cfm?onlyurlvars=1&url=' + escape(url);
			}
			
			
			if(arguments.length >= 2 && arguments[2])
			{
				strOptions=arguments[2];
				
				strTopPos=strOptions.match(/top=\s*(\d+)/i);
				if(strTopPos && strTopPos[1] >=0)
				{
					intTop=strTopPos[1];
					strOptions=strOptions.replace(/top=\s*\d+\s*,?/i,'')
				}
				strLeftPos=strOptions.match(/left=\s*(\d+)/i);
				if(strLeftPos && strLeftPos[1] >=0)
				{
					intLeft=strLeftPos[1];
					strOptions=strOptions.replace(/left=\s*\d+\s*,?/i,'')
				}
				strHeight=strOptions.match(/height=\s*(\d+)/i);
				if(strHeight && strHeight[1] >=0)
				{
					intHeight=strHeight[1];
					strOptions=strOptions.replace(/height=\s*\d+\s*,?/i,'')
				}
				strWidth=strOptions.match(/width=\s*(\d+)/i);
				if(strWidth && strWidth[1] >=0)
				{
					intWidth=strWidth[1];
					strOptions=strOptions.replace(/width=\s*\d+\s*,?/i,'')
				}
				
				strWinOptions = strOptions;
			}
			else
				strWinOptions = 'toolbar=no,resizable=yes,scrollbars=yes,menubar=no,location=no';
			strWinOptions = strWinOptions + ',top='+ intTop + ',left=' + intLeft + ',height=' + intHeight + ',width=' + intWidth;
			
			
				winWindow=window.open(url,name,strWinOptions);
			
			if (!winWindow)
				alert('Unable to open window - please make sure the pop-up blocker is disabled for this site');
			if(arguments.length==4 && arguments[3]==1 && winWindow)
				return winWindow;
		}
		
		
		sfHover = function() {
	var sfEls = document.getElementById("mainNav").getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		}
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		}
	}
}
if (window.attachEvent) window.attachEvent("onload", sfHover);