﻿function GetId(e) {return document.getElementById(e);}

function Swf(url, w, h) {
    document.write('<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + w + '" height="' + h + '">');
    document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="'+url+'"><param name="quality" value="high"><param name="menu" value="false">');
    document.write('<embed src="'+url+'" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + w + '" height="' + h + '"></embed>');
    document.write('</object>');
}
$(function () {
    var o = "#slide img";
    if ($(o).length == 0) {
        return;
    }
    setInterval(function () {
        var next = $(o+":visible").hide().next();
        if (next.length == 0) {
            next = $(o+":first");
        }
        next.fadeIn("slow");
    }, 4000);
});

$(function () {
    $(".uls").click(function () {
        $(this).blur();
        $(".boxLeft ul ul").hide("slow");
        $(".boxLeft a.current").removeClass("current");
        $(this).addClass("current");
        $(this).parent().find("ul").show("slow");
        return false;
    });
});

$(function () {
    $("#btnSearchSubmit").click(function () {
        var k = $("#txtSearchKeyWord");
        if (k.val().length == 0) {
            alert("请输入要搜索的关键词！");
            k.focus();
            return;
        }
        var lang = $(this).attr("class");
        location.href = "/" + lang + "/Product.aspx?Key=" + escape(k.val());
    });
});

$(function () {
    $("#JumpProductCate").change(function () {
        var url = this.options[this.selectedIndex].value;
        if (url.length > 0) {
            location.href = url;
        }
    });
});
