\n');
}
function win_closed(winVar) {
var ua = navigator.userAgent
if (!!winVar)
if ((ua.indexOf('Gecko') != -1 || ua.indexOf('MSIE 4') != -1)
&& ua.indexOf('Win') != -1)
return winVar.closed
else return typeof winVar.document != 'object'
else return true
}
var my_x;
var my_y;
function writePosToCookie() {
if (my_x == window.screenLeft && my_y == window.screenTop) return;
my_x = window.screenLeft;
my_y = window.screenTop;
document.cookie = "player_x=" + my_x + "; path=/; expires=Sat, 18-May-2024 07:41:38 GMT";
document.cookie = "player_y=" + my_y + "; path=/; expires=Sat, 18-May-2024 07:41:38 GMT";
}
function init() {
setInterval('writePosToCookie()', 1000);
my_x = getCookie("player_x");
my_y = getCookie("player_y");
}
function getCookie(key) {
tmp1 = " " + document.cookie + ";";
xx1 = xx2 = 0;
while (xx1 < tmp1.length) {
xx2 = tmp1.indexOf(";", xx1);
tmp2 = tmp1.substring(xx1 + 1, xx2);
xx3 = tmp2.indexOf("=");
if (tmp2.substring(0, xx3) == key) {
return(decodeURI(tmp2.substring(xx3 + 1, xx2 - xx1 - 1)));
}
xx1 = xx2 + 1;
}
return("");
};
function ajaxReq(url){
var msec = (new Date()).getTime();
new Ajax.Request(url, {
method: "get",
parameters: "cache="+msec,
postBody : "aasaaaa",
onSuccess:function(httpObj){
$("result1").innerHTML = httpObj.responseText;
$("result2").innerHTML = httpObj.responseXML;
},
onFailure:function(httpObj){
$("result1").innerHTML = "エラーで読み込めませんでした";
}
});
}
fflag=0;
if (document.layers || document.all || document.getElementById) {
if (document.all && !window.opera && navigator.useAgent.indexOf('Win')>-1) {
document.write('