var __j_alr=false;var __j_func='a';var __v_f=0;var __v_t=1;var __v_s=2;var __s_where;var __f_where;var __t_where;var __t_data=[false,false];var __t_data_p;var __t_obj=[null,null,null];var __cache_fav_div_name;
function sethome(){document.body.style.behavior='url(#default#homepage)';if('undefined'!=typeof document.body.setHomePage)document.body.setHomePage('http://www.dailygames.com');}
function addfav(){window.external.AddFavorite('http://www.dailygames.com','Daily Games . com');}
function get_ajax_obj(){if(window.XMLHttpRequest)return new XMLHttpRequest();else if(window.ActiveXObject)return new ActiveXObject('Microsoft.XMLHTTP');else return false;}
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;var err=["The game has been erased from the list !","It could not add.\nVerify than is not already in your list."];switch(r){case"ok":alert(err[0]);break;case"no":alert(err[1]);break;default:alert("No se pudo completar. Error: "+r);break;}if(__j_func=='a'){var R_f_where=parent.opener.document.getElementById('div_favoritos');if(!R_f_where){R_f_where=parent.document.getElementById('div_favoritos');return;}}else{var R_f_where=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','/modulos/list-fav.php',true);oo.send("");}__j_alr=false;}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 quita_favorito(nm){if(!__j_check_alr()){if(!confirm("Quit '"+nm+"' of Favorites ?")){__j_alr=false;return;}__j_func='d';__j_ajax_query('/modulos/bookmark.php?r&n='+escape(nm));}}
function _contact(){window.open('/contact.php','','width=395,height=245');}
function _send_game(){window.open('http://www.dailygames.com/otros/sendg.html','','width=360,height=191');}
function _gamenwork(){window.open('/contact.php?gd','','width=395,height=245');}
function ajax_query(data, callback, id){__t_obj[id]=null;if(__t_obj[id]=get_ajax_obj()){__t_obj[id].onreadystatechange=callback;__t_obj[id].open('GET',data,true);__t_obj[id].send(null);}}
function __f_ajax_query(data){ajax_query(data,__f_processReqChange,__v_f);}
function __t_ajax_query(data){ajax_query(data,__t_processReqChange,__v_t);}
function __f_processReqChange(){if(__t_obj[__v_f].readyState==4){if(__t_obj[__v_f].status==200){var r=__t_obj[__v_f].responseText;if(r=="no"){alert("oops..");return;}__f_where.innerHTML=r;}else __f_where.innerHTML=__t_obj[__v_f].responseText;}}
function __t_processReqChange(){if(__t_obj[__v_t].readyState==4){if(__t_obj[__v_t].status==200){var r=__t_obj[__v_t].responseText;if(r=="no"){__t_where.innerHTML="ERROR";return;}__t_where.innerHTML=r;__t_data[__t_data_p]=r;}else __t_where.innerHTML=__t_obj[__v_t].responseText;}}
function __s_processReqChange(){if(__t_obj[__v_s].readyState==4&&__t_obj[__v_s].status==200)__s_where.innerHTML=__t_obj[__v_s].responseText;}
function lfav_load_list(w){if(w=='')w='div_favoritos';__f_where=document.getElementById(w);if(!__f_where){alert("JavaScript Error: Can't find "+w+" in "+document.title);return;}__f_ajax_query("/modulos/list-fav.php");}
function lfav_load_list_pub(w){if(w=='')w='div_favoritos';__f_where=parent.document.getElementById(w);if(!__f_where){alert("JavaScript Error: '"+w+"' not found in: "+parent.title);return;}__f_ajax_query("/modulos/list-fav.php");}
function ltop_load_list(w,n,cat){__t_where=document.getElementById(w);if(!__t_where)return;if(n=="v"&&(__t_data[0]!=false))__t_where.innerHTML=__t_data[0];else if(n=="j"&&(__t_data[1]!=false))__t_where.innerHTML=__t_data[1];else{if(n=="v")__t_data_p=0;else __t_data_p=1;__t_ajax_query("/juegos2/top."+n+(cat!=""?("."+cat):"")+".zhtml");}if(n=='v'){document.getElementById('div_top_juegos_v').style.display='block';document.getElementById('div_top_juegos_j').style.display='none';}else{document.getElementById('div_top_juegos_j').style.display='block';document.getElementById('div_top_juegos_v').style.display='none';}}
function _load_sponsor(w){__s_where=document.getElementById(w);if(!__s_where)return;ajax_query("/banners/sponsor.html",__s_processReqChange,__v_s);}
function _load_banner(w){__s_where=document.getElementById(w);if(!__s_where)return;ajax_query("/banners/banner.html",__s_processReqChange,__v_s);}
function ltop_chg_view(view){var v_disp=(view=='j')?['block','none']:['none','block'];document.getElementById('div_top_games_played').style.display=v_disp[0];document.getElementById('div_top_games_rated').style.display=v_disp[1];document.getElementById('div_viewtop_games_played').style.display=v_disp[0];document.getElementById('div_viewtop_games_rated').style.display=v_disp[1];}
function _amigos_all() { window.open('/listallfriends.php','','width=700,height=300,top=100,left=200,scrollbars=yes,resizable=yes'); return true; }
function _amigos_add() { window.open('/submit_web.php','','width=351,height=270,top=100,left=200,scrollbars=yes,resizable=yes'); return true; }