function doSearch ( ) 
{
	var obj = document.forms['searchQuery'].Query;
	var regExp1 = /\bfield\b/;
	var regExp2 = /[(,),<,>,\[,\]]/;
	var str = obj.value; 
	if ( str == "" || str.match("Sök på Karlstads Energi") != null)
	{ 
		alert("Enter a search word")	
	}else
	{
		document.forms['searchQuery'].submit();
	}
}
 
function CreateResponse(id, form, dbfp, winwidth, winheight)
{	
	var dlgPath = '/' + dbfp  + "/" + form + "?readform&amp;id=" + id;
	Stats='toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=' + winwidth + ',height=' + winheight + ',left=250,top=100' 
	dlgBox = window.open (dlgPath, "Comments", Stats)
}
 
function goShortCut( obj )
{
	var vars = obj.split("!");
	var theframe = eval("top.frames['" + vars[1] + "']");
	if ( theframe == null )
	{
		window.open (vars[0])
	}else
	{
		theframe.location = vars[0];
	}
}
 
function emptySearch() {
	var obj = document.forms['searchQuery'].Query;
	if(obj.value != "Sök på Karlstads Energi"){
		obj.value = "";
	}
}
