function countVisits(urlBase, myUrl, myCampanha, isSWF){
	if(window.XMLHttpRequest){
		Ajax = new XMLHttpRequest();	
	}else if(window.ActiveXObject){
		try{
			Ajax = new ActiveXObject("Msxml2.XMLHTTP");
		}catch(e){
			try{
				Ajax = new ActiveXObject("Microsoft.XMLHTTP");
			}catch(e){}
		}
	}
	
	Ajax.onreadystatechange = getDatasReturnedOfPHP;
	this.urlRequest = urlBase + 'countClick.php' + '?url=' + myUrl + '&idCampanha=' + myCampanha;
	Ajax.open('GET', this.urlRequest, true);
	Ajax.send(null);

}

function getDatasReturnedOfPHP(){
	var teste = document;
	if(Ajax.readyState == 4){//request was loaded
		if(Ajax.status == 200){//the page was loaded successful
		
			;
			
		}else{
			alert('Erro no retorno do Servidor: ' + Ajax.statusText);
		}
	}else{
		pleaseWait();
	}
}

function pleaseWait(){
	if(!document.getElementById("pleaseWait")){
		var myDiv = document.createElement("div");
		myDiv.setAttribute("id","pleaseWait");
		myDiv.style.position = "absolute";
		myDiv.style.zIndex = 100;
		myDiv.innerHTML = "<h3>Por favor aguarde...</h3>";
	}
}