
// ---------- script properties ----------

var results_location;
var page_URL = location.href;
var int_Index;
var int_Results;
var int_Pagini;
int_Index = page_URL.search('index.htm');
int_Results = page_URL.search('results.html');
int_Pagini = location.pathname.indexOf('pagini');
int_Resurse = location.pathname.indexOf('resurse');

if (int_Pagini != (-1)){
	results_location = "results.html";
	}
else if (int_Resurse != (-1)){
		results_location = "../../..pagini/results.html";
	}
	else{
		results_location = "pagini/results.html";
	}
	
/*if ((location.href == "http://" + location.hostname)
	{
	results_location = 	"pagini/results.html";
	}
if (page_URL.pathname == "/index.htm")
	{
	results_location = "pagini/results.html";
	}
else
	{
	results_location = "results.html";
	}*/

/*if (int_Index != (-1))
	{
	results_location = "pagini/results.html";
	}
else
	{
	results_location = "results.html";
	}
*/

// ---------- end of script properties ----------


function search_form(jse_Form) {
	if (jse_Form.d.value.length > 0) {
		document.cookie = "d=" + escape(jse_Form.d.value);
		window.location = results_location;
	}
}
