﻿function openWindow( strURL, strTitle, intWidth, intHeight, boolScrollbar ) {
    var intMyLeft = eval(screen.width-intWidth)/2;
    var intMyTop  = eval(screen.height-intHeight)/2;
    window.open( strURL, strTitle, 'toolbar=no,location=no,status=no,menubar=yes,scrollbars='+(boolScrollbar ? 'yes' : 'no')+', resizable=yes, width='+intWidth+', height='+intHeight+', left='+intMyLeft+', top='+intMyTop );
}

function Search()
{
    curQuery = location.search.replace(/[?&amp;]q=[^&amp;]*/,"").replace(/[?&amp;;]p=[^&amp;]*/,"").replace(/^[?&amp;]?(?!$)/,"&amp;");
    location.href='/service/search.aspx?page=1&search=' + document.mainform.fsearchfield.value.replace(/\+/g,'%2b');//+curQuery;
    return false;
}
function SearchExt()
{
    curQuery = location.search.replace(/[?&amp;]q=[^&amp;]*/,"").replace(/[?&amp;;]p=[^&amp;]*/,"").replace(/^[?&amp;]?(?!$)/,"&amp;");
    location.href='/service/search.aspx?page=1&search=' + document.mainform.fsearchresultfield.value.replace(/\+/g,'%2b');//+curQuery;
    return false;
}

function doSearch(resultpage, language, inittext)
{
	var strUrl = resultpage;
	var strParam = "";	
	if (inittext != document.getElementById("search_phrase").value) {
		strParam += "?q=" + encodeURIComponent(document.getElementById("search_phrase").value);
	}
	document.location = self.location.protocol+'//'+self.location.host + strUrl + strParam;
}