function Search(str, strr) {

	if(strr.length==0) {
	
		alert("נא הכנס מילת חיפוש");
	
	}
	
	else {
	
		location.replace('?act=downloads&lang='+str+'&string='+strr);
	
	}
	
}

function Loading() {

	document.getElementById('hiddend').style.visibility='hidden';
	document.getElementById('Loading').style.visibility='visible';
	document.getElementById('Loading').style.position='absolute';

}

function lastdownload(id, uid, nowid, xid, yid, zid, mid) {
	
	document.getElementById(nowid).src="./images/"+nowid+"_now.jpg";
	document.getElementById(xid).src="./images/"+xid+".jpg";
	document.getElementById(yid).src="./images/"+yid+".jpg";
	document.getElementById(zid).src="./images/"+zid+".jpg";
	document.getElementById(mid).src="./images/"+mid+".jpg";

	var req = false;
	if (window.XMLHttpRequest) {
		// For Safari, Firefox, and other non-MS browsers
		try {
			req = new XMLHttpRequest();
		} catch (e) {
			req = false;
		}
	} else if (window.ActiveXObject) {
		// For Internet Explorer on Windows
		try {
			req = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e) {
			try {
				req = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e) {
				req = false;
			}
		}
	}
	var element = document.getElementById(id);
	if (req) {
		// Synchronous request, wait till we have it all
		url = 'modules/showdownloads.php';
		url = url+'?cat='+uid;
		req.open('GET', url, false);
		req.send(null);
		element.innerHTML = req.responseText;
		
	} else {
		element.innerHTML =
		"הדפדפן שלך אינו תומך בAJAX!";
	}
}

function Showme() {
	
	var obj = document.getElementById('whiteblock_all');
	obj.style.visibility=(obj.style.visibility=="visible"?"hidden":"visible");
	obj.style.position=(obj.style.position=="relative"?"absolute":"relative");
	
}

function Searchme() {

	var name = document.getElementById('name').value;
	var lang = document.getElementById('lang').value;
	var cat = document.getElementById('cat').value;
	
		location.replace('?act=downloads&cat='+cat+'&lang='+lang+'&name='+name);
	
}
