function reportBroken(urlId,data){
	document.getElementById('reportBroken').removeAttribute('href');
	AJAX(domainName+"reportBroken.php?urlId="+urlId+"&mm="+data,getBrokenInfo,false,true);
}
function getBrokenInfo(strText){
  	if (strText == 1){
  		document.getElementById('reportResult').innerHTML = 'تم التبليغ عن هذا الموقع' ;
  	}else{
  		document.getElementById('reportResult').innerHTML = 'حصل خطأ أثناء التبليغ';
  	}
}
var urlType = 0 ;
function rateUrl(urlId,data,type){
	att =urlId+',\''+data+'\','+type ;
	urlType = type ;
	document.getElementById('rating'+type).removeAttribute('href');
	AJAX(domainName+"urlRating.php?urlId="+urlId+"&mm="+data+"&type="+type,getRateInfo,false,true);
}
function getRateInfo(strText){
	document.getElementById('rating'+urlType).setAttribute('href','javascript:rateUrl('+att+')');
	if (isNaN(strText)){
		alert(strText);
	}else{
		document.getElementById('rateResult'+urlType).innerHTML = strText ;
	}
}
