/* AJAX.JS made by OCTAGONO */

var xmlhttp = false ;

if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
{
try {
xmlhttp = new XMLHttpRequest ();
}
catch (e) {
xmlhttp = false}
}

function myXMLHttpRequest ()
{
var xmlhttplocal;
try {
xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")}
catch (e) {
try {
xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")}
catch (E) {
xmlhttplocal = false;
}
}

if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') {
try {
var xmlhttplocal = new XMLHttpRequest ();
}
catch (e) {
var xmlhttplocal = false;
}
}
return (xmlhttplocal);
}

var mnmxmlhttp = Array ();
var mnmxmlhttp2 = Array ();

var mnmString = Array ();
var mnmPrevColor = Array ();
var responsestring = Array ();
var myxmlhttp = Array ();
var responseString = new String;

var i=0;
var ii = 0;

var a=0;
var aa = 0;

/* Testemunhos */
function ajax_update()
{
url = "ajax_php.php";
target2 = document.getElementById ('content');

ii = i++;

var content = "i=" + ii ;

mnmxmlhttp = new myXMLHttpRequest ();

if (mnmxmlhttp) {
mnmxmlhttp.open ("POST", url, true);
mnmxmlhttp.setRequestHeader ('Content-Type',
'application/x-www-form-urlencoded');

mnmxmlhttp.send (content);
errormatch = new RegExp ("^ERROR:");

target2 = document.getElementById ('content');

mnmxmlhttp.onreadystatechange = function () {
if (mnmxmlhttp.readyState == 4) {
mnmString = mnmxmlhttp.responseText;

if (mnmString.match (errormatch)) {
mnmString = mnmString.substring (6, mnmString.length);

target = document.getElementById ('content');
target2.innerHTML = mnmString;

} else {
target = document.getElementById ('content');
target2.innerHTML = mnmString;

}
}
}
}

setTimeout('ajax_update()', 18000);
}

/* Sites em destaque */
function ajax_update2()
{

url2 = "ajax_php2.php";
target3 = document.getElementById ('content2');

aa = a++;

var content2 = "a=" + aa ;

mnmxmlhttp2 = new myXMLHttpRequest ();

if (mnmxmlhttp2) {
mnmxmlhttp2.open ("POST", url2, true);
mnmxmlhttp2.setRequestHeader ('Content-Type',
'application/x-www-form-urlencoded');

mnmxmlhttp2.send (content2);
errormatch = new RegExp ("^ERROR:");

target3 = document.getElementById ('content2');

mnmxmlhttp2.onreadystatechange = function () {
if (mnmxmlhttp2.readyState == 4) {
mnmString = mnmxmlhttp2.responseText;

if (mnmString.match (errormatch)) {
mnmString = mnmString.substring (6, mnmString.length);

target4 = document.getElementById ('content2');
target3.innerHTML = mnmString;

} else {
target4 = document.getElementById ('content2');
target3.innerHTML = mnmString;

}
}
}
}

setTimeout('ajax_update2()', 11000);
}
