// For clarifications on the below script, please contact shine_cs@ncs.com.sg
// - - - Start - Configuration - Settings the Agency can modify - - - //
// All values passed to GSA must be URL-encoded. eg. spaces must be replaced by char '+'
var Search_Text_Box_Size = 30;
var Server_URL = "http://sgms.internet.gov.sg/search"; 
var Collections = ""; 
var SiteSearchItems = "";
var MetaDataFilters = "";

//Specify the Website's Feedback URL here e.g. http://www.mywebsite.gov.sg/feedback.html
//must have http:// as the start
var paramFeedbackPageURL = "http://epoll.shine.gov.sg/jsp/internet/survey/entry.jsp?agencyId=PMO-PSD&eserviceId=PSD-Careers&eserviceName=PSD%20Careers&surveyId=1095142779122";

//Specify the Website's Contact Info URL here e.g. http://www.mywebsite.gov.sg/ContactInfo.html
var paramContactInfoPageURL = "mailto:careers.gov@jobstreet.com";


// Specify additional Collection options using the following //
Collections =
[
  ["Within Careers@Gov", "psd_careers"],
	["Within All Singapore Gov Websites", "default"]
]

// - - - End - Configuration - - - //


function ShowResults(images_url)
{
    //document.write("<style type='text/css' media='screen,print'>");
    //document.write("html,input,td{font-family:Arial;font-size:80%;}");
    //document.write("select{font-family:Arial;font-size:90%}");
    //document.write(".fLink{font-family: Arial;font-size: 11px;text-decoration: underline;color:Blue;cursor:hand;}")
    //document.write("</style>");
   
	document.writeln("<form method='GET' target='_blank' name='SearchPlugInfrm' action='" + Server_URL + "' >");
	 document.writeln("<div align='right';>");
	//document.writeln("<form method='GET' target='_blank' name='SearchPlugInfrm' action='" + Server_URL + "' style='margin:0'>");    
	document.writeln("<table style='background:transparent; border-collapse:collapse;'>");
	document.writeln("<tr><td><table>");
	document.writeln("<tr><td>");
	document.writeln("<input type='text' class='txtbox' name='q' size='"+ Search_Text_Box_Size + "'>&nbsp;");
	document.writeln("</td>");

	
	if (Collections != "")
	{
		var param_site_value = ""; //Do not remove
		document.writeln("<td>");		
		document.writeln("<SELECT name='site' class='dropdown'>");
		for (i = 0; i < Collections.length; i++)
		{
			document.writeln("<OPTION VALUE=" + Collections[i][1] +">" + Collections[i][0]);
			//Do not remove
			param_site_value += Collections[i][0] + "#" + Collections[i][1] + '|';
		}
		document.writeln("</SELECT>"); 
		//Do not remove
		document.writeln("<input type='hidden' name='filter_s' value='" + param_site_value + "' />");
		document.writeln("</td>");
	}
	else
	{
	    document.writeln("<td>");
		//Do not remove
		document.writeln("<input type='hidden' name='site' value='default_collection' />");
		document.writeln("</td>");
	}
	
    document.writeln("<td>");
    document.writeln("<input type='image' alt='Search' name='SearchGo' id='SearchGo' src='../Images/ico_search.gif' value='Search'>");
    document.writeln("</td>");
    document.writeln("</tr></table> </td></tr></table>"); 


	document.writeln("<input type='hidden' value='" + paramFeedbackPageURL + "' name='feedback_url'  />");
	document.writeln("<input type='hidden' value='" + paramContactInfoPageURL + "' name='contact_url' />");
	document.writeln("<input type='hidden' name='client' value='default' />");
	document.writeln("<input type='hidden' name='proxystylesheet' value='default' />");
	document.writeln("<input type='hidden' name='output' value='xml_no_dtd' />");
	document.writeln("</div>");
	document.writeln("</form>");
	
}