//Share Tool


//Ajax Object
function ShareMakeObject()
{
var x; 
var browser = navigator.appName; 
if(browser == "Microsoft Internet Explorer")
{
x = new ActiveXObject("Microsoft.XMLHTTP");

}else{
x = new XMLHttpRequest();

}
return x;
}

var ShareRequest = ShareMakeObject();


//Global variables
<!-- 
var GShareType = "";
var GShareId = "";
var GCall = 0;

function ShareMe(ShareId,ShareType,ShareTitle)
{
GShareType=ShareType;
GShareId=ShareId;
if(GCall == 1)
document.getElementById("ShareDiv").style.display="";
else
{
	GCall = 1;
	ShareRequest.open('post', '../sharetool/ajax.php');
	ShareRequest.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
	ShareRequest.onreadystatechange = ShareMeOutPut; 
	ShareRequest.send("ShareId="+ShareId+"&ShareType="+ShareType+"&ShareTitle="+ShareTitle);

		var script = document.createElement('script');//Dynamic JS
		script.type = 'text/javascript';//Dynamic JS
		script.src = '../sharetool/ajax_imp_con.js'; //Dynamic JS source
		document.getElementsByTagName('head')[0].appendChild(script);  //Dynamic JS
		
		var script = document.createElement('script');//Dynamic JS
		script.type = 'text/javascript';//Dynamic JS
		script.src = '../sharetool/ShareTool.js'; //Dynamic JS source
		document.getElementsByTagName('head')[0].appendChild(script);  //Dynamic JS

}	
	
}


function ShareMeOutPut()
{
if(ShareRequest.readyState == 1){
document.getElementById("ShareDiv").style.border="8px";
document.getElementById("ShareDiv").style.borderColor="#f0d789";
document.getElementById("ShareDiv").style.width="800px";
document.getElementById("ShareDiv").style.borderStyle="solid";
document.getElementById("ShareDiv").style.backgroundColor="#fff8cc";
document.getElementById("ShareDiv").innerHTML="<center><img src=../images/loader.gif></center>";
}

var InfoReturn = ShareRequest.responseText;
if(ShareRequest.readyState == 4){
document.getElementById("ShareDiv").innerHTML="";
document.getElementById("ShareDiv").style.border="0px";
document.getElementById("ShareDiv").style.borderColor="";
document.getElementById("ShareDiv").style.width="";
document.getElementById("ShareDiv").style.borderStyle="";
document.getElementById("ShareDiv").style.backgroundColor="";
document.getElementById("ShareDiv").innerHTML=InfoReturn;
}
}