var codetries; var webkinzLocaleCookie; function getBrowserCookie(){ dc=document.cookie.split(";"); //dc[0] is codetries //alert(dc[0]); //ct is codetries value ct = dc[0].split("="); //alert("cookie = "+ct[1]); codetries = ct[1]; //alert("getBrowserCookie: codetries = "+codetries); //cookie fix code starts 20080229 by KW if (!((codetries>=0) && (codetries<=5))){ //alert("before: codetries = "+codetries); codetries = 0; //alert("after: codetries = "+codetries); }else{ //alert("cannot get it"); } //cookie fix code ends //webkinzLocaleCookie = readCookie("webkinzLocaleCookie"); //alert("webkinzLocaleCookie = "+webkinzLocaleCookie); } function getSecretCodeCookie(area){ getBrowserCookie(); //alert("getSecretCodeCookie("+area+"), codetries = "+codetries); if (area=="main"){ //alert("window.document.main = "+window.document.main); //window.document.main.SetVariable("mycodetries",ct[1]); //window.document.main.SetVariable("mycodetries",codetries); }else{ //alert("window.document.adoptionCenter = "+window.document.adoptionCenter); //alert("window.document['adoptionCenter'] = "+window.document['adoptionCenter'] ); //window.document.adoptionCenter.SetVariable("mycodetries",ct[1]); //alert("adoptionCenter codetries = "+codetries); //window.document.adoptionCenter.SetVariable("mycodetries",codetries); } } //This JavaScript function sets the number of tries the user enters the pet code. function setSecretCodeCookie(tries) { var futdate = new Date(); //Get the current time and date var expdate = futdate.getTime(); //Get the milliseconds since Jan 1, 1970 var expdate = expdate+3600*1000*24; //expires in 1 day(milliseconds) futdate.setTime(expdate); var cookieString ="codetries="+tries+";expires=" + futdate.toGMTString(); //alert("cookieString = "+cookieString); document.cookie = cookieString; } function readCookie(name){ var nameEQ=name+"="; var value; var ca=document.cookie.split(';'); for(var i=0;i0) { var w = 536; var h = 402; } else { var w = 1000; var h = 680; } var WAPIserver = new Array(); WAPIserver[1]= 'wapi1.webkinz.com'; WAPIserver[2]= 'wapi2.webkinz.com'; WAPIserver[3]= 'wapi3.webkinz.com'; WAPIserver[4]= 'wapi4.webkinz.com'; WAPIserver[5]= 'wapi5.webkinz.com'; WAPIserver[6]= 'wapi6.webkinz.com'; WAPIserver[7]= 'wapi7.webkinz.com'; WAPIserver[8]= 'wapi8.webkinz.com'; WAPIserver[9]= 'wapi9.webkinz.com'; WAPIserver[10]= 'wapi10.webkinz.com'; WAPIserver[11]= 'wapi11.webkinz.com'; WAPIserver[12]= 'wapi12.webkinz.com'; WAPIserver[13]= 'wapi13.webkinz.com'; WAPIserver[14]= 'wapi14.webkinz.com'; WAPIserver[15]= 'wapi15.webkinz.com'; WAPIserver[16]= 'wapi16.webkinz.com'; WAPIserver[17]= 'wapi17.webkinz.com'; WAPIserver[18]= 'wapi18.webkinz.com'; WAPIserver[19]= 'wapi19.webkinz.com'; // BT: if the country argument is set to "free" // then this code is running on a tier0 site // so there should be a geoIPCountry variable // defined in the window scope by loader4.php //alert("webkinzLocaleCookie = "+readCookie('webkinzLocaleCookie')); main = 'main2.v125_1.swf'; WAPIdomain = WAPIserver[world_DbId]; aol = (navigator.userAgent.toLowerCase().indexOf('aol')>0 && navigator.userAgent.toLowerCase().indexOf('netscape')<0 ? 1 : 0); html = ''; html = html + ' '; html = html + ' '; html = html + ' '; html = html + ' '; html = html + ' '; html = html + ' '; //html = html + ' '; html = html + ' '; html = html + ' '; html = html + ' '; html = html + ''; // alert(html); // added for the bridge - PhilS document.getElementById('api').innerHTML = '
'; document.getElementById('divMain').innerHTML = html; } // added to load the AS3 ElectroServer4.0.n Client function loadES4() { html2 = ''; html2 = html2 + ' '; html2 = html2 + ' '; html2 = html2 + ' '; html2 = html2 + ' '; html2 = html2 + ' '; html2 = html2 + ' '; html2 = html2 + ' '; html2 = html2 + ''; // alert(html2); document.getElementById('divES4').innerHTML = html2; }