//***********************************************************************************
function setBackgroundNormal (tdId){
	document.getElementById(tdId).style.background = 'white';
}
function setBackgroundAtivo (tdId){
	document.getElementById(tdId).style.background='#FFD008';
}
//***********************************************************************************
function salvaHintJogo (downloadId){
	ajax = iniciaAjax();
	if	(ajax) {
 		ajax.open("POST", 'salvaHintDownload.ajax.php', true);
 		ajax.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
        ajax.send("downloadId="+downloadId);
	}
}
//***********************************************************************************
function openWindow(pParametro,pWidth,pHeight) {
	var xAvaliableWidth = screen.availWidth;
	var xAvaliableHeight = screen.availHeight;
	xLeft = (xAvaliableWidth-pWidth)/2;
	xTop = (xAvaliableHeight-pHeight)/2;
    window.open(pParametro,'x','dependent=yes,scrollbars=no,resizable=yes,status=no,width='+pWidth+',height='+pHeight+',left='+xLeft+',top='+xTop);
}
//***********************************************************************************
function openWindow2(pParametro,pWidth,pHeight) {
	var xAvaliableWidth = screen.availWidth;
	var xAvaliableHeight = screen.availHeight;
	xLeft = (xAvaliableWidth-pWidth)/2;
	xTop = (xAvaliableHeight-pHeight)/2;
    window.open(pParametro,'y','dependent=yes,scrollbars=yes,resizable=no,status=no,width='+pWidth+',height='+pHeight+',left='+xLeft+',top='+xTop);
}
//***********************************************************************************
function iniciaAjax(){
	try {
 		ajax = new ActiveXObject("Microsoft.XMLHTTP");
  	} catch(e) {
		try {
    		ajax = new ActiveXObject("Msxml2.XMLHTTP");
 		} catch(ex) {
    		try {
      			ajax = new XMLHttpRequest();
	   		} catch(exc) {
				alert('Esse browser não tem recursos para uso do Ajax');
   				ajax = null;
    		}
 		}
	}
  	return ajax;
}
//***********************************************************************************
