/*nifty corners layout*/

window.onload=function(){
Nifty("div#menubaixo a","small transparent top");
Nifty("ul#intro li","same-height");
Nifty("div.date");
Nifty("div#content,div#side","same-height");
Nifty("div.comments div");
Nifty("div#footer");
Nifty("div#container","bottom");
grid();
}

function grid(){
varOrg  = "tipoup";
url="http://www.translinevan.com.br/grid.php?org="+varOrg; 
ajax(url);
}

function ajax(url) 
{ 

//alert(nick); 
//alert(dest); 
//alert(msg); 

req = null; 
// Procura por um objeto nativo (Mozilla/Safari) 
if (window.XMLHttpRequest) { 
req = new XMLHttpRequest(); 

req.onreadystatechange = gridprocessReqChange; 
req.open("GET",url,true); 
req.send(null); 
// Procura por uma versão ActiveX (IE) 
} else if (window.ActiveXObject) { 
req = new ActiveXObject("Microsoft.XMLHTTP"); 
if (req) { 

req.onreadystatechange = gridprocessReqChange; 
req.open("GET",url,true); 

req.send(); 
} 
} 
} 

function gridprocessReqChange() 
{ 
document.getElementById('grid').innerHTML = "<img src='http://www.translinevan.com.br/images/carregando.gif' />";
// apenas quando o estado for "completado" 
if (req.readyState == 4) { 

// apenas se o servidor retornar "OK" 

if (req.status ==200) { 

// procura pela div id="pagina" e insere o conteudo 
// retornado nela, como texto HTML 

document.getElementById('grid').innerHTML = unescape(req.responseText); 

} else { 
alert("Houve um problema ao obter os dados:n" + req.statusText); 
} 
} 
} 
