// Function that writes out cbs query

function publicationWriteout(number){
var breaknumber=number;

if (srch.total > 0 ) {
//alert(srch.total)
var resultsOutput=""
for (i = 0; ( i < srch.results.length && i < breaknumber); i++) {
	if ( srch.searchParameters["sp-q-9"] == 0 ) {
resultsOutput+="<p><strong><a href=\""+srch.results[i].url+"\" target=\"_top\" title=\""+srch.results[i].pwcTitle+"\">"+srch.results[i].pwcTitle+"</a></strong><br />"
		if ( srch.searchParameters["sp-m"] != 0) {
			resultsOutput+=srch.results[i].desc+"&nbsp;"     // used to be:  srch.results[i].desc +"<br />"
			resultsOutput+="<a href=\""+srch.results[i].url+"\" target=\"_top\" title=\"Volledige beschrijving: "+srch.results[i].pwcTitle+"\">Volledige&nbsp;beschrijving</a></p><hr />" 
		}
	}
}
//document.write("<h2 >Recente <strong class=\"portalTitle1\">"+srch.query+"</strong> publicaties</h2><br />")
document.write(resultsOutput)	// write the results output
} else {
	document.write("<p>Er zijn momenteel geen publicaties</p>")
}

if (srch.total > breaknumber ) {
var resultsOutput2=""
for (i = breaknumber; i < srch.results.length; i++) {
	if ( srch.searchParameters["sp-q-9"] == 0 ) {
resultsOutput2+="<li><a href=\""+srch.results[i].url+"\" target=\"_top\" title=\""+srch.results[i].pwcTitle+"\">"+srch.results[i].pwcTitle+"</a></li>"
	
	}
}
document.write("<br><h3>Overige publicaties op pwc.nl</h3>")
document.write("<ul>")
document.write(resultsOutput2)	// write the results output
document.write("</ul>")
} 
}

// END publicationWriteout

//* - - - - - - - - - - - - - - - 
//* This function is used to submit a searchFormAd html form to Atomz and forward to the advanced publicationsresults page. 
//* It has a dependency on the search.js inclusion (needs the searchDomain & searchAccount defined in this file)
//* It will display the results on the advanced publicationsresult form 
//* Param 1: The html form name (string)
//*  Note that the html form must define the following fields: 
//*  sp_q : free text query string
//* sp_q_1: country code to search, blank means All
//* sp_q_2: language code to search, blank means All 
//* sp_q_3: content areas, blank means All, values can be one of the following : 
//* CONTENT_ALL, CONTENT_SER, CONTENT_IND, CONTENT_KNO, CONTENT_EVE, CONTENT_PRE 
//* - - - - - - - - - - - - - - - 
function submitSearchFormLeft(htmlformname,color,leftnav) {
var currform = window.document.forms[htmlformname];
var resultForm = "/extweb/searchresults.nsf/Results/nl-dut-publicationresults?OpenDocument";
var action = resultForm;
action += "&ss="+color;
action += "&ln="+leftnav;
action += "&searchLoc="+searchDomain;
action +="?sp-a="+searchAccount;
if (searchAccount != "sp1002182f")  action +="&sp-t=js";
action += "&sp-x-1=pwcGeo";
action += "&sp-q-1=nl"; // Searches only Netherlands
action += "&sp-x-2=pwcLang";
action += "&sp-q-2=dut"; // Searches only Dutch content
action += "&sp-x-3=pwcDB";
action += "&sp-q-3=pwcpublications"; // Searches only Publications db
action += "&sp-q="+ escape(currform.sp_q.value.replace("&"," "));
action +=  "&sp-x-9=pwcHideLevel";
action +=  "&sp-q-9=" + "0";
action +=  "&sp-p=phrase";
window.location.href=action;
} 
