// Heditor
// Cristiano Venturini 2011
PLX = false;
PLV = '';
RXSEL = 0;
CXSEL = 0;

function cerca_libro()
	{
	var stx = document.getElementById('stx').value;
	if (stx == '') { return; }
	if (stx.length < 2) { alert('Minimo 2 caratteri per la ricerca'); return; }
	stx = encodeURI(stx);
	var url = '/cerca.php?s=' + escape(stx);
	document.location.href=url;	
	}



function XRequestz()
 	{
	 	var http_request = false;
     	if (window.XMLHttpRequest) 
			{ // Mozilla, Safari,...
	        http_request = new XMLHttpRequest();
        	if (http_request.overrideMimeType) { http_request.overrideMimeType('text/xml'); }
    		} 
		else if (window.ActiveXObject) 
			 { // IE
	         try 
			 	{
    	        http_request = new ActiveXObject("Msxml2.XMLHTTP");
         		} catch (e) 
				{
		            try {
        		       http_request = new ActiveXObject("Microsoft.XMLHTTP");
            		} catch (e) {}
         		}
      		}
      	if (!http_request) 
			{
        	alert('No XMLHTTP instance!');
         	return false;
      		}
	 	return http_request;
  	}
