<!--
function Ajax(){this.xmlHttp = null;this.onreadystatechange = null;this.linha = -1;this.lista = new Array();this.ocupado = 0;this.tempo = null;this.iniciar();window._ajax = this;}Ajax.prototype.iniciar = function(){try{this.xmlHttp = new XMLHttpRequest();}catch( e ){try{this.xmlHttp = new ActiveXObject( 'Microsoft.XMLHTTP' );}catch( ex ){this.xmlHttp = null;}}};Ajax.prototype.requisitar = function( iUrl, metodo, data ){metodo = ( metodo == 'POST' ) ? 'POST' : 'GET';iUrl = this.fixUrl( iUrl );iUrl = this.noCache( iUrl );if ( this.ocupado != 0 ){this.lista.push( [ iUrl, metodo, data ] );}this.ocupado = 1;var objA = this;var obj = this.xmlHttp;var funcao = null;if ( this.onreadystatechange ){funcao = function() { objA.onreadystatechange(); objA.processar(); };}else{funcao = function() { objA.processar(); };}obj.open( metodo, iUrl, true );obj.onreadystatechange = funcao;if ( metodo == 'GET' ){obj.send( null );}else{if ( typeof( obj.setRequestHeader ) != 'undefined' ){obj.setRequestHeader( 'Content-Type', 'application/x-www-form-urlencoded; charset=UTF-8' );}data = this.montaPost( data );obj.send( data );}};Ajax.prototype.processar = function(){var a = this.lista;if ( this.linha != -1 )this.lista = a.splice( 1, a.length );this.ocupado = 0;if ( this.lista.length > 0 ){if ( this.linha != 0 )this.linha = 0;setTimeout( 'window._ajax.requisitar("'+ this.lista[ 0 ] +'","'+ this.lista[ 1 ] +'","'+ this.lista[ 2 ] +'");', 20 );}};Ajax.prototype.montaPost = function( a ){var c  = '';if ( ! a ){return;}if ( typeof( a ) == 'object' ){for ( var i in a ){c += i +'='+ this.url_escape( a[ i ] ) +'&';}}return c;};Ajax.prototype.url_escape = function( str ){str = str.toString();return escape( str ).replace( /\+/g, "%2B" );};Ajax.prototype.noCache = function( iurl ){if ( iurl.indexOf( '__i=' ) != -1 ){return;}var i = ( iurl.indexOf( '?' ) != -1 ) ? '&' : '?';var a = iurl + i + '__i='+ ( new Date() ).getTime();return a;};Ajax.prototype.fixUrl = function( s ){var d = window.location.toString().split( '/' );var d = d[ 2 ];var d2 = url.toString().split( '/' );var d2 = d2[ 2 ];return s.replace( new RegExp( '^http://'+ d2 ), 'http://'+ d );};
//-->