function SWFZoom(dZ) 
{
if (dZ==0) { 
		 var nwZ = eval(document.getElementById("swf_game").width*0.9);
		 var nhZ = eval(document.getElementById("swf_game").height*0.9);
	} else {
		 var nwZ = eval(document.getElementById("swf_game").width*1.1);
		 var nhZ = eval(document.getElementById("swf_game").height*1.1);
	}
	document.getElementById("swf_game").width=nwZ;
	document.getElementById("swf_game").height=nhZ;
}
function add_fav(cname,name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
	if (days==-1){}
	else{
	var curtextval = document.getElementById("fav_text");
    curtextval.innerHTML = "<div id='fav_text2'><a href=\"/favoritos.php\" class='favor'>Aņadido a Mis favoritos</a></div>";
	alert('"'+cname+'" aņadido a tu lista de favoritos');
	}
}
function leerCookie(name) {
  var nameEQ = name + "=";
  var ca = document.cookie.split(';');
  for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==' ') c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  }
  return null;
}
function check_fav(name,value,url)
{
	var valor = leerCookie(name);
	var value = value;
	if (valor == value){document.write("<div id='fav_text2'><a href=\"/favoritos.php\" class='favor'>Aņadido a Mis favoritos</a></div>"); }
	else {document.write ("<div id='fav_text'>&nbsp;&nbsp;&nbsp;<a href='#' onclick=\"javascript:add_fav('"+value+"','"+name+"','"+value+"',1000);\" class='favor'>Aņadir a mis favoritos</a></div>"); }
}
function del_fav(name,value,id)
{
add_fav(value,name,value,-1);
var curtextval = document.getElementById(id);
    curtextval.innerHTML = "";
}
var t;
function clickNext(){
    document.getElementById('btnNext').click(); 
    t=setTimeout("clickNext()",1000);
}
function clickPrev(){
    document.getElementById('btnPrev').click(); 
    t=setTimeout("clickPrev()",1000);
}
function slideStop(){
    clearTimeout(t);
}
