var http = getHTTPObject();
// Send your data to the server.
function sendData() {
	var baseHref = "http://blogshares.com/nsfwhandler.php";
//	var urltosend = document.getElementById('blogURL').innerHTML;
	var bsidbase = "?checkid="
	var bsid = document.getElementById('bsid').innerHTML;
//	var DataToSend = urltosend;
	http.open("GET",baseHref+bsidbase+bsid,true);
	http.onreadystatechange = callback;
	http.send(null);
}

// When the server responds, show the text that it has sent back.
function callback() {
	if(http.readyState == 4) {
	$('GenData').morph('background:#ffcccc;'); 
	document.getElementById('flag').innerHTML=http.responseText;
	}
	return false;
}

// Browser detection to assign the correct object. (Make the ajax work in IE)
function getHTTPObject() {
	var o;
	try{
		o = new ActiveXObject("Msxml2.XMLHTTP");
	}catch(e){
		try{
			o = new ActiveXObject("Microsoft.XMLHTTP");    
		}catch(e){
			o = false
		}
	}    
	if(!o && typeof XMLHttpRequest!='undefined'){
		o = new XMLHttpRequest();
	}
	return o;
}
