var AdToday=new Date();var NNAdSrcs=new Array("ad3");var NAdImgSrc="ad3.fashionguide.com.tw";var RndNu=Math.floor(Math.random()*1000000);var ridx=Math.floor(Math.random()*NNAdSrcs.length);var NAdSrc=NNAdSrcs[ridx];var isSend=false;var xmlHttp;var AdMap={};var MapRnIdx=Math.floor(Math.random()*210);var Chans={1:["www","p"],2:["blog","a"],3:["video","p"],5:["ad","p"],6:["events","p"],7:["vipgo","p"],8:["fitguide","p"],9:["bid","a"],10:["fgbeauty","p"],11:["freesample","p"],12:["member","p"],13:["beautynews","p"],14:["votes","p"],15:["officialweb","p"],18:["skin","p"],19:["hair","p"],20:["fgcash","p"],21:["www.fgtv","p"],22:["buy","p"],23:["sale","p"],24:["style","p"],26:["forum","p"]};var theChan="www";var ChanIdx=0;for(k in Chans){var chkchan;Chans[k][0]=="fitguide"?chkchan="fit":chkchan=Chans[k][0];if(document.domain.indexOf(chkchan)!=-1){if(chkchan=="fit"){theChan="fitguide";ChanIdx=k;}else{if(theChan.indexOf(".")==-1){theChan=chkchan;ChanIdx=k;}}}}
if(theChan=="www"){document.write("<div style=\"height:0px;width:0px;\"><img src=\"http://"+NAdSrc+".fashionguide.com.tw/rec.php?rnd="+RndNu+"\" width=\"0\" height=\"0\"/></div>");}
function AdBeautyNiceAlert(){alert('● FG網友評鑑滿意度標章\r\r網友在 【FG投票評鑑】 &【FG市調報告】中，針對商品作滿意度票選。我們\r以綜合性指標來計算網友票選的結果，當票選滿意度達到後，就會獲得【特優】\r或【優選】的星型標章喔！\r\r未來只要大家看到商品獲得這個標章，就代表是由FG網友票選出來的優質商品 ^^\r\r【特優】-網友票選綜合性指標達成8成滿意度\r【優選】-網友票選綜合性指標達成7成滿意度');}
var Ls={};function showNAdById(adLoc,Fix,AdN){var Locs=adLoc.replace("ad","").split("-");var Loc=Locs[0];var Block=Locs[1];try{if(typeof(Ls[Loc])=="undefined"){var L=eval("new "+Loc+"("+Block+")");if(typeof(Fix)!="undefined"){L.fix=Fix;}
if(typeof(AdN)!="undefined"){L.AdN=AdN;}
L.show();Ls[Loc]=L;}else{var L=Ls[Loc];L.show();}}catch(err){}}
function AdImpressMap(){this.Map={};this.Add=function(L,N){if(this.isExist(L,N)==false){if(this.Map[L]==null){this.Map[L]=new Array();}
this.Map[L].push(N);}};this.isExist=function(L,N){if(this.Map[L]!=null){for(k in this.Map[L]){if(N==this.Map[L][k]){return true;}}}
return false;};this.getChanIdx=function(){return ChanIdx;};this.update=function(){if(isSend==true){return false;}
var ap,pa,AdSet,Ads,l,i;var Ch=this.getChanIdx();if(Ch==0){return;}
Chans[Ch][1]=="p"?ap="http://"+document.domain+"/crossAd.php":ap="http://"+document.domain+"/crossAd.asp";l=0;i=0;for(k in this.Map){l++;}
AdSet="{";for(L in this.Map){AdSet+="\""+L.replace("Loc_","")+"\""+":[";Ads="";for(k in this.Map[L]){Ads+=this.Map[L][k]+",";}
Ads=Ads.substr(0,Ads.length-1);AdSet+=Ads+"]";if(i<l-1){AdSet+=",";}
i++;}
AdSet+="}";pa="Chan="+Ch+"&Ads="+AdSet+"&rnd="+Math.floor(Math.random()*1000000);if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest();}else if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP");}
if(xmlHttp){xmlHttp.open("POST",ap,false);xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xmlHttp.onreadystatechange=function(){if(xmlHttp.readyState==4){if(xmlHttp.status==200){if(xmlHttp.responseText=="false"){}else{isSend=true;setTimeout("",1000);}}}};xmlHttp.send(pa);}};}
var AdImMap=new AdImpressMap();window.onbeforeunload=function(){AdImMap.update();};
