
var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;var needloadFlash=0;function detectFlash()
{try{if(navigator.mimeTypes.length>0)
{if(navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin==null)
throw"error";else if(!DetectFlashVer(9,0,124))
throw"error";}
else if(window.ActiveXObject)
{new ActiveXObject("ShockwaveFlash.ShockwaveFlash");if(!DetectFlashVer(9,0,124))
throw"error";}
else
throw"error";}
catch(e)
{if(!document.getElementById("none_flash_id"))
return;var domTips=top.leftfra.document.getElementById("none_flash_id");var shtml='<p class="flash_info">flash 版本过低，正在为您升级</p>';shtml+='<p class="load_gif"><img src="http://imgcache.qq.com/qqshow_v3/ac/popup/loading_icon.gif" alt="加载中" />请稍候</p>';shtml+='<p id="flashdownload">您也可以选择<a class="em" target="_blank" href="http://get.adobe.com/flashplayer">手动下载更新</a></p>';shtml+='<p>安装成功后,请刷新页面</p>';domTips.innerHTML=shtml.escNone();domTips.style.visibility="";var domTipsHref=top.leftfra.document.getElementById("flashdownload");if(_MSIE())
domTipsHref.innerHTML='您也可以选择<a class="em" target="_blank" href="http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_10_active_x.exe">手动下载更新</a>';else if(_FireFox())
domTipsHref.innerHTML='您也可以选择<a class="em" target="_blank" href="http://fpdownload.macromedia.com/get/flashplayer/current/licensing/win/install_flash_player_10.exe">手动下载更新</a>';else
domTipsHref.innerHTML='您也可以选择<a class="em" target="_blank" href="http://get.adobe.com/flashplayer">手动下载更新</a>';needloadFlash=1;}
return;}
function DetectFlashVer(reqMajorVer,reqMinorVer,reqRevision)
{versionStr=GetSwfVer();if(versionStr==-1){return false;}else if(versionStr!=0){if(isIE&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",");}else{versionArray=versionStr.split(".");}
var versionMajor=versionArray[0];var versionMinor=versionArray[1];var versionRevision=versionArray[2];if(versionMajor>parseFloat(reqMajorVer)){return true;}else if(versionMajor==parseFloat(reqMajorVer)){if(versionMinor>parseFloat(reqMinorVer))
return true;else if(versionMinor==parseFloat(reqMinorVer)){if(versionRevision>=parseFloat(reqRevision))
return true;}}
return false;}}
function GetSwfVer(){var flashVer=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var swVer2=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var flashDescription=navigator.plugins["Shockwave Flash"+swVer2].description;var descArray=flashDescription.split(" ");var tempArrayMajor=descArray[2].split(".");var versionMajor=tempArrayMajor[0];var versionMinor=tempArrayMajor[1];var versionRevision=descArray[3];if(versionRevision==""){versionRevision=descArray[4];}
if(versionRevision[0]=="d"){versionRevision=versionRevision.substring(1);}else if(versionRevision[0]=="r"){versionRevision=versionRevision.substring(1);if(versionRevision.indexOf("d")>0){versionRevision=versionRevision.substring(0,versionRevision.indexOf("d"));}}
var flashVer=versionMajor+"."+versionMinor+"."+versionRevision;}}
else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1)flashVer=4;else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1)flashVer=3;else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1)flashVer=2;else if(isIE&&!isOpera){flashVer=ControlVersion();}
return flashVer;}
function ControlVersion()
{var version;var axo;var e;try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");version=axo.GetVariable("$version");}catch(e){}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");version="WIN 6,0,21,0";axo.AllowScriptAccess="always";version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version=axo.GetVariable("$version");}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");version="WIN 3,0,18,0";}catch(e){}}
if(!version)
{try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");version="WIN 2,0,0,11";}catch(e){version=-1;}}
return version;}
function InitSideBarHTML()
{function UserInfoSucc(xmlDoc)
{InitVar(xmlDoc);GetItem();}
function UserInfoFail(xmlDoc)
{var iRetCode=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("code");var iAuthorize=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("authorize");if(-1005==iRetCode)
{top.location="http://show.qq.com/my/inc/reg01.html";}
else if(-1001==iRetCode)
top.leftfra.location="http://show.qq.com/inc/sidebar.html";else if(-1003==iRetCode)
{ErrorWindow(-1003);InitUnloginAv();GetItem();}
else
{ErrorWindow(0);InitUnloginAv();GetItem();}};var iUin=GetUin();if(iUin==0)
{InitUnloginAv();GetItem();var domTips=document.getElementById("FLASH_TIPS_ID");domTips.getElementsByTagName("p")[0].innerHTML=("您还未登录,请先 <a href=\"javascript:ShowLogin()\" class=\"em\">登录</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>").escNone();domTips.style.display="block";}
else
{getQQSHOWXml("http://show.qq.com/cgi-bin/qqshow_user_info?vipinfo=1",UserInfoSucc,UserInfoFail,function(){getXMLError("qqshow_user_info");InitUnloginAv();});}
detectFlash();vTimePoints[1]=new Date();};function InitFlashObj()
{InnerHTMLInitFlash(g_sAVId,"http://qqshow2-item.qq.com/1000000/51/02/",186,300,document.getElementById("flashShow"),0);document.getElementById(g_sAVId).cQSAV=new QQSHOWAV();};function InitVipInfo(xmlDoc)
{var ob=xmlDoc.getElementsByTagName("QQSHOW")[0].getElementsByTagName("node")[0];var vip=ob.getAttribute("viprank");var level=ob.getAttribute("rlevel");var score=ob.getAttribute("rtotalscore");var sequence=ob.getAttribute("rsequence");var scoreleft=ob.getAttribute("rscoreleft");var distance=ob.getAttribute("rleveldis");var initscore=ob.getAttribute("rinitscore");var nextsalary=ob.getAttribute("rnextsalary");var viprank=vip+"|"+level+"|"+score+"|"+sequence+"|"+scoreleft+"|"+distance+"|"+initscore+"|"+nextsalary;QSCookie("viprank",viprank);}
function InitUnloginAv()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.InitDefShow();oQSAV.Init(0,QUSER.getAvSex(),"");AvClass(oQSAV);ReadyInitShow();vTimePoints[4]=new Date();setTimeout(TimeReport,3000);};function ReadyInitShow()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;if(oQSAV&&oQSAV.IsReady())
{oQSAV.InitShow();ChgSpZoom(oQSAV,false);InitUndoRedo();DisplayBodyRecord(0);DisplayTryRecord(0);}
else
setTimeout("ReadyInitShow()",300);};function ClearLastLoginInfo()
{QSCookie("QSUSRINF","");QSCookie("CART","");setHeaderCartNum(0);};function InitVar(xmlDoc)
{var obj=xmlDoc.getElementsByTagName("QQSHOW")[0].getElementsByTagName("node")[0];var iUin=obj.getAttribute("uin");var sName=obj.getAttribute("name");var chSex=obj.getAttribute("sex");var iVip=obj.getAttribute("vip");var iClub=obj.getAttribute("club");var iGWQ=obj.getAttribute("gwq");var iAlbum=obj.getAttribute("album");var sItemSn=obj.getAttribute("show");var iMsgAsk=obj.getAttribute("msgask");var iMsgPhoto=obj.getAttribute("msgphoto");var iMsgVipCollect=obj.getAttribute("msgvipcollect");var iMsgCount=obj.getAttribute("msgcount");var iVipSend=obj.getAttribute("vipsend")||0;var oldUin=QUSER.getInfo("uin");var iCloseTime=obj.getAttribute("CloseTime");var iShowAlert=obj.getAttribute("ShowAlert");var iAutoRenew=obj.getAttribute("autorenew");var iStatus=obj.getAttribute("cstatus");g_iRegTime=obj.getAttribute("regtime");g_iNow=obj.getAttribute("now");if(oldUin&&iUin!=oldUin)
{ClearLastLoginInfo();}
QUSER.setInfo("uin",iUin);QUSER.setInfo("name",sName);QUSER.setInfo("sex",chSex);QUSER.setInfo("vip",iVip);QUSER.setInfo("club",iClub);QUSER.setInfo("gwq",iGWQ);QUSER.setInfo("album",iAlbum);QUSER.setInfo("msgask",iMsgAsk);QUSER.setInfo("msgphoto",iMsgPhoto);QUSER.setInfo("msgvipcollect",iMsgVipCollect);QUSER.setInfo("msgcount",iMsgCount);QUSER.setInfo("vipsend",iVipSend);QUSER.setInfo("CloseTime",iCloseTime);QUSER.setInfo("ShowAlert",iShowAlert);QUSER.setInfo("cstatus",iStatus);QUSER.setInfo("autorenew",iAutoRenew);InitVipInfo(xmlDoc);if(iVip==1){if(vipBtn)
{var vData=new Object();var viprank=getCookie("viprank");var level=viprank.split("|")[1];if(level)
vipBtn(level);}}
var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.Init(iUin,chSex,sItemSn);var sSex=QUSER.getInfo("avsex");var sStyle=QUSER.getInfo("style");var sSn=sItemSn;if(sSex&&sStyle)
{sSn=oQSAV.GetAvUserData(iUin,sSex,sStyle);if(sSn==null)
{sSn=oQSAV.GetAvUserData(0,sSex,sStyle);if(sSn==null)
{if(SpecTypeItemCount(sItemSn,101)>0)
{DisplayFlashTips("您当前使用的是游戏场景秀，是否要查看<a href='javascript:top.mainfra.location=\"/my/inc/game_show.html\";HideFlashTips();'>您的游戏场景秀物品</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>",false);}
else if(SpecTypeItemCount(sItemSn,103)>0)
{DisplayFlashTips("您当前使用的是相片形象，您可以查看<a href='javascript:top.mainfra.location=\"/my/inc/client_photolist.html\";HideFlashTips();'>QQ上显示的历史相片</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>",false);}
sSn=sItemSn;}
else
{QUSER.setInfo("fashion",1);DisplayFlashTips("目前是您未登录时搭配的形象，显示最近保存的形象点击<a href='javascript:RevertLastSave();HideFlashTips();'>这里</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>",true);}}
else if(SpecTypeItemCount(sItemSn,101)>0)
{DisplayFlashTips("您当前使用的是游戏场景秀，是否要查看<a href='javascript:top.mainfra.location=\"/my/inc/game_show.html\";HideFlashTips();'>您的游戏场景秀物品</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>",true);}
else if(SpecTypeItemCount(sItemSn,103)>0)
{DisplayFlashTips("您当前使用的是相片形象，您可以查看<a href='javascript:top.mainfra.location=\"/my/inc/client_photolist.html\";HideFlashTips();'>QQ上显示的历史相片</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>",true);}}
oQSAV.FromItemSn(sSn,true);QUSER.setInfo("avsex",oQSAV._stAvInf._chAvSex);QUSER.setInfo("style",oQSAV._stAvInf._iAvStyle);AvClass(oQSAV);ReadyInitShow();if(typeof(top.topfra)!="undefined"&&typeof(top.topfra.updateMsg)=="function")
{top.topfra.updateMsg();}
if(typeof(top.mainfra)!="undefined"&&typeof(top.mainfra.updataMainfra)=="function")
{top.mainfra.updataMainfra();}
if(getURLParam("style").length>0&&(getURLParam("style")==0||getURLParam("style")==1))
{ChangeAvStyle(getURLParam("style"),false);}
if(!window.m_sHistory)
{setTimeout(function(){LoadHistory(oQSAV._stAvInf._iAvStyle==1?0:1)},20000);}
vTimePoints[2]=new Date();setTimeout(TimeReport,3000);};function refreshVar(sItemSn)
{var sSn=sItemSn;var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.FromItemSn(sSn,true);QUSER.setInfo("avsex",oQSAV._stAvInf._chAvSex);QUSER.setInfo("style",oQSAV._stAvInf._iAvStyle);AvClass(oQSAV);ReadyInitShow();if(!window.m_sHistory)
{setTimeout(function(){LoadHistory(oQSAV._stAvInf._iAvStyle==1?0:1)},20000);}}
var tipsTimer;function displayMallTips()
{if(mall_tips_content&&ChkUin(GetUin())&&top&&top.mainfra&&top.mainfra.document.body)
{var viprank=getCookie("viprank");var cols=viprank.split("|");var vip=parseInt(cols[0]);var level=parseInt(cols[1]);var sImgLink;var sTitle;var sContent;var sLink;try{sImgLink=mall_tips_img[vip][0];sTitle=mall_tips_content[vip][0];sContent=mall_tips_content[vip][1];sLink=mall_tips_content[vip][2];}catch(e)
{return;}
var mainDoc=top.mainfra.document;var btn=mainDoc.getElementById("mall_tips_btn");if(btn)
{btn.style.display="none";}
var elm=mainDoc.getElementById("mall_tips_ID");if(!elm)
{var elm=mainDoc.createElement("DIV");elm.id="mall_tips_ID";elm.className="fixed msg_tips_box";elm.style.display="none"
elm.onmouseover=function(){top.leftfra.clearTimeout(top.leftfra.tipsTimer)};elm.onmouseout=function(){top.leftfra.tipsTimer=top.leftfra.setTimeout(closeMallTips,8000);};mainDoc.body.appendChild(elm);}
if(_MSIE6())
{removeEventListener(top.mainfra,"onscroll",bottomTips);addEventListener(top.mainfra,"onscroll",bottomTips);elm.style.bottom="0px";elm.style.zoom="1.0";elm.style.zoom="";}
else
{var bIE=_MSIE();if(bIE&&top.mainfra.location.href.match(/\/inc\/main_.\.html/)==null)
{elm.style.bottom=-(mainDoc.body.scrollTop+mainDoc.documentElement.scrollTop)+"px";removeEventListener(mainDoc.body,"onscroll",bottomTips);addEventListener(mainDoc.body,"onscroll",bottomTips);}
if(!bIE)
{elm.style.bottom="0px";}}
var sName=QUSER.getInfo("name").escHtml();if(sName.indexOf("<BR>")>-1){sName=sName.replace(/<BR>/g,"&nbsp;")}
var code='<p class="m_t_title">欢迎光临，<span class="u_name">'+sName;if(vip==0||vip==2)
{code+='<a href="/community/viprank/level_desc.html" class="vip_lv';if(vip==2){code+='_gray';}
code+='"><span>lv</span><span class="lv lv'+level+'">'+level+'</span></a></span>';}
else code+="</span>";code+='，您好！</p>';code+='<div class="m_t_content">';code+='<div class="m_t_g_sys">';code+='<h3><a href="'+sLink+'" target="_blank" onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.TITLE_'+vip+'\')">'+sTitle+'</a></h3>';code+='<p class="m_t_c_pic"><a href="'+sImgLink+'" target="_blank" onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.IMG_'+vip+'\')"><img src="http://imgcache.qq.com/qqshow/v2/syndata/other/mall_tips_img_'+mall_tips_date+'_'+vip+'" alt="'+sTitle+'"/></a></p>';code+='<p class="m_t_c_content">'+sContent+'</p>';code+='<p class="m_t_c_more"><a href="'+sLink+'" class="em" target="_blank" onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.DETAIL_'+vip+'\')">查看详情&gt;&gt;</a></p>';code+='</div>';if(vip==2||vip==1)
{code+='<p class="m_t_expire">';code+=(vip==2?'您的红钻已过期，点':'红钻贵族，精彩无限。点');code+='<a href="http://paycenter.qq.com/cgi-bin/showopenservice.cgi?service_type=qqshow" target="_blank" class="em">';code+=(vip==2?'续费红钻</a>继续享受特权！</p>':'开通红钻</a>享受尊贵特权！</p>');}
var iMsgCount=parseInt(QUSER.getInfo("msgcount"));var iFlowerCount=parseInt(getCookie("flowercount"));var iSendCount=0;if(vip==0)
{iSendCount=VIPItemSend.getLeft();}
if(iMsgCount!=0||iFlowerCount!=0||iSendCount!=0)
{code+='<ul>'
if(iMsgCount!=0)
{code+='<li class="ico_msg"><a onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.MSG\')" href="/my/inc/msg.html">消息通道：您有<strong class="em">'+iMsgCount+'</strong>条未读系统消息</a></li>';}
if(iSendCount!=0)
{code+='<li class="ico_vip"><a onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.SEND\')" href="/mall/inc/vip_spe_note.html">红钻特权：您本月还有<strong class="em">'+iSendCount+'</strong>次免费赠送QQ秀的机会未使用</a></li>';}
if(iFlowerCount!=0)
{code+='<li class="ico_flower"><a onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.FLOWER\')" href="http://show.qq.com/community/flower/index.html" target="_blank">鲜花信息：';if(vip==0||iFlowerCount<0)
{code+='您今天还有<strong class="em">'+Math.abs(iFlowerCount)+'</strong>次特权赠送鲜花的机会</a></li>';}
else
{code+='您今天还可以免费赠送<strong class="em">'+iFlowerCount+'</strong>朵红玫瑰</a></li>';}}
code+='</ul>'}
else
{if(vip==0)code+='<p class="m_t_expire">您是尊贵的红钻贵族用户,点此<a href="/mall/inc/vip_spe_index.html#mallno=208060000" class="em">查看红钻特权</a></p>';code+='<p class="ico_money em">您当前全额抵扣券余额为：<strong>'+QBPrice(QUSER.getInfo("gwq"))+'</strong> <a href="http://pay.qq.com/admin.shtml" target="_blank" class="em" onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.QB\')">查询Q币余额</a></p>';}
code+='</div>';code+='<p class="m_t_close">'
code+='<a href="javascript:top.leftfra.closeMallTips();" onclick="top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.CLOSE\')" title="关闭">关闭</a>';code+='</p>';elm.innerHTML=code.escNone();elm.style.display="";clearTimeout(top.leftfra.tipsTimer);top.leftfra.tipsTimer=setTimeout(closeMallTips,8000);_pgvSendClick("ISD.QQShow.MallTips.OPEN_"+vip);}
else
{setTimeout(displayMallTips,500);}};function bottomTips()
{var mainDoc=top.mainfra.document;var elm=mainDoc.getElementById("mall_tips_ID");if(!elm||elm.style.display=="none")
{elm=top.mainfra.document.getElementById("mall_tips_btn");}
if(elm){if(_MSIE6())
{elm.style.bottom="0px";elm.style.zoom="1.0";elm.style.zoom="";}
else
{var bIE=_MSIE();if(bIE&&top.mainfra.location.href.match(/\/inc\/main_.\.html/)==null)
{elm.style.bottom=-(mainDoc.body.scrollTop+mainDoc.documentElement.scrollTop)+"px";}}}};function closeMallTips()
{var elm=top.mainfra.document.getElementById("mall_tips_ID");if(elm){top.mainfra.document.getElementById("mall_tips_ID").style.display="none";}
clearTimeout(tipsTimer);displayMallTipsBtn();}
function closeMallTipsBtn()
{var elm=top.mainfra.document.getElementById("mall_tips_btn");if(elm){top.mainfra.document.getElementById("mall_tips_btn").style.display="none";}}
function displayMallTipsBtn()
{var flag=false;try{flag=ChkUin(GetUin())&&top&&top.mainfra&&top.mainfra.document.readyState=="complete";}catch(e){setTimeout(displayMallTipsBtn,100);return;}
if(flag)
{var mainDoc=top.mainfra.document;var elm=top.mainfra.document.getElementById("mall_tips_ID");if(elm&&elm.style.display!="none")return;var elm=mainDoc.getElementById("mall_tips_btn");if(!elm)
{var elm=mainDoc.createElement('DIV');elm.className="fixed msg_tips_box_hide";elm.id="mall_tips_btn";elm.innerHTML=('<button type="button" onclick="top.leftfra.displayMallTips();top.leftfra._pgvSendClick(\'ISD.QQShow.MallTips.BTN_CLICK\')">商城信息</button>').escNone();mainDoc.body.appendChild(elm);}
else
{elm.style.display="";}
if(_MSIE6())
{removeEventListener(top.mainfra,"onscroll",bottomTips);addEventListener(top.mainfra,"onscroll",bottomTips);elm.style.bottom="0px";elm.style.background="#000";elm.style.background="#fff";}
else
{var bIE=_MSIE();if(bIE&&top.mainfra.location.href.match(/\/inc\/main_.\.html/)==null)
{elm.style.bottom=-(mainDoc.body.scrollTop+mainDoc.documentElement.scrollTop)+"px";removeEventListener(mainDoc.body,"onscroll",bottomTips);addEventListener(mainDoc.body,"onscroll",bottomTips);}
if(!bIE)
{elm.style.bottom="0px";}}}}
function showMallTips()
{function fnSucc(xmlDoc)
{var ob=xmlDoc.getElementsByTagName("QQSHOW")[0];var msgcount=parseInt(ob.getAttribute("msg"));var flowercount=parseInt(ob.getAttribute("flower"));if(num!=msgcount)
{QUSER.setInfo("msgcount",msgcount);updateHeaderInfo();}
QSCookie("flowercount",flowercount);if(top&&top.mainfra&&top.mainfra.location.href.indexOf("/inc/main.html")==-1)
{displayMallTips();}}
function fnFail(){}
var num=parseInt(QUSER.getInfo("msgcount"));var vip=parseInt(QUSER.getInfo("vip"));if(!QUSER.getInfo("tips")&&ChkUin(GetUin()))
{getQQSHOWXml("http://show.qq.com/cgi-bin/qqshow_user_msg_top3?count="+num+"&vip="+vip,fnSucc,fnFail,fnFail);QUSER.setInfo("tips",1);}
else
{displayMallTipsBtn();}
removeEventListener(top.document.getElementById("mainFrame"),"onload",displayMallTipsBtn);addEventListener(top.document.getElementById("mainFrame"),"onload",displayMallTipsBtn);};function getXMLError(sCGIName)
{ErrorWindow(0);};function getXMLFail(sCGIName)
{ErrorWindow(0);};function IsIE()
{return(window.navigator.appName.toUpperCase().indexOf("MICROSOFT")>=0);};function AvClass(oQSAV)
{if(oQSAV._stAvInf._iAvStyle!=0)
{AvStyleClass(oQSAV._stAvInf._iAvStyle);ZoomBtnClass(oQSAV._stAvInf._iZoomLv,oQSAV.GetZoomLvMax());EnableMoveBtn(1);EnableResetBtn(1);}
else
{AvStyleClass(oQSAV._stAvInf._iAvStyle);EnableZoomInBtn(0);EnableZoomOutBtn(0);EnableMoveBtn(0);EnableResetBtn(0);}
AvSexClass(oQSAV._stAvInf._chAvSex);};function ChgSpZoom(oQSAV,bChgZoom)
{if(oQSAV._stAvInf._iAvStyle==0)
return;if(oQSAV.CntSpcItem(102)>0)
{oQSAV.ChgZoomCfg();if(bChgZoom)
oQSAV.ZoomLv(1);}
if(oQSAV.CntSpcItem(102)==0)
{oQSAV.ResetZoomCfg();if(bChgZoom)
oQSAV.ZoomLv(0);}
ZoomBtnClass(oQSAV._stAvInf._iZoomLv,oQSAV.GetZoomLvMax());};function ZoomBtnClass(iLv,iMax)
{if(typeof(iMax)=="undefined"||iMax<iLv)
iMax=4;if(0==iLv)
{EnableZoomOutBtn(0);EnableZoomInBtn(1);}
else if(iMax==iLv)
{EnableZoomOutBtn(1);EnableZoomInBtn(0);}
else
{EnableZoomOutBtn(1);EnableZoomInBtn(1);}};function EnableMoveBtn(iType)
{if(document.getElementById("MOVE_LINK_ID")==null)
return;function GetClass(iT)
{if(0==iT)
return"move_2";else if(1==iT)
return"move";else
return"move_3";};function GetTitle(iT)
{if(0==iT)
return"";else if(1==iT)
return"点击进入形象移动状态，可拖动整体形象";else
return"点击取消形象移动状态，可拖动单个物品";};document.getElementById("MOVE_LINK_ID").setAttribute("class",GetClass(iType));document.getElementById("MOVE_LINK_ID").setAttribute("className",GetClass(iType));document.getElementById("MOVE_LINK_ID").title=GetTitle(iType);};function EnableResetBtn(iEnable)
{if(document.getElementById("RESET_LINK_ID")==null)
return;document.getElementById("RESET_LINK_ID").setAttribute("class",((iEnable==1)?"reset":"reset_2"));document.getElementById("RESET_LINK_ID").setAttribute("className",((iEnable==1)?"reset":"reset_2"));};function EnableZoomInBtn(iEnable)
{if(document.getElementById("ZOOMIN_LINK_ID")==null)
return;document.getElementById("ZOOMIN_LINK_ID").setAttribute("class",((iEnable==1)?"zoomIn":"zoomIn_2"));document.getElementById("ZOOMIN_LINK_ID").setAttribute("className",((iEnable==1)?"zoomIn":"zoomIn_2"));};function EnableZoomOutBtn(iEnable)
{if(document.getElementById("ZOOMOUT_LINK_ID")==null)
return;document.getElementById("ZOOMOUT_LINK_ID").setAttribute("class",((iEnable==1)?"zoomOut":"zoomOut_2"));document.getElementById("ZOOMOUT_LINK_ID").setAttribute("className",((iEnable==1)?"zoomOut":"zoomOut_2"));};function UndoBtn(iEnable)
{if(document.getElementById("UNDO_LINK_ID")==null)
return;document.getElementById("UNDO_LINK_ID").setAttribute("class",(iEnable==1)?"undo":"undo_2");document.getElementById("UNDO_LINK_ID").setAttribute("className",(iEnable==1)?"undo":"undo_2");};function RedoBtn(iEnable)
{if(document.getElementById("REDO_LINK_ID")==null)
return;document.getElementById("REDO_LINK_ID").setAttribute("class",(iEnable==1)?"redo":"redo_2");document.getElementById("REDO_LINK_ID").setAttribute("className",(iEnable==1)?"redo":"redo_2");};function AvStyleClass(iStl)
{if(iStl!=0&&iStl!=1)
return;if(document.getElementById("STYLE_0_LINK_ID")==null)
return;document.getElementById("STYLE_0_LINK_ID").setAttribute("class",(iStl==0)?"classical_2":"classical");document.getElementById("STYLE_0_LINK_ID").setAttribute("className",(iStl==0)?"classical_2":"classical");document.getElementById("STYLE_1_LINK_ID").setAttribute("class",(iStl==1)?"fashion_2":"fashion");document.getElementById("STYLE_1_LINK_ID").setAttribute("className",(iStl==1)?"fashion_2":"fashion");var oFlash=(IsIE()==true)?document.getElementById(g_sAVId):document.getElementById(g_sAVId).getElementsByTagName("embed")[0];if(0==iStl)
{oFlash.width=140;oFlash.height=226;oFlash.setAttribute("class","flash2");oFlash.setAttribute("className","flash2");}
else
{oFlash.width=186;oFlash.height=300;oFlash.setAttribute("class","flash1");oFlash.setAttribute("className","flash1");}};function AvSexClass(chSex)
{if(chSex!='F'&&chSex!='M')
return;if(document.getElementsByName("AVSEX_M_LINK_ID")==null)
return;document.getElementById("AVSEX_M_LINK_ID").setAttribute("class",(chSex=='F')?"male":"male_2");document.getElementById("AVSEX_M_LINK_ID").setAttribute("className",(chSex=='F')?"male":"male_2");document.getElementById("AVSEX_F_LINK_ID").setAttribute("class",(chSex=='F')?"female_2":"female");document.getElementById("AVSEX_F_LINK_ID").setAttribute("className",(chSex=='F')?"female_2":"female");};function UndoRedoClass()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var iIdx=oQSAV.GetUnRedoIdx();var iLen=oQSAV.GetUnRedoLen();if(iLen<=0)
{UndoBtn(0);RedoBtn(0);}
else
{if(iIdx>-1)
UndoBtn(1);else
UndoBtn(0);if(iIdx+2<iLen)
RedoBtn(1);else
RedoBtn(0);}};function ChangeAvStyle(iStl,bChgMain)
{try{if(iStl!=0&&iStl!=1)
return;var oQSAV=document.getElementById(g_sAVId).cQSAV;if(oQSAV._stAvInf._iAvStyle==iStl)
return;if(iStl==0&&document.getElementById("ID_tips"))
document.getElementById("ID_tips").style.display="none";var sItemSn=oQSAV.GetAvUserData(oQSAV._stUserInf._iUin,oQSAV._stAvInf._chAvSex,iStl);oQSAV.SaveAvToUserData();var iSexBefore=oQSAV._stAvInf._chAvSex;var fnAfterSet=function()
{QUSER.setInfo("style",oQSAV._stAvInf._iAvStyle);QUSER.setInfo("avsex",oQSAV._stAvInf._chAvSex);AvClass(oQSAV);ReadyInitShow();if(0==oQSAV._stAvInf._iAvStyle&&1==oQSAV.GetViewMode())
{oQSAV.ChangeMode(0);EnableMoveBtn(1);}
if(bChgMain==true&&typeof(top.mainfra)!="undefined"&&typeof(top.mainfra.swapItemType)=="function")
{top.mainfra.swapItemType(iStl,0);if(typeof(top.mainfra.swapItemType)=="function"&&iSexBefore!=oQSAV._stAvInf._chAvSex)
{top.mainfra.swapSex(0);}}};if(!sItemSn)
{function fnSetHistory()
{if(window.m_sHistory&&window.m_sHistory!=""&&window.m_iHistoryStyle==iStl&&!window.m_bHistroyFlag)
{oQSAV.FromItemSn(window.m_sHistory,false);window.m_bHistroyFlag=true;}
else
oQSAV.FromItemSn(oQSAV.MakeDefStr(oQSAV._stAvInf._chAvSex,iStl),true);fnAfterSet();}
if(!window.m_sHistory&&GetUin())
{LoadHistory(iStl,fnSetHistory);}
else
{fnSetHistory();}}
else
{oQSAV.FromItemSn(sItemSn,false);fnAfterSet();}}
catch(e)
{setTimeout(function(){ChangeAvStyle(iStl,bChgMain)},1000);}};function SwitchSexBtn(iSex)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;if((iSex!=0&&iSex!=1)||(oQSAV._stAvInf._chAvSex=="F"&&iSex==0)||(oQSAV._stAvInf._chAvSex=="M"&&iSex==1))
return;CountDown(0);SwitchAvSex(true);};function SwitchAvSex(bChgMain)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var sItemSn=oQSAV.GetAvUserData(oQSAV._stUserInf._iUin,((oQSAV._stAvInf._chAvSex=="M")?"F":"M"),oQSAV._stAvInf._iAvStyle);if(!sItemSn)
{oQSAV.FromItemSn(oQSAV.MakeDefStr(((oQSAV._stAvInf._chAvSex=="M")?"F":"M"),oQSAV._stAvInf._iAvStyle),true);}
else
{oQSAV.FromItemSn(sItemSn,false);}
QUSER.setInfo("avsex",oQSAV._stAvInf._chAvSex);AvClass(oQSAV);ReadyInitShow();if(bChgMain==true&&typeof(top.mainfra)!="undefined"&&typeof(top.mainfra.swapSex)=="function")
{top.mainfra.swapSex(0);}};function RevertLastSave()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var sItemSn=oQSAV._stUserInf._sItemSn;if(sItemSn=="")
return;var iOldStyle=oQSAV._stAvInf._iAvStyle;var chOldSex=oQSAV._stAvInf._chAvSex;var sOldItems=oQSAV.ToItemSn(0,0,0);if(sOldItems==sItemSn)
return;oQSAV.FromItemSn(sItemSn,false);if(oQSAV._stAvInf._chAvSex!=chOldSex)
{QUSER.setInfo("avsex",oQSAV._stAvInf._chAvSex);if(oQSAV._stAvInf._iAvStyle==iOldStyle&&typeof(top.mainfra)!="undefined"&&typeof(top.mainfra.swapSex)=="function")
{top.mainfra.swapSex(0);}}
if(oQSAV._stAvInf._iAvStyle!=iOldStyle)
{QUSER.setInfo("style",oQSAV._stAvInf._iAvStyle);if(typeof(top.mainfra)!="undefined"&&typeof(top.mainfra.swapItemType)=="function")
{top.mainfra.swapItemType(oQSAV._stAvInf._iAvStyle,0);}}
AvClass(oQSAV);oQSAV.SaveUndo(sOldItems);UndoRedoClass();ReadyInitShow();};function UndoOp()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var iIdx=oQSAV.GetUnRedoIdx();var iLen=oQSAV.GetUnRedoLen();if(-1==iIdx)
return-1;var sItemSn=oQSAV.GetUnRedoRec(iIdx);if(sItemSn)
{if(iIdx==iLen-1)
oQSAV.SaveRedo();oQSAV.FromItemSn(sItemSn,false);AvClass(oQSAV);ReadyInitShow();return 0;}};function RedoOp()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var iIdx=oQSAV.GetUnRedoIdx();var iLen=oQSAV.GetUnRedoLen();if(iIdx+2>=iLen)
return;var sItemSn=oQSAV.GetUnRedoRec(iIdx+2);if(sItemSn)
{oQSAV.FromItemSn(sItemSn,false);AvClass(oQSAV);ReadyInitShow();return;}};function DefShow()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var sDefSn=oQSAV.MakeDefStr(oQSAV._stAvInf._chAvSex,oQSAV._stAvInf._iAvStyle);var sOldItems=oQSAV.ToItemSn(0,0,0);oQSAV.FromItemSn(sDefSn,true);sDefSn=oQSAV.ToItemSn(0,0,0);if(sOldItems!=sDefSn)
{AvClass(oQSAV);ReadyInitShow();oQSAV.SaveUndo(sOldItems);UndoRedoClass();}};function ZoomInOut(iType)
{if(iType!=1&&iType!=2)
return;var oQSAV=document.getElementById(g_sAVId).cQSAV;if(oQSAV._stAvInf._iAvStyle==0||oQSAV._stAvInf._iZoomLv==((iType==1)?oQSAV.GetZoomLvMax():0))
return;oQSAV.ZoomInOut(iType);ZoomBtnClass(oQSAV._stAvInf._iZoomLv,oQSAV.GetZoomLvMax());oQSAV.SaveAvToUserData();};function ChangView()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;if(oQSAV._stAvInf._iAvStyle==0)
return;var iVMode=(oQSAV.GetViewMode()==0)?1:0;oQSAV.ChangeMode(iVMode);if(1==iVMode)
EnableMoveBtn(2);else
EnableMoveBtn(1);};function Reset()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;if(oQSAV._stAvInf._iAvStyle==0)
return;oQSAV.MoveDef();oQSAV.SaveAvToUserData();};function ReqGetReady(iType)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;if(iType==0)
{oQSAV.InitFlash((IsIE()==true)?document[g_sAVId]:window.document[g_sAVId]);oQSAV._stFlash._bReady=1;if(needloadFlash&&document.getElementById("none_flash_id")&&(document.getElementById("none_flash_id").style.visibility==""))
document.getElementById("none_flash_id").style.visibility="hidden";}
else
{oQSAV._stFlash._bF6Ready=1;}};function ReqEditItem(sMsg)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.ReqEditItem(sMsg);oQSAV.SaveAvToUserData();};function ReqMoveAv(sMsg)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.ReqMoveAv(sMsg);oQSAV.SaveAvToUserData();};function ReqUnloadItem(sMsg)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.SaveUndo(oQSAV.ToItemSn(0,0,0));UndoRedoClass();oQSAV.ReqUnloadItem(sMsg);DisplayBodyRecord(0);oQSAV.SaveAvToUserData();};function ReqLoadItem(sMsg)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.ReqLoadItem(sMsg);};function ReqPrintAv(sMsg)
{iRetCode=sMsg;if(iRetCode==-1001)
AlertFreshLeft("登录超时或未登录，请重新登录！");else if(iRetCode==-1003)
alert("上传快照超时，请稍候重试保存形象。");else if(iRetCode==0)
{}
else
alert("上传快照失败，请稍候重试保存形象。");};function ShopTryChangeSex(sItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo,sFrom)
{SwitchAvSex(false);HideFlashTips();ShopTryItem(sItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo,sFrom);};function ShopTryItem(sItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo,sFrom)
{if(!document.getElementById(g_sAVId))
return;var oQSAV=document.getElementById(g_sAVId).cQSAV;if(typeof(oQSAV._stAvInf._chAvSex)=="undefined"||typeof(oQSAV._stAvInf._iAvStyle)=="undefined"||typeof(oQSAV._stAvInf._iDefType)=="undefined")
return;if(chSex!='U'&&chSex!=oQSAV._stAvInf._chAvSex)
{var sSex=(chSex=='F')?"女":"男";var sOSex=(chSex!='F')?"女":"男";DisplayFlashTips("您选择了"+sSex+"性物品，是否暂时切换形象为"+sSex+"性。 <a href=\"javascript:ShopTryChangeSex('"+sItemNo+"', '"+chSex+"', '"+sPlyNo+"', '"+iFStl+"', '"+bPoseBind+"', '"+iDefX+"', '"+iDefY+"', '"+bMov+"', '"+bRot+"', '"+bSelc+"', '"+iType+"', '"+sLogo+"', '"+sFrom+"')\" class=\"em\">切换为"+sSex+"性</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}
if(iType>100)
{var tmpArr=sItemNo.toString().split('.');var iItemNo=parseInt(tmpArr[0]);if(1==oQSAV._stAvInf._iAvStyle&&(101==iType))
{DisplayFlashTips("您选择了经典物品，是否暂时切换风格为经典。 <a href=\"javascript:ChangeAvStyle('0', false);switchStyleAndTry('"+sItemNo+"', '"+chSex+"', '"+sPlyNo+"', '"+iFStl+"', '"+bPoseBind+"', '"+iDefX+"', '"+iDefY+"', '"+bMov+"', '"+bRot+"', '"+bSelc+"', '"+iType+"', '"+sLogo+"', '"+sFrom+"')\" class=\"em\">切换为经典</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}}
else
{if(oQSAV._stAvInf._iAvStyle==0)
{if(parseInt(sItemNo/1000000)==1)
{DisplayFlashTips("您选择了时尚物品，是否暂时切换风格为时尚。 <a href=\"javascript:ChangeAvStyle('1', false);switchStyleAndTry('"+sItemNo+"', '"+chSex+"', '"+sPlyNo+"', '"+iFStl+"', '"+bPoseBind+"', '"+iDefX+"', '"+iDefY+"', '"+bMov+"', '"+bRot+"', '"+bSelc+"', '"+iType+"', '"+sLogo+"', '"+sFrom+"')\" class=\"em\">切换为时尚</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}}
if(oQSAV._stAvInf._iAvStyle==1)
{if(parseInt(sItemNo/1000000)==0)
{DisplayFlashTips("您选择了经典物品，是否暂时切换风格为经典。 <a href=\"javascript:ChangeAvStyle('0', false);switchStyleAndTry('"+sItemNo+"', '"+chSex+"', '"+sPlyNo+"', '"+iFStl+"', '"+bPoseBind+"', '"+iDefX+"', '"+iDefY+"', '"+bMov+"', '"+bRot+"', '"+bSelc+"', '"+iType+"', '"+sLogo+"', '"+sFrom+"')\" class=\"em\">切换为经典</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}}}
UpdateTryRecord(sItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo);var OldItems=oQSAV.ToItemSn(0,0,0);oQSAV.ChangeMode(0);if(oQSAV._stAvInf._iAvStyle!=0)
EnableMoveBtn(1);var bHasFace=0;if(oQSAV.CntSpcItem(102)>0)
bHasFace=1;if(1==oQSAV.ShopProc(sItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo))
{if((bHasFace==0&&oQSAV.CntSpcItem(102)>0)||(bHasFace==1&&oQSAV.CntSpcItem(102)==0))
ChgSpZoom(oQSAV,true);DisplayBodyRecord(0);oQSAV.SaveUndo(OldItems);UndoRedoClass();oQSAV.SaveAvToUserData();if(sFrom)
oQSAV.SetTrace(sItemNo,sFrom);}};function switchStyleAndTry(iItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo,sFrom)
{HideFlashTips();ShopTryItem(iItemNo,chSex,sPlyNo,iFStl,bPoseBind,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo,sFrom);}
function InitUndoRedo()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.InitUndoRec();UndoRedoClass();};function DisplayBodyRecord(iType)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var oRet;if(1==iType)
oRet=oQSAV.NextBodyRec();else if(-1==iType)
oRet=oQSAV.PrevBodyRec();else
oRet=oQSAV.GetLastBodyRec();if(document.getElementById("BODYITEM_IMG_ID")==null)
return;if(oRet.iItemNo==0)
{document.getElementById("BODYITEM_IMG_ID").src="http://imgcache.qq.com/qqshow/v2/img/blank.gif";document.getElementById("BODYITEM_LINK_ID").href="#";}
else
{document.getElementById("BODYITEM_IMG_ID").src="http://qqshow2-item.qq.com/"+oRet.iItemNo+"/00/00/cache.gif";document.getElementById("BODYITEM_LINK_ID").href="javascript:ShopTryItem("+oRet.iItemNo+", '"+oRet.chSex+"', '"+oRet.sPlyNo+"', "+oRet.iFStl+", "+oRet.bPoseBind+", "+oRet.iDefX+", "+oRet.iDefY+", "+oRet.bMov+", "+oRet.bRot+", "+oRet.bSelc+", "+oRet.iType+", '"+oRet.sLogo+"')";}};function UpdateTryRecord(iItemNo,chSex,sPlyNo,iFStl,bPose,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var oRet=oQSAV.PushTryRec(iItemNo,chSex,sPlyNo,iFStl,bPose,iDefX,iDefY,bMov,bRot,bSelc,iType,sLogo);if(document.getElementById("RECORD_IMG_ID")==null)
return;document.getElementById("RECORD_IMG_ID").src="http://qqshow2-item.qq.com/"+oRet.iItemNo+"/00/00/cache.gif";document.getElementById("RECORD_LINK_ID").href="javascript:ShopTryItem("+oRet.iItemNo+", '"+oRet.chSex+"', '"+oRet.sPlyNo+"', "+oRet.iFStl+", "+oRet.bPoseBind+", "+oRet.iDefX+", "+oRet.iDefY+", "+oRet.bMov+", "+oRet.bRot+", "+oRet.bSelc+", "+oRet.iType+", '"+oRet.sLogo.escScript().escMiniUrl()+"')";};function DisplayTryRecord(iType)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var oRet;if(1==iType)
oRet=oQSAV.NextTryRec();else if(-1==iType)
oRet=oQSAV.PrevTryRec();else
oRet=oQSAV.InitTryRec();if(document.getElementById("RECORD_IMG_ID")==null)
return;if(oRet.iItemNo==0)
{document.getElementById("RECORD_IMG_ID").src="http://imgcache.qq.com/qqshow/v2/img/blank.gif";document.getElementById("RECORD_LINK_ID").href="#";}
else
{document.getElementById("RECORD_IMG_ID").src="http://qqshow2-item.qq.com/"+oRet.iItemNo+"/00/00/cache.gif";document.getElementById("RECORD_LINK_ID").href="javascript:ShopTryItem("+oRet.iItemNo+", '"+oRet.chSex+"', '"+oRet.sPlyNo+"', "+oRet.iFStl+", "+oRet.bPoseBind+", "+oRet.iDefX+", "+oRet.iDefY+", "+oRet.bMov+", "+oRet.bRot+", "+oRet.bSelc+", "+oRet.iType+", '"+oRet.sLogo+"')";}};function SetEmoTxt(sTxt)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV.SetEmoTxt(sTxt);oQSAV.SaveAvToUserData();};function GetEmoTxt()
{return document.getElementById(g_sAVId).cQSAV._stAvInf._sEmo;};function GetEmoCnt()
{return document.getElementById(g_sAVId).cQSAV.GetEmoItemCnt();};function QuitQQShow()
{QQCookie("uin","",-1);QQCookie("skey","",-1);QSCookie("QSUSRINF","",-1);QSCookie("QSUDTMmilliSeconds","",-1);QSCookie("CART","",-1);QSCookie("SndMsg","",-1);QSCookie("viprank","");setHeaderCartNum(0);top.location="http://show.qq.com";};function _pgvSendClick(tag)
{if(typeof(pgvSendClick)=='function')
pgvSendClick({hottag:tag});}
function ShowPush()
{function OnOK(x)
{top.leftfra.FloatShow.Hide(top.mainfra);top.leftfra.FloatShow.DireOnCancel();SaveUserShow(0,-1)};function OnCancel(x)
{};if(top.mainfra&&top.topfra)
{_pgvSendClick('ISD.QQShow.Buy.saveDefaultShow');FloatShow("http://show.qq.com/mall/inc/before_save.html",405,265,OnOK,OnCancel,0,-100,top.mainfra,[]);}
else
{setTimeout("ShowPush()",1000);}}
var NotOnSale
function NotOnSaleShow(xmlDoc)
{NotOnSale=xmlDoc;function OnOK(x)
{top.leftfra.FloatShow.Hide(top.mainfra);top.leftfra.FloatShow.DireOnCancel();};function OnCancel(x)
{};if(top.mainfra&&top.topfra)
{FloatShow("http://show.qq.com/mall/inc/alert_unavailable.html",495,255,OnOK,OnCancel,0,-100,top.mainfra,[]);}
else
{setTimeout("NotOnSaleShow()",1000);}}
function SaveUserShow(iType)
{var vipCollectShow;function ChangeUserSexSuc(chSex)
{QUSER.setInfo("sex",chSex);SaveUserShow(0,-1,1);};function IsFreeSave(iFreeSave){return(iFreeSave>=0&&iFreeSave<=3)};clsVipCart();function PutShowItemToCart(xmlDoc)
{var oNode=xmlDoc.getElementsByTagName("node");var iUserVip=parseInt(QUSER.getInfo("vip"),10);var iFreeSave=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("freesave");if(iFreeSave==""||iFreeSave==null)iFreeSave=-1;var iItemNum=0;for(var i=0;i<oNode.length;++i)
{var iNo=parseInt(oNode[i].getAttribute("ino"));if((iNo==1014629||iNo==1014630||iNo==1014631||iNo==3006060)&&confirm("尊敬的用户，您当前形象中包含“我读我炫”专区物品，进入专区直接购买将免费开通读书频道VIP"))
{top.location.href="http://show.qq.com/show.html?MUrl=/live/book/&mallno=206030000&style=1";return;}
var iType=parseInt(oNode[i].getAttribute("itype"),10);var sFrom="";if(2==iType||0==iUserVip||3==iType)
{if(!isNaN(iNo))
sFrom=document.getElementById(g_sAVId).cQSAV.GetTrace(iNo);setCart([oNode[i].getAttribute("iname"),oNode[i].getAttribute("ino"),1,oNode[i].getAttribute("ipricecur"),oNode[i].getAttribute("ipricevip"),0,0,"",sFrom,iType]);iItemNum++;}}
if(iItemNum<=0)
return;_pgvSendClick('ISD.QQShow.Buy.Save');goToCartFromSave();};function SaveUserShowSuc(xmlDoc)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;oQSAV._stUserInf._sItemSn=oQSAV.ToItemSn(0,0,0);WaitEnd([top.mainfra,top.leftfra,top.topfra]);var iFreeSave=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("freesave");if(iFreeSave==""||iFreeSave==null)iFreeSave=-1;var iFreeNum=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("freenum");if(iFreeNum==""||iFreeNum==null)iFreeNum=-1;var iCoupon=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("coupon");if(iCoupon==""||iCoupon==null)iCoupon=-1;var igwq=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("gwq");QUSER.setInfo("cstatus",0);if(top.mainfra)
{if(igwq=='0')
{top.mainfra.FloatShow("/live/rookie/first_time_save.html",494,136,null,null,0,-100);return;}
if(IsFreeSave(iFreeSave))
{var FreeType=[7,15,30,7];var sMsg="您享有"+FreeType[iFreeSave]+"天内免费保存资格,本次免费保存形象成功！";if(iFreeSave==3)
sMsg="您享有"+FreeType[iFreeSave]+"天内免费体验红钻资格,本次免费保存形象成功！";var sUrl=setURLParam(setURLParam("/mall/inc/sys_suc.html","type",1),"message",sMsg);top.mainfra.location.href=sUrl;return;}
if(iFreeNum>0)
{sMsg="您本次共保存了"+iFreeNum+"件免费QQ秀，有效期为1个月。";var sUrl=setURLParam(setURLParam("/mall/inc/sys_suc.html","type",4),"message",sMsg);if(iCoupon>0)
sUrl=setURLParam(sUrl,"coupon",iCoupon);top.mainfra.location.href=sUrl;return;}
top.mainfra.location=setURLParam(setURLParam("http://show.qq.com/mall/inc/sys_suc.html","type",1),"vipcollect",2);}};function DealIllegeBadge(xmlDoc)
{var str="";var oNode=xmlDoc.getElementsByTagName("node");for(var i=0;i<oNode.length;++i)
{str+="["+oNode[i].getAttribute("iname")+"] ";}
if(confirm("您身上有不满足佩戴资格的徽章"+str+",脱下徽章并保存形象请点击\"确定\"按钮,取消此次保存请点击\"取消\"。"))
{for(var j=0;j<oNode.length;++j)
{var no=oNode[j].getAttribute("ino");var isex=oNode[j].getAttribute("isex");var ily=oNode[j].getAttribute("ily");var ipose=oNode[j].getAttribute("ipose");var iposebound=oNode[j].getAttribute("iposebound");var idx=oNode[j].getAttribute("idx");var idy=oNode[j].getAttribute("idy");var imov=oNode[j].getAttribute("imov");var irot=oNode[j].getAttribute("irot");var isel=oNode[j].getAttribute("isel");var isptype=oNode[j].getAttribute("isptype");PutOn(no,isex,ily,ipose,iposebound,idx,idy,imov,irot,isel,isptype,'',0);}
SaveUserShow(0);}}
Array.prototype.count=function(e){var c=0;for(var i=0;i<this.length;++i){if(this[i]==e){++c}}return c;}
Array.prototype.count_if=function(fn){var c=0;for(var i=0;i<this.length;++i){if(fn(this[i])){++c}}return c;}
Array.prototype.for_each=function(fn){for(var i=this.length-1;i>=0;--i)fn(this[i]);}
function SaveUserShowFail(xmlDoc)
{var iRetCode=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("code");if(iRetCode==-1)
{alert("个人形象无任何修改，您可以更换身上物品后再进行保存。");}
else if(iRetCode==-2)
{if(confirm("对不起，您装扮的物品中有红钻特殊物品，只有红钻贵族才能购买。点击确定进行升级为红钻贵族!"))
window.open("http://paycenter.qq.com/cgi-bin/showopenservice.cgi?service_type=qqshow");}
else if(iRetCode==-3)
{PutShowItemToCart(xmlDoc);}
else if(iRetCode==-2003)
{DealIllegeBadge(xmlDoc);}
else if(iRetCode==-2004)
{NotOnSaleShow(xmlDoc);}
else if(iRetCode==-2005)
{alert("对不起，您装扮的物品中有不属于您的鲜花，请修改后再进行保存！");}
else if(iRetCode==-2006)
{alert("对不起，您装扮的物品中有不属于您的徽章，请修改后再进行保存！");}
else if(iRetCode==-2008||iRetCode==-2007)
{WaitEnd([top.mainfra,top.leftfra,top.topfra]);var nodes=xmlDoc.getElementsByTagName("node");var iNeedItem=parseInt(xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("needitem"));if(nodes.length<1)
{alert("您保存的形象中包含需要红豆兑换的物品，不能保存形象");}
else
{var sItemName="";var iRB=0;for(var i=0;i<nodes.length;++i){sItemName+=('"'+nodes[i].getAttribute("itemname").unescape()+'"，');iRB+=10*parseInt(nodes[i].getAttribute("price"));}
sItemName=sItemName.substr(0,sItemName.length-1);var oQSAV=document.getElementById(g_sAVId).cQSAV;var oAVItems=oQSAV._arrItemInf;function NO_DEFAULT_ITEM(e){return(typeof(e)=="undefined"||e._iItemNo<14||e._iItemNo>1000000&&e._iItemNo<1001000)?false:true};function REDBEAN_ITEM(e){for(var j=nodes.length-1;j>=0;--j){if("undefined"!=typeof(e)&&nodes[j].getAttribute("itemno")==e._iItemNo)return true;}return false;}
function PUT_ON(e){if(typeof(oAVItems[e])!="undefined")PutOn(oAVItems[e]._iItemNo,oAVItems[e]._cSex,oAVItems[e]._iPlyNo,0,oAVItems[e]._bPoseBind,oAVItems[e]._iDefX,oAVItems[e]._iDefY,oAVItems[e]._bMov,oAVItems[e]._bRot,oAVItems[e]._bSelc,oAVItems[e]._iType,oAVItems[e]._sLogo,0);}
var iRedItem=oAVItems.count_if(REDBEAN_ITEM);if(iNeedItem!=iRedItem)
{function ExchangeAndSave()
{function ExchangeRbItems(sExchgItemNos)
{function funcSuc(xmlDoc)
{WaitEnd([top.mainfra,top.leftfra,top.topfra]);var nodeQs=xmlDoc.getElementsByTagName("QQSHOW")[0];var nodeInfo=nodeQs.getElementsByTagName("node")[0];var iRBPrice=nodeInfo.getAttribute("rbprice");var iBean=parseInt(nodeInfo.getAttribute("rb"));QUSER.setInfo("bean",iBean);var items=nodeQs.getElementsByTagName("item");var itemno_exchg=new Array();for(var i=0;i<items.length;++i){itemno_exchg.push(items[i].getAttribute("itemno"));}
var oRedItems=oAVItems.findmul_if(REDBEAN_ITEM);oRedItems.sort();var itemnames=[];for(var i=0;i<items.length;++i){itemnames.push(unescape(items[i].getAttribute("itemname")));}
var sMsg="兑换成功，此次兑换了"+itemnames.length+"套（件）QQ秀：“"+itemnames.join("”，“")+"”，共消耗您"+iRBPrice+"个红豆，目前您还拥有"+iBean+"个红豆，返回购物车继续购买。";for(var i=oRedItems.length-1;i>=0;--i){if(itemno_exchg.find(oAVItems[oRedItems[i]]._iItemNo)==null){PUT_ON(oRedItems[i]);}}
top.mainfra.QQShowDialog(0,sMsg,"兑换成功",function(){SaveUserShow(0)},null,function(){SaveUserShow(0)});_pgvSendClick("ISD.QQShow.Buy.RD_Succ");setTimeout(function(){if(typeof(top.mainfra.QQShowDialog.IsShow)=="undefined")return;else top.mainfra.QQShowDialog.OnOk();},2000);}
function funcFail(xmlDoc)
{WaitEnd([top.mainfra,top.leftfra,top.topfra]);var oRedItems=oAVItems.findmul_if(REDBEAN_ITEM);oRedItems.for_each(PUT_ON);_pgvSendClick("ISD.QQShow.Buy.RD_Fail2");top.mainfra.QQShowDialog(0,"兑换失败，继续保存形象","兑换失败",function(){SaveUserShow(0)},null,function(){SaveUserShow(0)});setTimeout(function(){if(typeof(top.mainfra.QQShowDialog.IsShow)=="undefined")return;else top.mainfra.QQShowDialog.OnOk();},2000);}
getQQSHOWXml("http://show.qq.com/cgi-bin/qqshow_pay_redbean?itemno="+sExchgItemNos,funcSuc,funcFail,funcFail);return;}
var sItemNos="";for(var i=0;i<nodes.length;++i){sItemNos+=(nodes[i].getAttribute("itemno")+"#"+oQSAV.GetTrace(nodes[i].getAttribute("itemno"))+"|");}
ExchangeRbItems(sItemNos.substr(0,sItemNos.length-1));}
function ClearAndSave()
{var oRedItems=oAVItems.findmul_if(REDBEAN_ITEM);oRedItems.for_each(PUT_ON);SaveUserShow(0);}
top.mainfra.FloatShow("/mall/inc/saveshow_alert.html?items="+sItemName.escUrl()+"&rb="+iRB,503,250,ExchangeAndSave,ClearAndSave,0,-100);}
else
{g_oRBExchgItems=[];for(var i=0;i<nodes.length;++i)
{g_oRBExchgItems.push([nodes[i].getAttribute("itemno"),nodes[i].getAttribute("itemname").unescape(),nodes[i].getAttribute("price"),oQSAV.GetTrace(nodes[i].getAttribute("itemno"))]);}
top.mainfra.FloatShow("http://show.qq.com/mall/inc/rbexchg_confirm.html",503,228,null,null,0,-100);}}
return;}
else if(iRetCode==-2009)
{alert("对不起，您装扮的物品中有不属于您的特殊秀物品，请修改后再进行保存！");}else if(iRetCode==-2010)
{alert("对不起，您装扮的物品中有不属于您的特殊秀物品，请修改后再进行保存！");}
else if(iRetCode==-4||iRetCode==-5||iRetCode==-6)
{if(top.mainfra)top.mainfra.location=setURLParam("http://show.qq.com/mall/inc/sys_fail.html","type",0);}
else if(iRetCode==-52)
{if(top.mainfra)top.mainfra.location=setURLParam("http://show.qq.com/mall/inc/sys_fail.html","type",9);}
else if(iRetCode==-1004)
{if(top.mainfra)top.mainfra.location=setURLParam("http://show.qq.com/mall/inc/sys_fail.html","type",9);}
else if(iRetCode==-7)
{function OnOk()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;getQQSHOWXml("http://show.qq.com/cgi-bin/qqshow_user_sexupdate?LOGIN="+oQSAV._stUserInf._iUin+"&sex="+oQSAV._stAvInf._chAvSex.toUpperCase(),function(){ChangeUserSexSuc(oQSAV._stAvInf._chAvSex)},function(){getXMLFail("qqshow_user_sexupdate");},function(){getXMLError("qqshow_user_sexupdate");});}
top.mainfra.QQShowDialog(2,"您当前为异性装扮，不能直接保存，是否自动修改QQ秀用户性别来保存此形象？","提示",OnOk);return;}
else if(iRetCode==-15)
{alert("心情秀文字中带有敏感字符，请修改后再进行保存。");}
else if(iRetCode==-1001)
{AlertFreshLeft("登录超时或未登录，请重新登录！");}
else if(iRetCode==-26||iRetCode==-27)
{var sName=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("itemname");alert("当前形象内"+(sName?"的物品["+sName+"]":"有")+"与您的形象"+(iRetCode==-26?"性别":"风格")+"不一致，请脱下后再保存形象。");}
else if(iRetCode==-10005){top.mainfra.FloatShow("/community/cool_face/tips_box.html?error=2",382,164,null,null,150,100);}
else if(iRetCode==-10006){var viprank=getCookie("viprank");var cols=viprank.split("|");var iLeft=cols[4];top.mainfra.FloatShow("/community/cool_face/tips_box.html?error=9&leftscore="+iLeft,382,146,null,null,150,100);}
else{if(top.mainfra)top.mainfra.location=setURLParam("http://show.qq.com/mall/inc/sys_fail.html","type",0);}
WaitEnd([top.mainfra,top.leftfra,top.topfra]);};function _pgvSendClick(tag)
{if(typeof(pgvSendClick)=='function')
pgvSendClick({hottag:tag});}
function SendPGV(CORD)
{if('function'==typeof(pgvSendClick))
{pgvSendClick({hottag:CORD});}}
if(!CheckLogin(1))
{return;}
var oQSAV=top.leftfra.document.getElementById(g_sAVId).cQSAV;var iCnt=oQSAV.ItemCount(0);if(iCnt>20)
{alert("对不起，您的形象上有"+iCnt+"件物品,超过了可保存物品上限20件，请删减部分再试。");return;}
var sItemSn=oQSAV.ToItemSn(0,0,0);if(SpecTypeItemCount(sItemSn,102)>0){var vip=QUSER.getInfo("vip");var viprank=getCookie("viprank");var cols=viprank.split("|");var iLevel=cols[1];var iLeft=cols[4];if(iLevel<2){top.mainfra.FloatShow("/community/cool_face/tips_box.html?error=9&leftscore="+iLeft,382,146,null,null,150,100);return;}}
if(!arguments[1]||(arguments[1]!=-1))
{var sex=oQSAV._stAvInf._chAvSex;var style=oQSAV._stAvInf._iAvStyle;var arrDefShow
if(sex=="M")
{if(style==0)
{arrDefShow=oQSAV._arrDefShow["M_0_0"];}else
{arrDefShow=oQSAV._arrDefShow["M_1_0"];}}else
{if(style==0)
{arrDefShow=oQSAV._arrDefShow["F_0_0"];}else
{arrDefShow=oQSAV._arrDefShow["F_1_0"];}}
var succCount=0;if(oQSAV._arrItemInf.length==arrDefShow.length)
{for(var k=0;k<arrDefShow.length;k++)
{for(var l=0;l<oQSAV._arrItemInf.length;l++)
{if(arrDefShow[k][1]==oQSAV._arrItemInf[l]._iItemNo)
{succCount++;break;}}}}
if(succCount==arrDefShow.length)
{ShowPush();return;}}
var EutoBasgeItemCount=SpecTypeItemCount(sItemSn,4);if(EutoBasgeItemCount>5)
{alert("对不起，您身上已经达到徽章最大佩戴数量(5枚)，请删减部分再试");return;}
if(QUSER.getInfo("vip")==1)
{if(QUSER.getInfo("cstatus")==1)
{if((!arguments[2]||(arguments[2]!=1)))
{if(top.mainfra&&"function"==typeof(top.mainfra.FloatShow))
{function OnOK()
{SaveUserShow(0,-1,1);}
function OnCancel()
{SendPGV('ISD.QQShow.SaveShow.OnCancel');}
top.mainfra.FloatShow("http://show.qq.com/mall/inc/alert_status.html",434,284,OnOK,OnCancel,0,-100);return;}}}}
if(iType==0)
WaitStart([top.mainfra,top.leftfra,top.topfra],["保存形象处理中，请稍候..."]);if(top&&top.g_iMallNo&&top.g_iMallNo==299000000)
{_pgvSendClick('ISD.QQShow.BaiBian.Save');}
try{var arrBodyRet=oQSAV.GetBodyAll();var arrBody=[];var sItemInfo=[];for(var i=0;i<arrBodyRet.length;i++)
{var perArrRet=arrBodyRet[i].ToStr().split("_");var sTrans=oQSAV.GetTrace(perArrRet[0]);sItemInfo[sItemInfo.length]=perArrRet[0]+"_"+sTrans;}
sItemInfo=sItemInfo.join("|");}catch(e)
{}
vipCollectShow=sItemSn;getQQSHOWXml("http://show.qq.com/cgi-bin/qqshow_user_saveshow?showitem="+huffcompress(sItemSn).escUrl()+"&freeinfo="+sItemInfo.escUrl(),SaveUserShowSuc,function(xmlDoc){SaveUserShowFail(xmlDoc,iType)},function(){if(top.mainfra)top.mainfra.location=setURLParam("http://show.qq.com/mall/inc/sys_fail.html","type",0);WaitEnd([top.mainfra,top.leftfra,top.topfra]);});};function ExchangeRbItems(items)
{if(!CheckLogin(1))
{return;}
function funcSuc(xmlDoc)
{WaitEnd([top.mainfra]);var nodeQs=xmlDoc.getElementsByTagName("QQSHOW")[0];var nodeInfo=nodeQs.getElementsByTagName("node")[0]
var iBean=nodeInfo.getAttribute("rb");var iRBPrice=nodeInfo.getAttribute("rbprice");QUSER.setInfo("bean",iBean);var items=nodeQs.getElementsByTagName("item");var itemnames=[];for(var i=0;i<items.length;++i){itemnames.push(unescape(items[i].getAttribute("itemname")));}
var msg="兑换成功，此次兑换了"+itemnames.length+"套（件）QQ秀：“"+itemnames.join("”，“")+"”，共消耗您"+iRBPrice+"个红豆，目前您还拥有"+iBean+"个红豆";var sUrl=setURLParam(setURLParam("http://show.qq.com/mall/inc/sys_suc.html","type",2),"message",msg);top.mainfra.location=sUrl;return;}
function funcFail(xmlDoc)
{WaitEnd([top.mainfra]);var iCode=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("code");var sMessage=xmlDoc.getElementsByTagName("QQSHOW")[0].getAttribute("message");top.mainfra.FloatShow("http://show.qq.com/mall/inc/alert_bean.html?type="+iCode,503,300,null,null,0,-100);}
WaitStart([top.mainfra]);getQQSHOWXml("http://show.qq.com/cgi-bin/qqshow_pay_redbean?itemno="+items,funcSuc,funcFail,funcFail);return;}
function MakeAvInfo(chSex,iAvType,iDefType,iFootType,iScale,iX,iY,sEmo)
{var oQSAV=new QQSHOWAV();var iLv=oQSAV.GetZoomLv(iScale);return(new QQSHOWAVINF(chSex,iAvType,iDefType,iFootType,iLv,iScale,iX,iY,sEmo));};function AddDefLy(oAvInf,arrItemInf)
{var oQSAV=new QQSHOWAV();oQSAV._stAvInf=oAvInf;oQSAV._arrItemInf=arrItemInf;if(oQSAV._stAvInf._iFootType!=0)
{for(var i=0;i<oQSAV._arrItemInf.length;i++)
{var iIdx=oQSAV.IsBindLayer(oQSAV._arrItemInf[i]._iPlyNo);if((-1!=iIdx)&&(1==oQSAV._arrItemInf[i]._bPoseBind))
{oQSAV._arrItemInf[i]._iXPos=oQSAV._arrBdCfg[oQSAV._stAvInf._chAvSex+"_"+oQSAV._stAvInf._iAvStyle+"_"+oQSAV._stAvInf._iDefType][oQSAV._stAvInf._iFootType][(iIdx%2==0?1:4)];oQSAV._arrItemInf[i]._iYPos=oQSAV._arrBdCfg[oQSAV._stAvInf._chAvSex+"_"+oQSAV._stAvInf._iAvStyle+"_"+oQSAV._stAvInf._iDefType][oQSAV._stAvInf._iFootType][(iIdx%2==0?2:5)];oQSAV._arrItemInf[i]._iRot=oQSAV._arrBdCfg[oQSAV._stAvInf._chAvSex+"_"+oQSAV._stAvInf._iAvStyle+"_"+oQSAV._stAvInf._iDefType][oQSAV._stAvInf._iFootType][(iIdx%2==0?3:6)];}}}
oQSAV.FromItemSn(oQSAV.ToItemSn(0,0,0),true);return oQSAV.ToItemSn(0,0,0);};function GetItemInfArr(sSn)
{var oQSAV=new QQSHOWAV();var objRet=new Object();if(0!=oQSAV.FromStr(sSn,objRet))
{alert(objRet.sErrMsg);return[];}
return oQSAV.RemoveDef(objRet.arrItemInf,objRet.stAvInfo._chAvSex,objRet.stAvInfo._iAvStyle,objRet.stAvInfo._iDefType,objRet.stAvInfo._iFootType);};function GetAvInfo(sSn)
{var oQSAV=new QQSHOWAV();var objRet=new Object();if(0!=oQSAV.FromStr(sSn,objRet))
{alert(objRet.sErrMsg);return null;}
return objRet.stAvInfo;};function GetUserShow()
{var oQSAV=document.getElementById(g_sAVId).cQSAV;return oQSAV.ToItemSn(0,0,0);};function switchStyleAndTryShow(sSn,sFrom)
{HideFlashTips();TryOnShow(sSn,sFrom);}
function TryOnShow(sSn,sFrom)
{var oQSAV=document.getElementById(g_sAVId).cQSAV;var sItemSn=oQSAV.ToItemSn(0,0,0);if(sItemSn==sSn)
{if(0!=UndoOp())DefShow();return;}
var sAvSex=GetAvInfo(sSn)._chAvSex;if(sAvSex!=oQSAV._stAvInf._chAvSex&&sAvSex!="U")
{var sSex=(sAvSex=='F')?"女":"男";var sOSex=(sAvSex!='F')?"女":"男";DisplayFlashTips("您选择了"+sSex+"性物品，是否暂时切换形象为"+sSex+"性。 <a href='javascript:void(0);' onclick=\"javascript:{SwitchAvSex(false);HideFlashTips();TryOnShow('"+sSn+"',+'"+sFrom+"')}\" class=\"em\">切换为"+sSex+"性</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}
if(oQSAV._stAvInf._iAvStyle==0)
{if(GetAvInfo(sSn)._iAvStyle==1)
{DisplayFlashTips("您选择了时尚形象，是否暂时切换风格为时尚。 <a href='javascript:void(0);' onclick=\"javascript:ChangeAvStyle('1', false);switchStyleAndTryShow('"+sSn+"','"+sFrom+"')\" class=\"em\">切换为时尚</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}}
if(oQSAV._stAvInf._iAvStyle==1)
{if(GetAvInfo(sSn)._iAvStyle==0)
{DisplayFlashTips("您选择了经典形象，是否暂时切换风格为经典。 <a href='javascript:void(0);' onclick=\"javascript:ChangeAvStyle('0', false);switchStyleAndTryShow('"+sSn+"','"+sFrom+"')\" class=\"em\">切换为经典</a><a class=\"close\" href=\"javascript:CountDown(0)\"><span>关闭</span></a>");return;}}
sOldItems=oQSAV.ToItemSn(0,0,0);if(sAvSex=="U")
{oQSAV.FromItemSn(sSn,false);sAvSex=QUSER.getAvSex();oQSAV._stAvInf._chAvSex=sAvSex;}
else oQSAV.FromItemSn(sSn,true);QUSER.setInfo("avsex",oQSAV._stAvInf._chAvSex);QUSER.setInfo("style",oQSAV._stAvInf._iAvStyle);AvClass(oQSAV);ReadyInitShow();if(sFrom)
{for(var i=0;i<oQSAV._arrItemInf.length;i++)
{oQSAV.SetTrace(oQSAV._arrItemInf[i]._iItemNo,sFrom);}}
oQSAV.SaveUndo(sOldItems);UndoRedoClass();};function AlertFreshLeft(sMsg)
{alert(sMsg);top.leftfra.location.reload();};function ShowBodyItem(l)
{if(top.mainfra&&top.topfra)
{if(_FireFox()&&(top.mainfra.location.href.indexOf("search.html")>0))
{FloatShow("http://show.qq.com/inc/history.html?info="+l,560,370,null,null,0,-100,top.mainfra,[]);}else
{FloatShow("http://show.qq.com/inc/history.html?info="+l,560,370,null,null,0,-100,top.mainfra,[]);}}
else
{setTimeout("ShowBodyItem(l)",1000);}};function DefalutSn()
{var oQSAV=new QQSHOWAV();oQSAV.InitDefShow();return oQSAV.ToItemSn(0,0,0);};function Change(itemno)
{function puton()
{var oItem=null;if(oItemInfo)
{for(var i=0;i<oItemInfo.length;i++)
{if(iItemNo==parseInt(oItemInfo[i][0]))
{oItem=oItemInfo[i];break;}}}
if(oItem)
{var iItemStyle=parseInt(oItem[0])>1000000?1:0;var sItemSex=oItem[12];if(!document.getElementById(g_sAVId))return;var oQSAV=document.getElementById(g_sAVId).cQSAV;if(iItemStyle!=oQSAV._stAvInf._iAvStyle&&parseInt(oItem[0])<3000000)
{ChangeAvStyle(iItemStyle,false);}
if(sItemSex!=oQSAV._stAvInf._chAvSex&&sItemSex!="U")
{SwitchAvSex(false);}
try
{var iIdx=-1;for(var i=0;i<oQSAV._arrItemInf.length;i++)
{if(iItemNo==oQSAV._arrItemInf[i]._iItemNo)
{iIdx=i;break;}}
if(-1==iIdx)
{ShopTryItem(oItem[0],oItem[12],oItem[11],oItem[3],oItem[4],oItem[8],oItem[9],oItem[5],oItem[6],oItem[7],oItem[21],"","");}}
catch(e)
{}}
return;}
var sUrl="http://imgcache.qq.com/qqshow/v2/js/mk/iteminfo_list.js";var sItem=itemno?itemno:getURLParam("miceno",top.location);var iItemNo=0;if(sItem)
{iItemNo=parseInt(sItem);var o=new GetJs(sUrl,puton);o.init();}
sUrl="http://show.qq.com/live/mall_bibi/iteminfo_list_bibi.js";sItem=itemno?itemno:getURLParam("bibino",top.location);if(sItem)
{iItemNo=parseInt(sItem);var o=new GetJs(sUrl,puton);o.init();}
sUrl="http://show.qq.com/live/shake/qqshow_live_shake_item.js";sItem=itemno?itemno:getURLParam("shakeno",top.location);if(sItem)
{iItemNo=parseInt(sItem);var o=new GetJs(sUrl,puton);o.init();}
sUrl="http://show.qq.com/live/yijianlian/qqshow_live_yjl_item.js";sItem=itemno?itemno:getURLParam("yjlno",top.location);if(sItem)
{iItemNo=parseInt(sItem);var o=new GetJs(sUrl,puton);o.init();}};function GetItem(itemno)
{setTimeout(function(){Change(itemno?itemno:null)},1000);}
var g_emoCanClick=true;function showEmoTxt()
{_pgvSendClick("ISD.QQShow.Emotion.LeftAddTxt");if(g_emoCanClick&&top&&top.mainfra&&top.mainfra.FloatShow)
{g_emoCanClick=false;top.mainfra.FloatShow("/mall/inc/emotion_txt.html",450,_MSIE6()?326:324,null,null,0,-100,top.mainfra,[]);}}
function LoadHistory(nStyle,fnCallBack)
{function fnSucc(oResponse)
{var oXml=oResponse.responseXML;var oShow=oXml.getElementsByTagName("node")[0];window.m_sHistory=oShow?oShow.getAttribute("show"):"";window.m_iHistoryStyle=nStyle;if(fnCallBack)
fnCallBack();}
function fnFail()
{window.m_sHistory="";if(fnCallBack)
fnCallBack();}
getXml("http://show.qq.com/cgi-bin/qqshow_user_history?num=1&style="+nStyle,fnSucc,fnFail,true);}
function ErrorWindow(msg)
{var iErrorCount=0;function ShowError()
{if(top.mainfra&&top.mainfra.document&&top.mainfra.document.body)
{window.setTimeout("FloatShow(\"http://show.qq.com/inc/fail_alert.html?error="+msg+"\", 504, 265,null,null, 0, -100, top.mainfra,[])",1000);}
else
{iErrorCount++;if(iErrorCount<20)
{window.setTimeout("ShowError",100);}}}
ShowError();}/*  |xGv00|5461b09deca37ab1e0efd0f91b63e63e */