$(document).ready(function(){
	initSlideshow();				   
});
function initSlideshow() {
	$('#sfeer, #entrak_slides').cycle({
		fx:     'fade',
		timeout: 1500,
		speed:	 2000
	});
}

function overBodyPart(id){
	document.getElementsByName('myFlash')[0].SetVariable("rolParte", id);
}
function outBodyPart(id){
	document.getElementsByName('myFlash')[0].SetVariable("outParte", id);
}

function cambiaIdioma(i){
	pag=document.location.href.split("/");
	pag=pag[pag.length-1];
	
	if(pag!=false){
		document.location.href='../'+i+'/'+pag;	
	}else{
		document.location.href='../'+i+'/index.php';	
	}
}

function loadTwitterStream(){
	 document.write("<div id='twt_stream'><span id='loading'>Loading stream...</span></div>");
	$.ajax({
	   type: "POST",
	   url: "twitter_stream.php",
	   data: "",
	   success: function(msg){
		 
		  $("#twt_stream").html(msg);
		  $("#twt_stream .twt_stream").cycle({
			  fx:     'scrollLeft',
			  timeout: 5000,
			  speed: 500
		  });
	   }
 	});
}

