if(top!=self) top.location=self.location;
var __j_alr=false;
function sethome(){document.body.style.behavior='url(#default#homepage)';if('undefined'!=typeof document.body.setHomePage)document.body.setHomePage('http://www.bijuegos.com');}
function __j_is_browser(br){return(navigator.userAgent.toLowerCase().indexOf(br)+1);}
function do_zoom(ename,_in){if(!__j_is_browser("msie")){alert("El Zoom solo funciona en IE.");return;}var obj=document.getElementById(ename);var m=_in?1.1:0.9;obj.width*=m;obj.height*=m;}
function __j_ajax_query(data){var req=null;if(window.XMLHttpRequest)req=new XMLHttpRequest();else if(window.ActiveXObject)req=new ActiveXObject('Microsoft.XMLHTTP');if(req){req.onreadystatechange=function(){if(req.readyState==4){if(req.status==200){var r=req.responseText;switch(r){case "ok":alert("Se ha agregado el juego a la lista !");break;case "no":alert("No se pudo agregar.\nVerifica que ya no este en tu lista.");break;default:alert("No se pudo completar. Error: "+r);break;}if(!parent||!parent.opener||!parent.opener.document)return;var R_f_where=parent.opener.document.getElementById('div_favoritos');if(!R_f_where)return;var oo;if(window.XMLHttpRequest)oo=new XMLHttpRequest();else if(window.ActiveXObject)oo=new ActiveXObject('Microsoft.XMLHTTP');if(oo){oo.onreadystatechange=function(){if(oo.readyState==4){if(oo.status==200){var r=oo.responseText;if(r=="no")return;R_f_where.innerHTML=r;}else R_f_where.innerHTML=oo.responseText;}};oo.open('GET','/list-fav.php',true);oo.send("");}}else alert('Ooops, error:\n'+req.responseText);__j_alr=false;}};req.open('GET',data,true);req.send("");}}
function __j_check_alr(){var o=__j_alr;if(__j_alr)alert("Ya se esta procesando tu pedido. Por favor espera un momento.\nSi luego de mucho rato aun no funciona, recarga la pagina e intenta de nuevo, o contacta al administrador.");else __j_alr=true;return o;}
function juego_favorito(nm,ln){if(!__j_check_alr())__j_ajax_query('/bookmark.php?a&n='+escape(nm)+'&l='+escape(ln));}
function __recommend(juego,id,lan){window.open('/recomend.php?juego='+juego+'&i='+id+'&lan='+lan,'','width=492,height=317,top=100,left=330,scrollbars=1');}
function __vote(id,idioma){window.open('/vote.php?i='+id+'&idioma='+idioma,'','width=165,height=62,top=200,left=400');}
function _contact(i){window.open('/contact.php?i='+i,'','width=395,height=245');}
function _send_game(i){window.open('/sendg.php?i='+i,'','width=360,height=191');}
function _gamenwork(i,juego){window.open('/contact.php?g=1&i='+i+'&game='+juego,'','width=395,height=245');}

function detectFlash() { var hasReqestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision); if (!hasReqestedVersion) return false; return true; }
function setCookie1(nombre, valor, dias) { var hoy = new Date(); var expira = new Date( hoy.getTime() + (dias * 86400000) ); document.cookie = nombre + "=" + escape(valor) + ";expires=" + expira.toGMTString() +";path=/"  ; }
function showAdvise(){ if(document.cookie.indexOf(escape('showAdv')+'=') == -1) return true; return false; }
function tryToPlay() { document.getElementById('no_flash').style.display = 'none'; if(nav != "IE"){ document.getElementById('container').style.visibility = 'visible'; document.getElementById('container').style.height = '100%'; }else{ document.getElementById('container').style.display = 'block'; } document.getElementById('no-flash').style.display = 'none'; }
function changeCookie(checked) { if(checked) setCookie1('showAdv', 1, 365); else setCookie1('showAdv', '', -365); }