function submitSearch(s_form, ctrl, src)
{
	s1 = new String(s_form.xmlquery.value);
	s2 = new String(s1);

	for (i=0; i<s1.length; i++)
	{
		s2 = s2.replace("*","");
	}
	if (s_form.xmlquery.value == "")
	{
		alert("Sökvillkor måste anges.");
		return false;
	}


	if (s2 ==  "")
	{
		alert("Sökvillkoret måste innehålla minst ett tecken som inte är trunkeringstecken.");
		return false;
	}

	if ((src == "fulltext") && (s_form.servicename.value != 'Lyrics'))
	{
		if ( (s_form.fulltext.checked == true) && (s_form.search_in[2].checked == true) )
		{
			alert("Kombinationen Fulltext och Skolans artikelservice är ogiltig.");
			return false;
		}
	}

	// If the enter-key is used, no need to submit
	if (ctrl == "button") {
		s_form.submit();
	}
	return true;
}


function helpwin(helpnr, sBrickName) {
	var loc = "FrontServlet"+
		"?session=" 		+ document.formSearch.session.value +
		"&service=" 		+ document.formSearch.service.value +
		"&servicename="		+ escape(document.formSearch.servicename.value) +		
		"&helpnr=" 		+ helpnr +
		"&handler=Helpwin";
    
  if ( sBrickName )
    loc += "&brick=" + sBrickName;
  else   
    loc += "&brick=" + document.formSearch.brick.value;
      
	helpWin = window.open(loc,"","menubar=no,toolbar=no,width=521,height=285,scrolling=yes,scrollbars=yes");	
}

<!-- Function to search by an artno -->
function searchbypartno(partno){

	var loc = "FrontServlet"+
		"?session="	+ document.formSearch.session.value +
		"&amp;service=" 	+ document.formSearch.service.value +
		"&amp;servicename="	+ document.formSearch.servicename.value +
		//"&amp;xmlquery="		+ escape(document.formSearch.xmlquery.value) +
		"&amp;brick=" 		+ document.formSearch.brick.value +
		"&amp;rows=" 		+ document.formSearch.rows.value +
		"&amp;event=SEARCH_ADVANCED" +
		"&amp;docformat=html" +
		"&amp;orgnr="  + document.formSearch.orgnr.value +
		//"&amp;filtertext="	+collname +
		"&amp;urval=yes" +
		"&amp;urval_typ=flexurval" +
		"&amp;partnos=" + partno +
		"&amp;handler=Search";
        //alert("loc: " +loc);
	window.location.href=loc;
	closeAllPops();
	return;
}



//function sessionStatus () {
//	if (sessionStatus._pcOTinstance)
//		return sessionStatus._pcOTinstance;
//	this._active = 'y';
//}
//sessionStatus._pcOTinstance = new sessionStatus();


