winWidth = 400; // sets a default width for browsers who do not understand screen.width below
winheight = 400; // ditto for height

if (screen){ // weeds out older browsers who do not understand screen.width/screen.height
   winWidth = screen.width;
   winHeight = screen.height;
}
	
// this function calls a popupWindow where
// win is the page address i.e. '../page.htm'

function popupWindow(win){
	
	newWindow = window.open('ebroucher.html','newWin','toolbar=no,location=no,scrollbars=yes,resizable=no,width='+winWidth+',height='+winHeight+',left=0,top=0');
	newWindow.focus();
}
function clearfield1(obj){
//if (document.form3.keyword.value == "search this site")
	if (obj.value == "search keyword")
	obj.value = "";
}
function check_blank(frmObj,pageUrl,pageMethod)
{
	var strval=frmObj.keyword.value;
	var strlength=strval.length;
	var strnew=strval.replace(" ","$");
	var spclength=count_substring(strnew,"$");
	if (strval == "" ||  strval== "search keyword" || spclength > 0)
	{
		alert("Please Enter Keyword for Search");
		frmObj.keyword.value = "search keyword"
		return false;
	}
	else{
		frmObj.action = pageUrl;
		frmObj.method = pageMethod;	
		frmObj.submit();
	}	
}
function count_substring(str,strsrch){
	var c = 0;
	for (var i=0;i<str.length;i++) {
	if (strsrch == str.substr(i,str.length))
		c++;
	}
	return c;
}
