'+NIX_WRAPPER+'\n'+'wrap.SetIntendedName name\n'+'wrap.SetAuth auth\n'+'Set '+NIX_GET_WRAPPER+' = wrap\n'+'End Function';try{window.execScript(vbscript,'vbscript');}catch(e){return false;}}return true;},setup:function(receiverId,token,forcesecure){isForceSecure[receiverId]=!!forcesecure;if(receiverId==='..'){if(forcesecure){setupSecureRelayToParent(token);}else{conductHandlerSearch();}return true;}try{var frame=document.getElementById(receiverId);var wrapper=window[NIX_GET_WRAPPER](receiverId,token);frame.contentWindow.opener=wrapper;}catch(e){return false;}return true;},call:function(targetId,from,rpc){try{if(nix_channels[targetId]){nix_channels[targetId].SendMessage(gadgets.json.stringify(rpc));}}catch(e){return false;}return true;},relayOnload:function(receiverId,data){var src=data[0]+'#childtoken='+data[1];var childIframe=document.getElementById(receiverId);childIframe.src=src;}};}();}gadgets.rpctx=gadgets.rpctx||{};if(!gadgets.rpctx.rmr){gadgets.rpctx.rmr=function(){var RMR_SEARCH_TIMEOUT=500;var RMR_MAX_POLLS=10;var rmr_channels={};var process;var ready;function appendRmrFrame(channelFrame,relayUri,data,opt_frameId){var appendFn=function(){document.body.appendChild(channelFrame);channelFrame.src='about:blank';if(opt_frameId){channelFrame.onload=function(){processRmrData(opt_frameId);};}channelFrame.src=relayUri+'#'+data;};if(document.body){appendFn();}else{gadgets.util.registerOnLoadHandler(function(){appendFn();});}}function setupRmr(frameId){if(typeof rmr_channels[frameId]==="object"){return;}var channelFrame=document.createElement('iframe');var frameStyle=channelFrame.style;frameStyle.position='absolute';frameStyle.top='0px';frameStyle.border='0';frameStyle.opacity='0';frameStyle.width='10px';frameStyle.height='1px';channelFrame.id='rmrtransport-'+frameId;channelFrame.name=channelFrame.id;var relayUri=gadgets.rpc.getRelayUrl(frameId);if(!relayUri){relayUri=gadgets.rpc.getOrigin(gadgets.util.getUrlParameters()["parent"])+'/robots.txt';}rmr_channels[frameId]={frame:channelFrame,receiveWindow:null,relayUri:relayUri,searchCounter:0,width:10,waiting:true,queue:[],sendId:0,recvId:0};if(frameId!=='..'){appendRmrFrame(channelFrame,relayUri,getRmrData(frameId));}conductRmrSearch(frameId);}function conductRmrSearch(frameId){var channelWindow=null;rmr_channels[frameId].searchCounter++;try{var targetWin=gadgets.rpc._getTargetWin(frameId);if(frameId==='..'){channelWindow=targetWin.frames['rmrtransport-'+gadgets.rpc.RPC_ID];}else{channelWindow=targetWin.frames['rmrtransport-..'];}}catch(e){}var status=false;if(channelWindow){status=registerRmrChannel(frameId,channelWindow);}if(!status){if(rmr_channels[frameId].searchCounter>RMR_MAX_POLLS){return;}window.setTimeout(function(){conductRmrSearch(frameId);},RMR_SEARCH_TIMEOUT);}}function callRmr(targetId,serviceName,from,rpc){var handler=null;if(from!=='..'){handler=rmr_channels['..'];}else{handler=rmr_channels[targetId];}if(handler){if(serviceName!==gadgets.rpc.ACK){handler.queue.push(rpc);}if(handler.waiting||(handler.queue.length===0&&!(serviceName===gadgets.rpc.ACK&&rpc&&rpc.ackAlone===true))){return true;}if(handler.queue.length>0){handler.waiting=true;}var url=handler.relayUri+"#"+getRmrData(targetId);try{handler.frame.contentWindow.location=url;var newWidth=handler.width==10?20:10;handler.frame.style.width=newWidth+'px';handler.width=newWidth;}catch(e){return false;}}return true;}function getRmrData(toFrameId){var channel=rmr_channels[toFrameId];var rmrData={id:channel.sendId};if(channel){rmrData.d=Array.prototype.slice.call(channel.queue,0);rmrData.d.push({s:gadgets.rpc.ACK,id:channel.recvId});}return gadgets.json.stringify(rmrData);}function processRmrData(fromFrameId){var channel=rmr_channels[fromFrameId];var data=channel.receiveWindow.location.hash.substring(1);var rpcObj=gadgets.json.parse(decodeURIComponent(data))||{};var rpcArray=rpcObj.d||[];var nonAckReceived=false;var noLongerWaiting=false;var numBypassed=0;var numToBypass=(channel.recvId-rpcObj.id);for(var i=0;i0)){var from=(fromFrameId==='..')?gadgets.rpc.RPC_ID:'..';callRmr(fromFrameId,gadgets.rpc.ACK,from,{ackAlone:nonAckReceived});}}function registerRmrChannel(frameId,channelWindow){var channel=rmr_channels[frameId];try{var canAccess=false;canAccess='document'in channelWindow;if(!canAccess){return false;}canAccess=typeof channelWindow['document']=='object';if(!canAccess){return false;}var loc=channelWindow.location.href;if(loc==='about:blank'){return false;}}catch(ex){return false;}channel.receiveWindow=channelWindow;function onresize(){processRmrData(frameId);};if(typeof channelWindow.attachEvent==="undefined"){channelWindow.onresize=onresize;}else{channelWindow.attachEvent("onresize",onresize);}if(frameId==='..'){appendRmrFrame(channel.frame,channel.relayUri,getRmrData(frameId),frameId);}else{processRmrData(frameId);}return true;}return{getCode:function(){return'rmr';},isParentVerifiable:function(){return true;},init:function(processFn,readyFn){process=processFn;ready=readyFn;return true;},setup:function(receiverId,token){try{setupRmr(receiverId);}catch(e){gadgets.warn('Caught exception setting up RMR: '+e);return false;}return true;},call:function(targetId,from,rpc){return callRmr(targetId,rpc.s,from,rpc);}};}();}gadgets.rpctx=gadgets.rpctx||{};if(!gadgets.rpctx.ifpc){gadgets.rpctx.ifpc=function(){var iframePool=[];var callId=0;var ready;function encodeLegacyData(args){var argsEscaped=[];for(var i=0,j=args.length;i=0;--i){var ifr=iframePool[i];try{if(ifr&&(ifr.recyclable||ifr.readyState==='complete')){ifr.parentNode.removeChild(ifr);if(window.ActiveXObject){iframePool[i]=ifr=null;iframePool.splice(i,1);}else{ifr.recyclable=false;iframe=ifr;break;}}}catch(e){}}if(!iframe){iframe=document.createElement('iframe');iframe.style.border=iframe.style.width=iframe.style.height='0px';iframe.style.visibility='hidden';iframe.style.position='absolute';iframe.onload=function(){this.recyclable=true;};iframePool.push(iframe);}iframe.src=src;window.setTimeout(function(){document.body.appendChild(iframe);},0);}return{getCode:function(){return'ifpc';},isParentVerifiable:function(){return true;},init:function(processFn,readyFn){ready=readyFn;ready('..',true);return true;},setup:function(receiverId,token){ready(receiverId,true);return true;},call:function(targetId,from,rpc){var relay=gadgets.rpc.getRelayUrl(targetId);++callId;if(!relay){gadgets.warn('No relay file assigned for IFPC');return false;}var src=null;if(rpc.l){var callArgs=rpc.a;src=[relay,'#',encodeLegacyData([from,callId,1,0,encodeLegacyData([from,rpc.s,'','',from].concat(callArgs))])].join('');}else{src=[relay,'#',targetId,'&',from,'@',callId,'&1&0&',encodeURIComponent(gadgets.json.stringify(rpc))].join('');}emitInvisibleIframe(src);return true;}};}();}if(!gadgets.rpc){gadgets.rpc=function(){var CALLBACK_NAME='__cb';var DEFAULT_NAME='';var ACK='__ack';var SETUP_FRAME_TIMEOUT=500;var SETUP_FRAME_MAX_TRIES=10;var services={};var relayUrl={};var useLegacyProtocol={};var authToken={};var callId=0;var callbacks={};var setup={};var sameDomain={};var params={};var receiverTx={};var earlyRpcQueue={};var isChild=(window.top!==window.self);var rpcId=window.name;var securityCallback=function(){};var LOAD_TIMEOUT=0;var FRAME_PHISH=1;var FORGED_MSG=2;var fallbackTransport=(function(){function logFn(name){return function(){gadgets.log("gadgets.rpc."+name+"("+gadgets.json.stringify(Array.prototype.slice.call(arguments))+"): call ignored. [caller: "+document.location+", isChild: "+isChild+"]");};}return{getCode:function(){return"noop";},isParentVerifiable:function(){return true;},init:logFn("init"),setup:logFn("setup"),call:logFn("call")};})();if(gadgets.util){params=gadgets.util.getUrlParameters();}function getTransport(){return typeof window.postMessage==='function'?gadgets.rpctx.wpm:typeof window.postMessage==='object'?gadgets.rpctx.wpm:window.ActiveXObject?gadgets.rpctx.nix:navigator.userAgent.indexOf('WebKit')>0?gadgets.rpctx.rmr:navigator.product==='Gecko'?gadgets.rpctx.frameElement:gadgets.rpctx.ifpc;}function transportReady(receiverId,readySuccess){var tx=transport;if(!readySuccess){tx=fallbackTransport;}receiverTx[receiverId]=tx;var earlyQueue=earlyRpcQueue[receiverId]||[];for(var i=0;i4){process(gadgets.json.parse(decodeURIComponent(fragment[fragment.length-1])));}else{relayOnload.apply(null,fragment.concat(otherWindow));}},receiveSameDomain:function(rpc){rpc.a=Array.prototype.slice.call(rpc.a);window.setTimeout(function(){process(rpc);},0);},getOrigin:getOrigin,getReceiverOrigin:function(receiverId){var channel=receiverTx[receiverId];if(!channel){return null;}if(!channel.isParentVerifiable(receiverId)){return null;}var origRelay=gadgets.rpc.getRelayUrl(receiverId)||gadgets.util.getUrlParameters().parent;return gadgets.rpc.getOrigin(origRelay);},init:function(){if(transport.init(process,transportReady)===false){transport=fallbackTransport;}if(isChild){setupReceiver('..');}},_getTargetWin:getTargetWin,_createRelayIframe:function(token,data){var relay=gadgets.rpc.getRelayUrl('..');if(!relay){return null;}var src=relay+'#..&'+rpcId+'&'+token+'&'+encodeURIComponent(gadgets.json.stringify(data));var iframe=document.createElement('iframe');iframe.style.border=iframe.style.width=iframe.style.height='0px';iframe.style.visibility='hidden';iframe.style.position='absolute';function appendFn(){document.body.appendChild(iframe);iframe.src='javascript:""';iframe.src=src;}if(document.body){appendFn();}else{gadgets.util.registerOnLoadHandler(function(){appendFn();});}return iframe;},ACK:ACK,RPC_ID:rpcId,SEC_ERROR_LOAD_TIMEOUT:LOAD_TIMEOUT,SEC_ERROR_FRAME_PHISH:FRAME_PHISH,SEC_ERROR_FORGED_MSG:FORGED_MSG};}();gadgets.rpc.init();}gadgets.rpc.register('update_security_token',function(token){shindig.auth.updateSecurityToken(token);});gadgets.window=gadgets.window||{};(function(){var oldHeight;function parseIntFromElemPxAttribute(elem,attr){var style=window.getComputedStyle(elem,"");var value=style.getPropertyValue(attr);value.match(/^([0-9]+)/);return parseInt(RegExp.$1,10);}function getHeightForWebkit(){var result=0;var queue=[document.body];while(queue.length>0){var elem=queue.shift();var children=elem.childNodes;for(var i=0;i=0){newHeight=getHeightForWebkit();}else if(body&&docEl){var sh=docEl.scrollHeight;var oh=docEl.offsetHeight;if(docEl.clientHeight!==oh){sh=body.scrollHeight;oh=body.offsetHeight;}if(sh>vh){newHeight=sh>oh?sh:oh;}else{newHeight=sh var loadImg = "http://p.img.337.com/static/loading_b.gif"; document.getElementById("load").src = loadImg; var serverUrl = "http://p.337.com/site/index.php?gKey=ddt@elex337_pt_1&newTab=1"; var newtab=true; var app_id = "ddt@elex337_pt_1"; var user_id = ""; var page_width = 0; var paykey = "eaf38620375c012e88131edb0f3c16bf"; var gUserPro = new Array(); var flash_width = 760; var flash_height = 0; function startgame(){ page_width = $(window).width(); // var urlparams = gadgets.util.getUrlParameters(); if(typeof(urlparams.appparams) != ""){ var appparams = eval('('+urlparams.appparams+')'); if(typeof(appparams) == "object"){ if(appparams.act == "directplay"){ direct_play(appparams); }else{ startGetUserProfile(); } }else{ startGetUserProfile(); } }else{ startGetUserProfile(); } } gadgets.util.registerOnLoadHandler(startgame); gadgets.util.runOnLoadHandlers();