function ajax() {
  if (window.XMLHttpRequest) { // Mozilla, Safari,...
       xmlhttp = new XMLHttpRequest();
       if (xmlhttp.overrideMimeType) {
           xmlhttp.overrideMimeType('text/html');
           // See note below about this line
       }
   } else if (window.ActiveXObject) { // IE
       try {
           xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
       } catch (e) {
           try {
               xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
               } catch (e) {}
       }
   }
  return xmlhttp;
}

function enviar(url, parametros, action, q) {

if (action != "aba") {
document.getElementById(action).innerHTML = "<span style='color:#ffcc00'>Carregando...</span>";
}

if (action == "aba") {
document.getElementById(action).innerHTML = "<span style='color:#ffcc00; margin-left: 30px;'>Carregando...</span>";
}

  ajax();
	arquivo = url + "?" + parametros;
  xmlhttp.open('POST',arquivo,true);

  xmlhttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded;');

  xmlhttp.onreadystatechange = function() {
           if (xmlhttp.readyState == 4){
            if (xmlhttp.status == 200) {
                var texto = xmlhttp.responseText;
				//texto = unescape(texto);
				//alert(texto);
				document.getElementById(action).innerHTML = texto;
				
				if (action == "aba") {
					iNettuts.init();

					if (q == "1") {
						continua("simviral");
						s = q;
						q = "";
					}
					
					if (q == "2") {
						continua("g1");
						s = q;
						q = "";
					}
					
					if (q == "3") {
						continua("gesporte");
						s = q;
						q = "";
					}
					
					if (q == "4") {
						continua("cinenews");
						s = q;
						q = "";
					}
					
					
					
				}
	
				continua(q);
				
				} else {
					
                document.getElementById(action).innerHTML = "OPS! OCORREU UM ERRO!<br/><br/>" + parametros;
				continua(q);
            }
     }
  }
  xmlhttp.send(parametros);
}

s = 1;

function homepage() {
	
	if (s == "1") { continua('simviral') }
	if (s == "2") { continua('g1') }
	if (s == "3") { continua('gesporte') }
	if (s == "4") { continua('cinenews') }
	
}


function continua(q) {

p="";

if (q == "simviral") {
	n = "http://feeds.feedburner.com/simviral/"
	d = q
	p = "gizmodo"
	}

if (q == "gizmodo") {
	n = "http://feeds.feedburner.com/gizmodobr?format=xml"
	d = q
	p = "bannerblog"
	}

if (q == "bannerblog") {
	n = "http://feeds.feedburner.com/bannerblog/"
	d = q
	p = "lafora"
	}
	
if (q == "lafora") {
	n = "http://feeds.feedburner.com/LaFora/"
	d = q 
	p = "experiencia" }
	
if (q == "experiencia") {
	n = "http://uxblog.locaweb.com.br/?feed=rss2"
	d = q 
	p = "ivogomes" }
	
if (q == "ivogomes") {
	n = "http://feeds.feedburner.com/ivogomes/"
	d = q 
	p = "revolucao" }
	
if (q == "revolucao") {
	n = "http://feeds.feedburner.com/Revolucao"
	d = q 
	p = "mobilepedia" }
	
if (q == "mobilepedia") {
	n = "http://feeds2.feedburner.com/mobilepedia-br"
	d = q 
	p = "himidia" }
	
if (q == "himidia") {
	n = "http://www.hi-midia.com/feed/"
	d = q 
	p = "exvertebrum" }

if (q == "exvertebrum") {
	n = "http://feeds2.feedburner.com/ExVertebrum"
	d = q 
	p = "mkt360" }
	
if (q == "mkt360") {
	n = "http://mkt360.blogspot.com/feeds/posts/default?alt=rss"
	d = q 
	p = "icecream" }
	
if (q == "icecream") {
	n = "http://www.icecreamnow.com.br/feed/"
	d = q 
	p = "up" }
	
if (q == "up") {
	n = "http://www.unitedplanners.com.br/?feed=rss2"
	d = q 
	p = "folhatec" }

if (q == "folhatec") {
	n = "http://feeds.folha.uol.com.br/tec/rss091.xml"
	d = q 
	p = "viuisso" }
	


if (q == "viuisso") {
	n = "http://feeds.feedburner.com/Viuisso/"
	d = q 
	p = "usabilidoido" }
	
if (q == "usabilidoido") {
	n = "http://feeds.feedburner.com/usabilidoido/"
	d = q 
	p = "webinsider" }
	
if (q == "webinsider") {
	n = "http://webinsider.uol.com.br/index.php/feed/rss/"
	d = q 
	p = "plannerfm" }
	
if (q == "plannerfm") {
	n = "http://plannerfelipemorais.blogspot.com/feeds/posts/default?alt=rss"
	d = q 
	p = "imasters" }
	
if (q == "imasters") {
	n = "http://imasters.uol.com.br/feed/secao/teoria/"
	d = q 
	p = "idgnow" }

if (q == "idgnow") {
	n = "http://idgnow.uol.com.br/internet/RSS2/"
	d = q 
	p = "arquitetura" }

if (q == "arquitetura") {
	n = "http://arquiteturadeinformacao.com/feed/"
	d = q 
	p = "chmkt" }
	
if (q == "chmkt") {
	n = "http://feeds.feedburner.com/blogspot/chmkt?format=xml"
	d = q 
	p = "gattune" }

if (q == "gattune") {
	n = "http://feeds2.feedburner.com/gattune"
	d = q 
	p = "info" }
	
if (q == "info") {
	n = "http://feeds.feedburner.com/NoticiasINFO-Internet?format=xml"
	d = q 
	p = "rww" }
	
if (q == "rww") {
	n = "http://feeds.feedburner.com/ReadwritewebBrasil?format=xml"
	d = q 
	p = "6bit" }
	
if (q == "6bit") {
	n = "http://meiobit.com/index.xml"
	d = q 
	p = "bluebus" }

	
	
	

if (q == "bluebus") {
	n = "http://www.bluebus.com.br/rss.xml"
	d = q 
	p = "ccsp" }

if (q == "ccsp") {
	n = "http://www.ccsp.com.br/novo/feed.php"
	d = q 
	p = "mmonline" }

if (q == "mmonline") {
	n = "http://www.meioemensagem.com.br/novomm/br/rss/rss_noticias.xml"
	d = q 
	p = "brainstorm" }

if (q == "brainstorm") {
	n = "http://feeds2.feedburner.com/brainstorm9"
	d = q 
	p = "hiro" }

if (q == "hiro") {
	n = "http://www.hiro.art.br/widonid/feed/"
	d = q 
	p = "garimpo" }
	
if (q == "garimpo") {
	n = "http://garimpodeideias.wordpress.com/feed/"
	d = q 
	p = "package" }

if (q == "package") {
	n = "http://feeds2.feedburner.com/LovelyPackage"
	d = q 
	p = "g1tech" }
	
if (q == "g1tech") {
	n = "http://g1.globo.com/dynamo/tecnologia/rss2.xml"
	d = q 
	p = "" }

	
	
	
if (q == "g1") {
	n = "http://g1.globo.com/Rss2/0,,AS0-5597,00.xml"
	d = q 
	p = "epoca" }
	
if (q == "epoca") {
	n = "http://revistaepoca.globo.com/Revista/Epoca/Rss/0,,EDT0-15518,00.xml"
	d = q 
	p = "terra" }
	
if (q == "terra") {
	n = "http://rss.terra.com.br/0,,EI1,00.xml"
	d = q 
	p = "estadao" }
	
if (q == "estadao") {
	n = "http://www.estadao.com.br/rss/manchetes.xml"
	d = q 
	p = "exame" }
	
if (q == "exame") {
	n = "http://portalexame.abril.com.br/rss/noticias/index.xml"
	d = q 
	p = "folhasp" }
	
	
if (q == "folhasp") {
	n = "http://feeds.folha.uol.com.br/folha/emcimadahora/rss091.xml"
	d = q 
	p = "veja" }
	
if (q == "veja") {
	n = "http://veja.abril.com.br/noticias/rss/VejaRssNoticias.xml"
	d = q 
	p = "odia" }
	
if (q == "odia") {
	n = "http://feeds.feedburner.com/ODiaOnLine?format=xml"
	d = q 
	p = "" }




if (q == "gesporte") {
	n = "http://globoesporte.globo.com/Esportes/Rss/0,,AS0-9645,00.xml"
	d = q 
	p = "gesportiva" }
	
if (q == "gesportiva") {
	n = "http://www.gazetaesportiva.net/rss/jogoRapido.xml"
	d = q 
	p = "terraesporte" }
	
if (q == "terraesporte") {
	n = "http://rss.terra.com.br/0,,EI1137,00.xml"
	d = q 
	p = "estadaoesporte" }
	
if (q == "estadaoesporte") {
	n = "http://www.estadao.com.br/rss/esportes.xml"
	d = q 
	p = "folhaesporte" }
	
if (q == "folhaesporte") {
	n = "http://feeds.folha.uol.com.br/folha/esporte/rss091.xml"
	d = q 
	p = "lancenet" }
	
if (q == "lancenet") {
	n = "http://www.lancenet.com.br/export/rss/noticias.xml"
	d = q 
	p = "" }
	



if (q == "cinenews") {
	n = "http://www.cinemaemcena.com.br/rSS.aspx?secao=cinenews"
	d = q 
	p = "g1cinema" }
	
if (q == "g1cinema") {
	n = "http://g1.globo.com/Rss2/0,,AS0-7086,00.xml"
	d = q 
	p = "cterra" }
	
if (q == "cterra") {
	n = "http://rss.terra.com.br/0,,EI1176,00.xml"
	d = q 
	p = "uolcinema" }
	
if (q == "uolcinema") {
	n = "http://rss.cinema.uol.com.br/ultnot/index.xml"
	d = q 
	p = "omelete" }
	
if (q == "omelete") {
	n = "http://www.omelete.com.br/rss/rss.aspx"
	d = q 
	p = "trailersfilmes" }
	
if (q == "trailersfilmes") {
	n = "http://www.trailers-filmes.com/feed/rss/"
	d = q 
	p = "cineclick" }
	
if (q == "cineclick") {
	n = "http://cinema.cineclick.uol.com.br/index.php/rss/noticia"
	d = q 
	p = "applemovie" }
	
if (q == "applemovie") {
	n = "http://images.apple.com/trailers/home/rss/newtrailers.rss"
	d = q 
	p = "epipoca_n" }
	
	
if (q == "epipoca_n") {
	n = "http://epipoca.uol.com.br/rss/noticias.php"
	d = q 
	p = "epipoca_f" }
	
if (q == "epipoca_f") {
	n = "http://epipoca.uol.com.br/rss/filmes.php"
	d = q 
	p = "epipoca_c" }
	
if (q == "epipoca_c") {
	n = "http://epipoca.uol.com.br/rss/cinema.php"
	d = q 
	p = "epipoca_d" }
	
if (q == "epipoca_d") {
	n = "http://epipoca.uol.com.br/rss/dvd.php"
	d = q 
	p = "seucinema" }
	
if (q == "seucinema") {
	n = "http://www.seucinema.com/feeds.rss"
	d = q 
	p = "" }
	
	
	
if (q != "") {
enviar("rssajax.asp", "n="+n, d, p);
}

}

homepage();
abat = setInterval('homepage()', 30 * 60000);

function aba(aba) {
	
	if (aba == "webdesign") {
		enviar("webdesign.asp", "", "aba", "1");
	}
	if (aba == "noticias") {
		enviar("noticias.asp", "", "aba", "2");
	}
	if (aba == "esportes") {
		enviar("esportes.asp", "", "aba", "3");
	}
	if (aba == "cinema") {
		enviar("cinema.asp", "", "aba", "4");
	}
	if (aba == "links") {
		enviar("links.asp", "", "aba", "5");
	}
	//alert(aba);
}