$(document).ready(function(){clickToSwitch();});var thsPassport=external.createObject('Passport');var quote=external.createObject("Quote");var clickToSwitch=function()
{$("html").dblclick(function(){$("#zxg").trigger('click');});$(".switchPage").click(function(){var name=$(this).attr("id");changePage(name);});$(".innerRedirect").click(function(){var id=$(this).attr("id");innerRedirect(id);});}
var changePage=function(name)
{var selfStocks=eval(thsPassport.selfStocks());var selfStock1='600000';if(selfStocks.length!=0){for(i in selfStocks){var tmpStock=selfStocks[i];var partStr=tmpStock.slice(0,2);if(tmpStock.length==6&&(partStr=='60'||partStr=='00'||partStr=='30')){selfStock1=tmpStock;break;}else{continue;}}}
var obj={};obj.code=selfStock1;if(name=='szby'||name=='jcmm'){obj.id='65';}else{obj.id=getPid(name);}
quote.switchPage(obj);if(name=='szby'){setTimeout(function(){var thsquote=external.createObject("Quote");thsquote.switchTab('散庄博弈');delete thsquote;thsquote=null;},100);}else if(name=='jcmm'){setTimeout(function(){var thsquote=external.createObject("Quote");thsquote.switchTab('决策密码');delete thsquote;thsquote=null;},100);}}
var innerRedirect=function(name)
{var thsUtil=external.createObject("Util");var purl=getUrl(name);thsUtil.openURL(purl,2);}
var getPid=function(name)
{var obj={'bbd':6240,'dptj':8796,'hjbscqj':7639,'bjbscqj':5435,'bkrd':4197,'cprd':4197,'hjbyjxg':7647,'bjbyjxg':7362,'zxg':392,'hjbszzs':4341,'hjbszcz':4364,'bjbszzs':6240,'bjbszcz':6052,'sz':6061,'sh':4417,'bk':6002};return obj[name];}
var getUrl=function(name)
{var obj={'jggsd':'http://vis.10jqka.com.cn/decisionmaker/?do=cpxf_gsd&account=<account>&passwd=<passwd>','jgxf':'http://vis.10jqka.com.cn/level2/?do=level2_pool&css=cpxf&account=<account>&passwd=<passwd>','jbp':'http://vis.10jqka.com.cn/topwin/select/?do=zjkz&type=5&account=<account>&passwd=<passwd>','ztxg':'http://vis.10jqka.com.cn/topwin/select/?do=ztxg&account=<account>&passwd=<passwd>','bkzjyq':'http://vis.10jqka.com.cn/level2/?do=level2_net_plate&css=cpxf&account=<account>&passwd=<passwd>','jgyc':'http://www.10jqka.com.cn/cpxf/?templ=jgyc','gmxx':'http://www.10jqka.com.cn/school/','szby_play':'http://www.10jqka.com.cn/entrance/?school_szby','jcmm_play':'http://www.10jqka.com.cn/entrance/?school_jcmm','bbd_play':'http://www.10jqka.com.cn/entrance/?school_bbd','dptj_play':'http://www.10jqka.com.cn/entrance/?school_dptj','dpzx':'http://vis.10jqka.com.cn/decisionmaker/?do=dpqyb&css=cpxf&account=<account>&passwd=<passwd>'};return obj[name];}