// JavaScript Document

function countClick(){
var isIE=(navigator.appName.indexOf("Microsoft Internet Explorer")!=-1)?1:0;
	var isW3C= (window.XMLHttpRequest)? 1:0;
	var isIE7= (window.XMLHttpRequest && document.all)? 1:0;
	var ajaxSupported=(isIE==1 || isW3C==1 || isIE7==1)?1:0;

	if(window.XMLHttpRequest||window.ActiveXObject)	ajaxSupported=1;
	else ajaxSupported=0;
	if(ajaxSupported==1){
		var qs= "counter.php";
				
						if(isW3C==1 || isIE7==1)
						{
							//For Mozilla,Netscape,Safari
						  	http=new XMLHttpRequest();
							//This is very imp for mozilla
							http.open("GET",qs,true);
							//if(isW3C==1) http.overrideMimeType('text/html');
							http.onreadystatechange=function()
													{
														if(http.readyState==4 && http.status==200)
														{
																document.getElementById("cnt").innerHTML=(http.responseText);
														}
					else
					{
				document.getElementById("cnt").innerHTML="<font color='0066FF'><b>Please wait ..</b></font>";
								}
													};
							http.send(null);
						}		
		else            if(isIE==1)	
						{
							http=new ActiveXObject("Microsoft.XMLHTTP");
							http.open("GET",qs);
							http.onreadystatechange=showCNT;
							http.send(null);
						}
						else
						{
							alert('Cant Create Ajax Environment');
						}
		}
}

function showCNT()
{
	if(http.readyState==4 && http.status==200)
	{ 
		document.getElementById("cnt").innerHTML=http.responseText;					
	}
	else
	{
		document.getElementById("cnt").innerHTML="<font color='0066FF'><b>Please wait ..</b></font>";
	}

}
