// // XWUZ standard code // Having thoughts? Ask here: xwuz@tjp.hu // // if (top.frames.length == 0 && navigator.userAgent.indexOf ('iPhone') == -1 && location.href.indexOf('i2.html') == -1 && location.href.indexOf('research') == -1) { // location.href='game.html'; // } var ibox_active='game'; var ibox_cur=0; var ibox_targets=Array(); var ibox_scroll_timer; ibox_targets['game']=0; ibox_targets['highscore']=-320; ibox_targets['about']=-640; var now = new Date(); var expire = new Date(); expire.setTime(now.getTime() + 1000*60*60*24*90); //90 days var stispace=new Array(); var myims; var gamesplayed; var theirbest; function imgpreload(ims) { myims=new Array(); ims.push('./i/b_yes.png'); ims.push('./i/b_no.png'); ims.push('./i/b_okay.png'); for(i in ims) { myims[i]=new Image(); myims[i].src=ims[i]; } } function menuswitch(obj) { var whereto=obj.href.split('#')[1]; if(whereto=='game' && ibox_active == 'game') {pausegame();iconfirm('
';
document.getElementById('alertbox').style.display='block';
}
function iconfirm(iquestion,idoit) {
document.getElementById('alertbox_content').innerHTML=iquestion+'
';
document.getElementById('alertbox').style.display='block';
}
function getCookie(Name) {
var search = Name + "="
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length
end = document.cookie.indexOf(";", offset)
if (end == -1)
end = document.cookie.length;
return unescape(document.cookie.substring(offset, end))
}
}
return('');
}
function setCookie(name, value) {
document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString())+';domain=lapp.xinli001.com;path=/;');
}
function setTI(todos,interval) {
if(stispace[todos].length == 0) {delete stispace[todos];return false;}
eval(stispace[todos].shift());
setTimeout('setTI('+todos+','+interval+')',interval);
}
function $(id) {
return document.getElementById(id);
}