// For clarifications on the below script, please contact shine_cs@ncs.com.sg
// Release V1.1 - 22 Jan 2008 
// - - - 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 = 28;
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://sgms-web.internet.gov.sg/UIs/Feedback.aspx";

//Specify the Website's Contact Info URL here e.g. http://www.mywebsite.gov.sg/ContactInfo.html
var paramContactInfoPageURL ="http://sgms-web.internet.gov.sg/UIs/ContactInfo.aspx";


// Specify additional Collection options using the following //
Collections =
[
	["Within HBIZ", "hdb_hbiz"],
	["Within HDB Website", "hdb"],
	["Within All Government Websites", "default"]
]

// Specify within this site (ie. sitesearch) options using the following //
// Only specify the website hosting this script
SiteSearchItems =
[
//	["Results Within This Website", ""]
]

// - - - End - Configuration - - - //


function ShowResults()
{
    //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='_self' name='SearchPlugInfrm' action='" + Server_URL + "' >");
	document.writeln("<table><tbody>");
	document.writeln("<tr><td>");
	document.writeln("<input type='text' name='q' class='grey'  size='"+ Search_Text_Box_Size + "'></td>");
	document.writeln("<td><a href=\"javascript:document.SearchPlugInfrm.submit()\"><img border=\"0\" src=\"/web/aa17/corporate/img/icon_search.gif\"></a></td></tr>");
	document.writeln("</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' />");
	
	var param_site_value = ""; //Do not remove

	for (i = 0; i < Collections.length; i++)
	{
		//Do not remove
		param_site_value += Collections[i][0] + "#" + Collections[i][1] + '|';
	}

	document.writeln("<input type='hidden' name='filter_s' value='" + param_site_value + "' />");
	document.writeln("<input type='hidden' name='site' value='hdb_hbiz' />");
	document.writeln("</form>");
}

function clearSelectedRadio(radioId) 
{
    var x=document.getElementsByName(radioId); 
    for(i=0;i<x.length;i++){x[i].checked=false;}
    document.getElementById('btnG').focus();
}
