
	function Submit(div){
		var myForm = document.getElementById(div);
		myForm.target = '_blank';
		myForm.submit();
	}
	
	function go() {
		return document.getElementById('cauta').value;
	}
	
	function cauta(word) {
		
		fcn("regielive.php",'continut_regielive',word);
		fcn("subs.php",'continut_subs',word);	
		fcn("softpedia.php",'continut_softpedia',word);
		fcn("subtitraricom.php",'continut_subtitraricom',word);		
	//	fcn("titrari.php",'continut_titrari',word);	

	}

	var xhr = new Array(); // ARRAY OF XML-HTTP REQUESTS
	var xi = new Array(0); // ARRAY OF XML-HTTP REQUEST INDEXES
	xi[0] = 1; // FIRST INDEX SET TO 1 MAKING IT AVAILABLE
	
	function xhrRequest() {

		var xhrsend = xi.length;
	
		for (var i=0; i<xi.length; i++) {

			if (xi[i] == 1) {
				xi[i] = 0;
				xhrsend = i;
				break;
			}
		}

		xi[xhrsend] = 0;
	
		if (window.ActiveXObject) {
			try {
				xhr[xhrsend] = new ActiveXObject("Msxml2.XMLHTTP");
			} catch (e) {
				try {
					xhr[xhrsend] = new ActiveXObject("Microsoft.XMLHTTP");
				} catch (e) {}
			}
		} else if (window.XMLHttpRequest) {
			xhr[xhrsend] = new XMLHttpRequest();
		}
		
		return (xhrsend);
	}
	
	function fcn(php, div, word) {
		
		var url=php+"?word="+word;
		var continut;
		continut = document.getElementById(div);
		var xhri = xhrRequest();
		xhr[xhri].open('GET', url, true);
		xhr[xhri].onreadystatechange = function() {
			if (xhr[xhri].readyState == 4) {
				continut.innerHTML = xhr[xhri].responseText;
				xi[xhri] = 1;
				xhr[xhri] = null;
			} else {
				continut.innerHTML = "<img src='loading.gif'>";
			}
		};
		xhr[xhri].send(null);
	}
	

