淘宝 常用js_2

ContractedBlock.gif ExpandedBlockStart.gif Code
<script type="text/javascript" src="http://assets.taobaocdn.com/tbra/1.0/tbra-widgets.js?t=20081230.js"></script>
ExpandedBlockStart.gifContractedBlock.gif
<script>
ExpandedSubBlockStart.gifContractedSubBlock.gif    (
function(){
        
var J = /(taobao|taobaocdn|alibaba|alipay|yahoo|alisoft|koubei|alimama)\.(com|net)/i;
        
var G = document.referrer ? TB.common.parseUri(document.referrer).host : null, H = location, F = window.parent;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (J.test(H.hostname) && F && H != F.location && G && !J.test(G)) {
            alert(
"\u60a8\u73b0\u5728\u8bbf\u95ee\u7684\u662f\u975e\u6dd8\u5b9d\u5b98\u65b9\u7ad9\u70b9\uff0c\u6dd8\u5b9d\u4e0d\u627f\u62c5\u4efb\u4f55\u8d23\u4efb\u3002")
        }

        
var C = YAHOO.util, A = C.Dom, K = C.Event;
        
var I = A.get("J_Logout");
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (I) {
ExpandedSubBlockStart.gifContractedSubBlock.gif            K.on(I, 
"click"function(L){
                K.preventDefault(L);
                
var E = K.getTarget(L).href;
ExpandedSubBlockStart.gifContractedSubBlock.gif                
var D = function(){
                    location.href 
= E
                }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif                C.Get.script(
"http://taobao.alipay.com/user/logout.htm"{
                    onSuccess: D,
                    onFailure: D,
                    timeout: 
20
                }
)
            }
)
        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        K.on(
"J_SetHomePage""click"function(D){
            K.stopEvent(D);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
try {
                document.body.style.behavior 
= "url(#default#homepage)";
                document.body.setHomePage(
"http://www.taobao.com")
            }
 
ExpandedSubBlockStart.gifContractedSubBlock.gif            
catch (E) {
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (TB.bom.isGecko) {
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
try {
                        window.sidebar.addPanel(
"\u6dd8\u5b9d\u7f51""http://www.taobao.com""\u6dd8\u5b9d\u7f51")
                    }
 
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
catch (E) {
                    }

                }

            }

        }
);
        
var B = document.forms.search.q;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (B) {
            B.focus()
        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        K.on(B, 
"keydown"function(){
            K.removeListener(B, 
"keydown", arguments.callee);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
var D = new C.YUILoader({
                base: TB.env.path 
+ "http://www.cnblogs.com/yui/2.6.0/build/"
            }
);
ExpandedSubBlockStart.gifContractedSubBlock.gif            D.addModule(
{
                name: 
"suggest",
                type: 
"js",
                fullpath: 
"http://assets.taobaocdn.com/app/fp/suggest_2009.js?t=20080801.js",
                requires: [
"autocomplete"]
            }
);
            D.require(
"suggest");
            D.insert()
        }
)
    }
)();
ExpandedSubBlockStart.gifContractedSubBlock.gif    TB.widget.SimpleSlide.decorate(
"J_Slide"{
        triggersClass: 
"tb-slide-triggers",
        currentClass: 
"current",
        eventType: 
"mouse",
        effect: 
"scroll"
    }
);
ExpandedSubBlockStart.gifContractedSubBlock.gif    TB.widget.SimplePopup.decorate(
"J_MyTaobaoTrigger""J_MyTaobaoPopup"{
        eventType: 
"mouse",
        offset: [
00],
        autoFit: 
false,
        disableClick: 
false,
        position: 
"bottom"
    }
);
ExpandedSubBlockStart.gifContractedSubBlock.gif    FP.CategoryListHover 
= function(){
        
var C = YAHOO.util, B = C.Dom, A = C.Event;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
return {
            timerShow: 
null,
            timerHide: 
null,
ExpandedSubBlockStart.gifContractedSubBlock.gif            mouseOverHandler: 
function(){
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (this.timerHide) {
                    
this.timerHide.cancel()
                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
this.timerShow = YAHOO.lang.later(100thisfunction(){
                    B.addClass(
this"hover")
                }
)
            }
,
ExpandedSubBlockStart.gifContractedSubBlock.gif            mouseOutHandler: 
function(){
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (this.timerShow) {
                    
this.timerShow.cancel()
                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
this.timerHide = YAHOO.lang.later(100thisfunction(){
                    B.removeClass(
this"hover")
                }
)
            }
,
ExpandedSubBlockStart.gifContractedSubBlock.gif            init: 
function(D){
                D 
= B.get(D);
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (!D) {
                    
return
                }

                
var E = B.getChildren(D);
                A.on(E, 
"mouseover"this.mouseOverHandler);
                A.on(E, 
"mouseout"this.mouseOutHandler)
            }

        }

    }
();
    FP.CategoryListHover.init(
"J_CategoryList");
ExpandedSubBlockStart.gifContractedSubBlock.gif    FP.Tab 
= function(B, H, K){
        
var C = YAHOO.util, A = C.Dom, J = C.Event;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (!A.get(B)) {
            
return
        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
if (K == false{
            
var I = A.get(B).getElementsByTagName("ul")[0].getElementsByTagName("li");
ExpandedSubBlockStart.gifContractedSubBlock.gif            J.on(I, 
"click"function(D){
                J.stopEvent(D)
            }
)
        }

ExpandedSubBlockStart.gifContractedSubBlock.gif        
var G = {
            eventType: 
"mouse",
            currentClass: 
"selected",
            autoSwitchToFirst: 
false,
ExpandedSubBlockStart.gifContractedSubBlock.gif            onSwitch: 
function(D){
            }

        }
;
        
var F = TB.widget.SimpleTab.decorate(B, G);
        F.switchTab(Math.floor(Math.random() 
* H))
    }
;
    FP.Tab(
"J_HotProductTab"3false);
    FP.Tab(
"J_SafeAndUnivTab"2);
ExpandedSubBlockStart.gifContractedSubBlock.gif    FP.Guessing 
= (function(){
        
var B = YAHOO.util, A = B.Dom, O = B.Event;
        
var J = "J_GuessingLayer";
        
var N, G, I, M = [];
        
var F = "http://favorite.taobao.com/json/promote_banner.htm?count=6&pages=1&callback=FP.Guessing.render";
        
var C = "J_GuessingLayer";
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var L = function(){
            G 
= true;
ExpandedSubBlockStart.gifContractedSubBlock.gif            YAHOO.util.Get.script(F 
+ (F.indexOf("?"== -1 ? "?" : "&"+ "t=" + new Date().getTime(), {
ExpandedSubBlockStart.gifContractedSubBlock.gif                onSuccess: 
function(){
                    N.hide();
                    G 
= false
                }
,
                charset: 
"gbk"
            }
)
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var K = {};
ExpandedSubBlockStart.gifContractedSubBlock.gif        K.render 
= function(S){
            
var P = document.createElement("ul");
            A.get(J).appendChild(P);
            P.className 
= "item";
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (S && typeof(S.items) != "undefined" && S.items.length >= 6{
                
var Q = S.items.length, D = [];
ExpandedSubBlockStart.gifContractedSubBlock.gif                
for (var E = 0; E < 6++E) {
                    
var T = S.items[E];
                    D[D.length] 
= '<li><a href="' + T.link + '" class="pic"><img src="' + encodeURI(T.picURL) + '" /></a><a href="' + T.link + '" class="desc">' + T.title + "</a></li>"
                }

                P.innerHTML 
= D.join("")
            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
else {
                
var R = '<li><a href="http://auction1.taobao.com/auction/item_detail-db1-4a7b436dd431265877b74f2665e5ad60.jhtml" class="pic"><img src="http://pics.taobaocdn.com/bao/album/promotion/canixihuan1.jpg" /></a><a href="http://auction1.taobao.com/auction/item_detail-db1-4a7b436dd431265877b74f2665e5ad60.jhtml" class="desc">\u767e\u642d\u7f8a\u6bdb\u7ed2\u6bdb\u8863</a></li><li><a href="http://auction1.taobao.com/auction/item_detail-0db2-3f1a0b33074c5cfb645b7010874985fc.jhtml" class="pic"><img src="http://pics.taobaocdn.com/bao/album/promotion/canixihuan2.jpg" /></a><a href="http://auction1.taobao.com/auction/item_detail-0db2-3f1a0b33074c5cfb645b7010874985fc.jhtml" class="desc">\u70ed\u5356\u4f11\u95f2\u5305\u5305</a></li><li><a href="http://auction1.taobao.com/auction/item_detail-db2-8869cd987adf5df8e1ea7e198d7acd07.jhtml" class="pic"><img src="http://pics.taobaocdn.com/bao/album/promotion/canixihuan3.jpg" /></a><a href="http://auction1.taobao.com/auction/item_detail-db2-8869cd987adf5df8e1ea7e198d7acd07.jhtml" class="desc">\u7537\u5f0f\u540d\u54c1\u5185\u88e4</a></li><li><a href="http://auction1.taobao.com/auction/item_detail-db2-a1eece9755c14883fff160335edd16c9.jhtml" class="pic"><img src="http://pics.taobaocdn.com/bao/album/promotion/canixihuan4.jpg" /></a><a href="http://auction1.taobao.com/auction/item_detail-db2-a1eece9755c14883fff160335edd16c9.jhtml" class="desc">\u7ea2\u9152\u9762\u819c60ML</a></li><li><a href="http://auction1.taobao.com/auction/item_detail--90df9e4f4ed184950d88bd8c0dd08c93.jhtml" class="pic"><img src="http://pics.taobaocdn.com/bao/album/promotion/canixihuan5.jpg" /></a><a href="http://auction1.taobao.com/auction/item_detail--90df9e4f4ed184950d88bd8c0dd08c93.jhtml" class="desc">\u4e50\u6263\u6447\u6c34\u676f</a></li><li><a href="http://auction1.taobao.com/auction/item_detail-db2-cfe2f23c61b490d12be86d404f11290d.jhtml" class="pic"><img src="http://pics.taobaocdn.com/bao/album/promotion/canixihuan6.jpg" /></a><a href="http://auction1.taobao.com/auction/item_detail-db2-cfe2f23c61b490d12be86d404f11290d.jhtml" class="desc">\u8bfa\u57fa\u4e9aN72</a></li>';
                P.innerHTML 
= R
            }

            H()
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var H = function(){
            aObj 
= J.getElementsByTagName("A");
ExpandedSubBlockStart.gifContractedSubBlock.gif            O.on(aObj, 
"click"function(D){
                document.createElement(
"img").setAttribute("src""http://ju.atpanel.com/?url=http://www.atpanel.com?ad_id=&am_id=&cm_id=&pm_id=1500068013798a44e7d7")
            }
)
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        K.init 
= function(){
            J 
= A.get(J);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (!J) {
                
return
            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (J.getElementsByTagName("*").length == 0{
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (G) {
                    N.show();
                    
return
                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                N 
= TB.util.Indicator.attach(J, {
                    message: 
"\u6b63\u5728\u52a0\u8f7d\u6570\u636e",
                    useShim: 
true
                }
);
                N.show();
                L()
            }

        }
;
        
return K
    }
)();
    FP.Guessing.init();
ExpandedSubBlockStart.gifContractedSubBlock.gif    FP.ExpressWay 
= (function(){
        
var G = YAHOO.util, F = G.Dom, C = G.Event;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var A = function(E, I){
            
var D;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
try {
                D 
= document.createElement('<iframe name="ew-frame" scrolling="no" frameborder="0" allowTransparency="true">')
            }
 
ExpandedSubBlockStart.gifContractedSubBlock.gif            
catch (H) {
                D 
= document.createElement("iframe");
                D.name 
= "ew-frame";
                D.scrolling 
= "no";
                D.frameBorder 
= 0
            }

            F.addClass(D, 
"ew-frame");
            E.appendChild(D);
            D.src 
= I
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var B = function(D){
            C.stopEvent(D)
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
return {
ExpandedSubBlockStart.gifContractedSubBlock.gif            init: 
function(){
                
var D = F.get("J_Expressway");
                C.on(F.getFirstChild(D).getElementsByTagName(
"a"), "click", B);
ExpandedSubBlockStart.gifContractedSubBlock.gif                
var E = TB.widget.SimpleTab.decorate(D, {
                    currentClass: 
"selected",
                    eventType: 
"mouse",
ExpandedSubBlockStart.gifContractedSubBlock.gif                    onSwitch: 
function(J){
                        
var I = D.getElementsByTagName("a")[J];
                        
var H = I.getAttribute("rel");
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
if (H) {
                            
var K = F.get(H);
ExpandedSubBlockStart.gifContractedSubBlock.gif                            
if (!K.getElementsByTagName("iframe").length) {
ExpandedSubBlockStart.gifContractedSubBlock.gif                                
if (F.hasClass(K, "loading")) {
                                    F.removeClass(K, 
"loading")
                                }

                                A(K, I.href)
                            }

                            I.removeAttribute(
"rel")
                        }

                    }

                }
).switchTab(1)
            }

        }

    }
)();
    FP.ExpressWay.init();
ExpandedSubBlockStart.gifContractedSubBlock.gif    FP.PYIndex 
= (function(){
        
var H = YAHOO.util, B = H.Dom, Q = H.Event;
        
var F = null, I = "empty", O = null, J = null, C = null;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var A = function(){
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (J) {
                J.cancel()
            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            O 
= YAHOO.lang.later(100thisfunction(){
                
var E = this.innerHTML.substring(01);
                
var R = this.parentNode, D = B.getNextSibling(R);
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (I == "empty"{
                    B.addClass(R, 
"curr");
                    B.addClass(D, 
"loading");
                    I 
= "loading";
                    M(E, R, D)
                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                
else {
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (I == "loaded" && C) {
                        B.removeClass(F.getElementsByTagName(
"dt"), "curr");
                        B.removeClass(F.getElementsByTagName(
"dd"), "currDD");
                        P(E);
                        B.addClass(R, 
"curr");
                        B.addClass(D, 
"currDD")
                    }

                }

            }
)
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var N = function(){
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (O) {
                O.cancel()
            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            J 
= YAHOO.lang.later(100thisfunction(){
                B.removeClass(F.getElementsByTagName(
"dt"), "curr");
                B.removeClass(F.getElementsByTagName(
"dd"), "currDD")
            }
)
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var G = function(E){
            
var D = Q.getRelatedTarget(E);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (D !== this && !B.isAncestor(this, D)) {
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (J) {
                    J.cancel()
                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                O 
= YAHOO.lang.later(100thisfunction(){
                    B.addClass($D.getPreviousSibling(
this), "curr");
                    B.addClass(
this"currDD")
                }
)
            }

        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var L = function(E){
            
var D = Q.getRelatedTarget(E);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (D !== this && !B.isAncestor(this, D)) {
ExpandedSubBlockStart.gifContractedSubBlock.gif                
if (O) {
                    O.cancel()
                }

ExpandedSubBlockStart.gifContractedSubBlock.gif                J 
= YAHOO.lang.later(100thisfunction(){
                    B.removeClass(B.getPreviousSibling(
this), "curr");
                    B.removeClass(
this"currDD")
                }
)
            }

        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var M = function(E, R, D){
ExpandedSubBlockStart.gifContractedSubBlock.gif            YAHOO.util.Get.script(
"/index_inc/cms_inc.php?path=py_index&t=20080625"{
ExpandedSubBlockStart.gifContractedSubBlock.gif                onSuccess: 
function(){
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (!FP.PYIndex.json) {
                        
return
                    }

                    B.replaceClass(D, 
"loading""currDD");
                    B.removeClass(D, 
"loading");
                    C 
= FP.PYIndex.json;
                    P(E);
                    I 
= "loaded"
                }
,
                charset: 
"gbk"
            }
)
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var P = function(D){
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (C[D]) {
                
var R = ["<h4><span>\u7c7b\u76ee</span></h4><ul>"];
                
var T = ["<h4><span>\u54c1\u724c</span></h4><ul>"];
ExpandedSubBlockStart.gifContractedSubBlock.gif                
for (var E = 0, S = C[D].length; E < S; E++{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if (C[D][E][0!== "" && C[D][E][1!== ""{
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
if (C[D][E][2== "\u7c7b\u76ee"{
                            R[R.length] 
= '<li><a href="http://ju.atpanel.com/?url=' + C[D][E][1].replace(/#.+$/""+ '?ad_id=&am_id=&cm_id=&pm_id=1500102657703260afff" target="_blank">' + C[D][E][0+ "</a></li>"
                        }

ExpandedSubBlockStart.gifContractedSubBlock.gif                        
else {
ExpandedSubBlockStart.gifContractedSubBlock.gif                            
if (C[D][E][2== "\u54c1\u724c"{
                                T[T.length] 
= '<li><a href="http://ju.atpanel.com/?url=' + C[D][E][1].replace(/#.+$/""+ '?ad_id=&am_id=&cm_id=&pm_id=1500102657703260afff" target="_blank">' + C[D][E][0+ "</a></li>"
                            }

                        }

                    }

                }

                R[R.length] 
= "</ul>";
                T[T.length] 
= "</ul>";
                B.get(
"py:" + D).innerHTML = ((R.length === 2? "" : (R.join(""))) + ((T.length === 2? "" : (T.join("")));
                C[D] 
= null
            }

        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var K = {};
ExpandedSubBlockStart.gifContractedSubBlock.gif        K.init 
= function(D){
            F 
= B.get(D);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (!F) {
                
return
            }

            
var R = F.getElementsByTagName("a"), E = F.getElementsByTagName("dd");
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (R.length != 25 || E.length != 25{
                
return
            }

            Q.on(R, 
"mouseover", A);
            Q.on(R, 
"mouseout", N);
            Q.on(E, 
"mouseover", G);
            Q.on(E, 
"mouseout", L);
ExpandedSubBlockStart.gifContractedSubBlock.gif            Q.on(R, 
"click"function(S){
                Q.stopEvent(S)
            }
)
        }
;
        
return K
    }
)();
    FP.PYIndex.init(
"J_PYIndex");
ExpandedSubBlockStart.gifContractedSubBlock.gif    FP.P4p 
= (function(){
        
var D = YAHOO.util.Dom;
        
var varName = "p4presult";
        
var p4pKeyWord = D.get("indexp4p").getAttribute("title");
        
var SPI = "http://tmatch.p4p.cn.yahoo.com/kcbad?adcount=18&catcount=3&pid=619362_1007&ip=10.1.19.139&p4p=" + varName + "&catid=16,30,1801&keyword=" + p4pKeyWord + "&t=" + new Date().getTime();
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var _renderAd = function(ret, renderer, showDesc){
            
var adDiv = document.createElement("li");
            
var price = parseFloat(ret.GOODSPRICE / 100).toFixed(2);
            price 
= price.replace(/\.(\d{2})/".<sub>$1</sub>");
            adDiv.innerHTML 
= '<a href="' + ret.EURL + '" title="' + ret.TITLE + '" target="_blank" ><b><img src="' + ret.TBGOODSLINK + '"/></b><span class="title">' + ret.TITLE + '</span><span class="price"><sup>\uffe5</sup>' + price + "</span></a>";
            
return adDiv
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
var _bulidDom = function(container){
            
var data = eval(varName);
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if (!data || data.length === 0{
                container.style.display 
= "none";
                
return
            }

            D.removeClass(container, 
"loading");
            D.addClass(container, 
"hot-buy");
            
var header = document.createElement("div");
            D.addClass(header, 
"hot-buy-title");
            header.innerHTML 
= '<h4 class="bottom-line">\u70ed\u5356\u5355\u54c1</h4><ul class="more-target"><li><a href="http://auction1.taobao.com/auction/activity/activity.htm?id=1554" target="_blank">\u5f00\u95e8\u4e70\u5c31\u9001</a></li><li><a href="http://auction1.taobao.com/auction/activity/activity.htm?id=1555" target="_blank">\u4eba\u6c14\u5546\u54c1\u5927\u653e\u9001</a></li><li><a href="http://www.taobao.com/cn/event/site/express_index_071109.php" target="_blank">\u6211\u4e5f\u8981\u51fa\u73b0\u5728\u8fd9\u91cc</a></li></ul>';
            container.appendChild(header);
            
var contentBody = document.createElement("ul");
            D.addClass(contentBody, 
"product-list");
            container.appendChild(contentBody);
            
var rets = data;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
for (var i = 0; i < rets.length; i++{
ExpandedSubBlockStart.gifContractedSubBlock.gif                contentBody.appendChild(_renderAd(rets[i], 
{}false))
            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
var _loadAt = function(pmid){
                
var cImg = document.createElement("img");
                cImg.src 
= "http://ju.atpanel.com/?url=http://www.atpanel.com?&ad_id=&am_id=&cm_id=&pm_id=15001021071407811a88";
                
return true
            }
;
            
var listb = $D.getElementsByClassName("product-list""ul")[0];
            
var aArr = listb.getElementsByTagName("a");
            $E.on(aArr, 
"click", _loadAt);
            container.style.display 
= ""
        }
;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
return {
ExpandedSubBlockStart.gifContractedSubBlock.gif            init: 
function(){
                
var container = YAHOO.util.Dom.get("indexp4p");
                YAHOO.util.Dom.addClass(container, 
"loading");
ExpandedSubBlockStart.gifContractedSubBlock.gif                YAHOO.util.Get.script(SPI, 
{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    onSuccess: 
function(o){
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
try {
                            _bulidDom(container)
                        }
 
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
catch (e) {
                        }

                    }
,
                    varName: varName
                }
)
            }

        }

    }
)();
ExpandedSubBlockStart.gifContractedSubBlock.gif    YAHOO.util.Event.on(window, 
"scroll"function(){
        YAHOO.util.Event.removeListener(window, 
"scroll", arguments.callee);
        FP.P4p.init()
    }
);
ExpandedSubBlockStart.gifContractedSubBlock.gif    (
function(){
        
var A = parseInt(TB.bom.getCookie("tg"));
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if ((A & 1== 1{
            YAHOO.util.Get.script(
"http://www.taobao.com/help/wizard/wizard.js?t=20070813.js")
        }

    }
)();
    
//******************************
ExpandedSubBlockStart.gifContractedSubBlock.gif
YAHOO.util.Event.onDOMReady(function(){
    
var D=YAHOO.util,F=D.Dom,K=D.Event;
    
var B="";
    
var E="http://marketing.taobao.com/home/delivery/AllContentByPage.do?resourceIds=";
    
var H=F.getElementsByClassName("J_DirectionalBox","div");
ExpandedSubBlockStart.gifContractedSubBlock.gif    
if(H.length===0){return 
ExpandedSubBlockStart.gifContractedSubBlock.gif    }
else{
        
var A="";
ExpandedSubBlockStart.gifContractedSubBlock.gif    
for(var G=0;G<H.length;G++){A+=H[G].getAttribute("resourceid")+","}A=A.slice(0,-1);
    B
=E+A;
ExpandedSubBlockStart.gifContractedSubBlock.gif    
var C=function(){
        
var M=__content_results;
ExpandedSubBlockStart.gifContractedSubBlock.gif        
if(!M||M.length==0){return}
ExpandedSubBlockStart.gifContractedSubBlock.gif        
else{for(var N=0;N<H.length;N++){
ExpandedSubBlockStart.gifContractedSubBlock.gif            
if(M[N]["link"]&&M[N]["content"]){
                H[N].innerHTML
='<a target="_blank" href="'+M[N]["link"]+'"><img src="'+M[N]["content"]+'"></a>'}

ExpandedSubBlockStart.gifContractedSubBlock.gif                
else{
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if((!M[N]["link"])&&M[N]["content"]){H[N].innerHTML=M[N]["content"]}}
}
}
}
;
ExpandedSubBlockStart.gifContractedSubBlock.gif                    YAHOO.util.Get.script(B,
{onSuccess:C});
                    
var J=document.getElementById("J_DirectionalFloat");
ExpandedSubBlockStart.gifContractedSubBlock.gif                    
if(!J){return }else{if(YAHOO.env.ua.ie=="6"){
ExpandedSubBlockStart.gifContractedSubBlock.gif                        
function L(P){
                            
var O=YAHOO.env.ua;
                            
var M=P||F.get(P);
                            
var Q=document.documentElement;
ExpandedSubBlockStart.gifContractedSubBlock.gif                            
var N=window.onscroll=window.onresize=function(){
                                
var S=self.PageYOfferset||(Q&&Q.scrollTop)||document.body.scrollTop;
                                
var R=self.innerWidth||(Q&&Q.clientWidth)||document.body.clientWidth;
                                
var U=self.innerHeight||(Q&&Q.clientHeight)||document.body.clientHeight;
ExpandedSubBlockStart.gifContractedSubBlock.gif                                
var T=U-220;if(0!=O.gecko&&1.9<=O.gecko){T+=5}
ExpandedSubBlockStart.gifContractedSubBlock.gif                                
else{
ExpandedSubBlockStart.gifContractedSubBlock.gif                                    
if(0!=O.ie){if(6>=O.ie){T+=S}}
ExpandedSubBlockStart.gifContractedSubBlock.gif                                    
else{}}
M.style.right=5+"px";M.style.top=T+"px"}
;
ExpandedSubBlockStart.gifContractedSubBlock.gif                                    
if(O.ie&&6>=O.ie){setInterval(N,100)}
ExpandedSubBlockStart.gifContractedSubBlock.gif                                    
else{
ExpandedSubBlockStart.gifContractedSubBlock.gif                                        N()}
K.on(M,"click",function(R){K.stopEvent(R);
ExpandedSubBlockStart.gifContractedSubBlock.gif                                        
if(Q){Q.scrollTop="0px"}document.body.scrollTop="0px"}
)}
J.style.position="absolute";L(J)}

ExpandedSubBlockStart.gifContractedSubBlock.gif                                        
else{
                                            
var I="#J_DirectionalFloat{position:fixed;bottom:10px;right:10px;}";TB.dom.addCSS(I)}
}
}
}
);
                                            
                                            
                                            
ExpandedSubBlockStart.gifContractedSubBlock.gif$E.on(window, 
'load'function() {
    
if (TB.bom.getCookie('_tb_defaultbackpop_'== 1return;
ExpandedSubBlockStart.gifContractedSubBlock.gif    
var saveStatus = function() {
        
var nowDate = new Date();
        
var nowTime = nowDate.getHours()*3600 + nowDate.getMinutes()*60 + nowDate.getSeconds();
        
var DAY = 24*3600;
        
var leaveTime = DAY - nowTime;
        TB.bom.setCookie(
'_tb_defaultbackpop_'1, leaveTime/DAY, document.domain, '/');
    }
    var createPopup = function() {
        var adPopup = window.open(
'about:blank','_backad','width='+(pw||760)+',height='+(ph||480)+',toolbar=no,location=no,directories=no,status=yes,resizable=no,scrollbars=no');
        adPopup.blur();
        adPopup.opener.focus();
        adPopup.location = adUrl;
    }
    var popAd = function() {
        try {
            createPopup();
        } catch (e) {
            $E.on(document, 
'click', popAd2);
        } finally {
            saveStatus();
        }
    }

    var popAd2 = function(ev) {
        try {
            var nodeType = $E.getTarget(ev).tagName.toLowerCase();
            if (
'input' == nodeType || 'select' == nodeType || 'option' == nodeType || 'button' == nodeType) {
                return;
            }
        } catch (e) {}

        $E.removeListener(document, 
'click', arguments.callee);
        try {
            createPopup();
        } catch (e) {}
        saveStatus();
    }

    var adUrl = 
'http://www.taobao.com/promotion/defaultbackpop.html';
    var pw = '750', ph = '490';
    
    setTimeout(popAd, 
2000);
}
);

</script>

转载于:https://www.cnblogs.com/zjm1126qqcom/archive/2009/02/19/1394315.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值