function checkLinks (ids) {

expx = ids.split(",")

	if (expx.length>20) {
	x = confirm("Do you really want to check over 20 links? this may take some time...")
	} else {
	x = true
	}
	
	if (x) {
	tt = expx.length-1
	
		for(i=0;i<=tt;i++) {
		idd = expx[i]
			if (idd) {
			htmlId = "linkz"+idd+""
			$(htmlId).innerHTML = '<i>...</i>'
			new Ajax.Updater("linkz"+idd+"", '/check.php', { method: 'post', parameters: { id: idd } });
			}
		
		
		}
	
	}

}

function rate (op,id) {
var http = false;

	if(navigator.appName == "Microsoft Internet Explorer") {
	http = new ActiveXObject("Microsoft.XMLHTTP");
	} else {
	http = new XMLHttpRequest();
	}

var url = "/rate.php";
var params = "id="+id+"&op="+op+"";
http.open("POST", url, true);

http.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
http.setRequestHeader("Content-length", params.length);
http.setRequestHeader("Connection", "close");

http.onreadystatechange=function() {
		
		if(http.readyState == 4) {
		w = "rbox"
		x = document.getElementById(w).innerHTML = http.responseText;
		}
		
}

http.send(params);
}

function rhover (op) {
x = document.getElementById('rhover')
	
	switch (op) {
		
		case "yes":
			x.innerHTML = "<b style=\"color:green;\">Working</b>"
			break;
			
		case "no":
		x.innerHTML = "<b style=\"color:red;\">Not working</b>"
			break;
			
		case "none":
			x.innerHTML = ""
			break;
			
	}

}

function book(){
if (window.sidebar) // firefox
	window.sidebar.addPanel("Rapidshare Downloads", "http://rapidshare-downloads.com/", "");
else if(window.opera && window.print){ // opera
	var elem = document.createElement('a');
	elem.setAttribute('href',"http://rapidshare-downloads.com/");
	elem.setAttribute('title',"Rapidshare Downloads");
	elem.setAttribute('rel','sidebar');
	elem.click();
} 
else if(document.all)// ie
	window.external.AddFavorite("http://rapidshare-downloads.com/", "Rapidshare Downloads");
}

function showContact () {
document.getElementById('msg').style.display='block'	
}
