﻿function showpro(url) {
    //window.open(url, '', 'top=50,left=5,width=940,height=550,scrollbars=no')
    window.open(url);
}
function setHomePage(obj) {
    var aUrls = document.URL.split("/");
    var vDomainName = "http://" + aUrls[2] + "/";
    try {//IE 
        obj.style.behavior = "url(#default#homepage)";
        obj.setHomePage(vDomainName);
    } catch (e) {//other 
        if (window.netscape) {//ff 
            try {
                netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
            }
            catch (e) {
                alert("此操作被浏览器拒绝！\n请在浏览器地址栏输入“about:config”并回车\n然后将[signed.applets.codebase_principal_support]设置为'true'");
            }
            var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces.nsIPrefBranch);
            prefs.setCharPref('browser.startup.homepage', vDomainName);
        }
    }
    if (window.netscape) alert("ff");
}
function addFavorite() {
    var aUrls = document.URL.split("/");
    var vDomainName = "http://" + aUrls[2] + "/";
    var description = document.title;
    try {//IE 
        window.external.AddFavorite(vDomainName, description);
    } catch (e) {//FF 
        window.sidebar.addPanel(description, vDomainName, "");
    }
}
function Show3D(ID) {
    var loader = new OneProductLoader();
    loader.flashUrl = "http://3d.toybaba.com/";
    loader.CreatePartEnlargeFlash("flashId", "Blue", ID, 50277, false, 200, 480, 400, "flashPlayerCon");
}
function marquee(Info,id,width,height,speed) {
    document.write("<div id=\""+id+"\" onMouseOver=\"ij"+ id +"=1\"  style=\"border:0px solid gray;OVERFLOW: hidden; HEIGHT: "+height+"; width:"+width+" \" onmouseout=\"ij"+id+"=0\">"
                + "<div id=\""+ id+"1\">"
                + Info
                + "</div>"
                + "<div id=\""+id+"2\"></div>"
                + "</div><SCRIPT lanaguage=javascript>"
                + "var ij" + id + "=0;t" + id + "=document.getElementById('" + id + "').scrollTop;"
                + "document.getElementById('" + id + "2').innerHTML=document.getElementById('" + id + "1').innerHTML;"
                + "function qswh"+id+"(){"
                + "if (ij" + id + "==1)return;");
     document.write("if(document.getElementById('" + id + "2').offsetTop-document.getElementById('" + id + "').scrollTop<=0){"
                + "document.getElementById('" + id + "').scrollTop-=document.getElementById('" + id + "1').offsetHeight;}"
                + "else"
                + "{document.getElementById('" + id + "').scrollTop++;}"
                + "}");
     document.write("setInterval(qswh" + id + "," + speed + ");"
                + "</Script>");
 }
 function ShowBigPic(FileName)
 {
    document.getElementById("flashPlayerCon").innerHTML="<img src='"+ FileName +"' border='0' onload='javascript:if(this.width>500){this.width=500;}'/>";
 }
