﻿//CBC Submit Search
function CBCSubmitSearchRedirect(strUrl)
{
	var frm=document.forms["frmSiteSearch"];
	if (frm==null)
	{
		if (typeof(MSOWebPartPageFormName) !="undefined")
			frm=document.forms[MSOWebPartPageFormName];
	}
	if (frm !=null)
	{
		var searchText=frm.elements["SearchString"].value;
		strUrl=strUrl+"?k="+escapeProperly(searchText);
		var searchScope=frm.elements["SearchScope"];		
		//frm.action=strUrl;
		//frm.submit();
		location.href=strUrl;
	}
}
function CBCSearchKeyDown(event, strUrl)
{
	if (IsKeyDownSubmit(event))
	{
		CBCSubmitSearchRedirect(strUrl);
		return false;
	}
	return true;
}
//End CBC Submit Search