function popWin(mypage, myname, w, h, scrollV, stat) {
	// popup window
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;
	// default values for scroll and status
	if(scrollV!=1){scrollV = 0};
	if(stat!=1){stat = 0};
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scrollV+',status='+stat+',dependent=1';
	try {
		win = window.open(mypage, myname, winprops);
		if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
	}
	catch(e) { }
}

function URLencode(inString) {
	return escape(inString).replace(/\+/g, '%2B').replace(/\"/g,'%22').replace(/\'/g, '%27');
}

function CheckForSeachValue(e, evt)
{
	evt = (evt) ? evt : event;
	var charCode = (evt.charCode) ? evt.charCode : ((evt.which) ? evt.which : evt.keyCode);
	if (charCode == 13)
	{		
	    CheckForValue(e.value)
		
		document.location.href="SearchResults.aspx?Search=" + URLencode(e.value);
return false;
	}
}

function CheckForValue(e)
{
	if (e != '' && e != 'Search...')
	{
		document.location.href="SearchResults.aspx?Search=" + URLencode(e.value);
		return false;
	}else{
	    alert('Please enter a search term.');
	    return false;
	}
}

