function cerca(pUrl)
{
	//controllo se è stata inserita una parola da ricercare...
	var txtCerca = document.getElementById("txtCerca");
	
	if (trim(txtCerca.value) == "" || trim(txtCerca.value) == null || trim(txtCerca.value) == undefined)
	{
		alert("Inserisci una parola da cercare!");
		txtCerca.focus();
		return;
	}
	
	showHideElement('mainBoxRicerca','visible');
	getExternalData(true, null, 'boxRicerca', pUrl);
}

function newWindow(a_str_windowURL, a_str_windowName, a_int_windowWidth, a_int_windowHeight, a_bool_scrollbars, a_bool_resizable, a_bool_menubar, a_bool_toolbar, a_bool_addressbar, a_bool_statusbar, a_bool_fullscreen) {
  var int_windowLeft = (screen.width - a_int_windowWidth) / 2;
  var int_windowTop = (screen.height - a_int_windowHeight) / 2;
  var str_windowProperties = 'height=' + a_int_windowHeight + ',width=' + a_int_windowWidth + ',top=' + int_windowTop + ',left=' + int_windowLeft + ',scrollbars=' + a_bool_scrollbars + ',resizable=' + a_bool_resizable + ',menubar=' + a_bool_menubar + ',toolbar=' + a_bool_toolbar + ',location=' + a_bool_addressbar + ',status=' + a_bool_statusbar;
  var obj_window = popupWindow = window.open(a_str_windowURL, a_str_windowName, str_windowProperties );
		
    if (parseInt(navigator.appVersion) >= 4) {
      obj_window.window.focus();
    }
}

function checkText(id, defaultText, color) {
	//document.getElementById(id).style.color = "#808080";
 	if(trim(document.getElementById(id).value) == defaultText)
 	{
 		document.getElementById(id).value = "";
 	} else {
	    if(trim(document.getElementById(id).value) == "")
  		{
   			document.getElementById(id).value = defaultText;
  		}
 	}	
}