function ajax(url,resposta,msg){

		try{
			eval("var "+resposta+" = new XMLHttpRequest();");
		}catch(ee){
	    try{
	        eval(resposta + " = new ActiveXObject(\"Msxml2.XMLHTTP\");");
	    }catch(e){
	        try{
	      	   eval(resposta + " = new ActiveXObject(\"Microsoft.XMLHTTP\");");
	        }catch(E){
	        eval(resposta + " = false");
		document.getElementById(resposta).innerHTML='erro';
	       			 }
	  	  		}
		}

		if (msg != null){
			document.getElementById(resposta).innerHTML=('<div style="float:right;background:#87CEFF;color:white;font-size:10px;">'+ msg +'</div>');
		}
		
	eval(resposta).onreadystatechange=function(){
		if (eval(resposta).readyState==4){
				var html = eval(resposta).responseText;
				if (document.getElementById(resposta)!= null){
					document.getElementById(resposta).innerHTML=html;
				}
			}
		}
		eval(resposta).open("POST", url,true);
		eval(resposta).setRequestHeader("Content-type", "multipart/form-data");
		eval(resposta).send(null);
}