﻿//网站版本下拉
function click_load1() {
    document.getElementById("morenr").style.display = "none";
}
function morenr() {
    click_load1();
    document.getElementById("morenr").style.display = "block";
}
//搜索
function clickinput(n)
{ 
    var serachId = document.getElementById("serach");
    if (n == 0 && serachId.value == "请输入搜索的关键字"){serachId.value="";serachId.style.cssText = "CURSOR:default;"}
    if (n == 1 && serachId.value == ""){serachId.value = "请输入搜索的关键字";serachId.style.cssText = " CURSOR:default;"}
}
function trim_(value_){
    var re=/\s+/gi;
    return value_.replace(re,"");
}
function CheckLogin()
{
    if(trim_(document.getElementById("serach").value)=='' || document.getElementById("serach").value =='请输入搜索的关键字')
    {
        alert("请输入搜索的关键字！");
        return;
    }
    else
    {
        window.open("/Search.aspx?searchcontent="+escape(document.getElementById("serach").value));
        document.getElementById("serach").value='';
    }
}
//加添首页、收藏夹
function AddFavorite(sURL, sTitle) {
    try {
        window.external.addFavorite(sURL, sTitle);
    }
    catch (e) {
        try {
            window.sidebar.addPanel(sTitle, sURL, "");
        }
        catch (e) {
            alert("加入收藏失败，请使用Ctrl+D进行添加");
        }
    }
}
function SetHome(obj, vrl) {
    try {
        obj.style.behavior = 'url(#default#homepage)'; obj.setHomePage(vrl);
    }
    catch (e) {
        if (window.netscape) {
            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', vrl);
        }
    }
}
$(function() {
    $('#index_login').bind('click', function() {
        var login_type = $('input[name=usertype][checked]').val();
        if (login_type == "互联网用户") {

            window.open("/Help/Help.htm");
        }
        else {
            window.open("http://172.18.162.33/");
        }
    });
    $('#gh_title div').each(function(index) {
        $(this).hover(function() {
            $('#gh_title div').css('background-image', 'url(/res/pic/jqgl/jqgl_bj.jpg)');
            $('#gh_title div').css('border', '1px solid #026E63');
            $('#gh_title div').css('font-weight', '');
            $('#ghnr span').css('display', 'none');
            $(this).css('font-weight', 'bold');
            $(this).css('background-image', 'url(/res/pic/jqgl/jqgl_bj1.gif)');
            $(this).css('border', '');         
            $('#ghnr span:eq(' + index + ')').css('display', 'block');
        });
    });
//    $('#xzxktitle div').each(function(index) {
//        $(this).hover(function() {
//            $('#xzxktitle div').attr('style', '');
//            $('#xknr span').css('display', 'none');
//            $(this).css('color', '#FBE242');
//            $('#xknr span:eq(' + index + ')').css('display', 'block');
//        });
//    });
    $('#bszx div').each(function(index) {
        $(this).hover(function() {
        $('#bszx div').attr('style', '');
        $('#bszxnr span').css('display', 'none');
            $(this).css('color', '#FBE242');
            $('#bszxnr span:eq(' + index + ')').css('display', 'block');
        });
    });
    $('#zxbl div').each(function(index) {
        $(this).hover(function() {
        $('#zxbl div').attr('style', '');
        $('#zxblnr span').css('display', 'none');
        $(this).css('background', '#5FBDEA');
        $(this).css('font-weight', 'bold');
        $('#zxblnr span:eq(' + index + ')').css('display', 'block');
        });
    });
});
var step = 0;
var step_jj = 0;
function GetPicInfos(spic, slinks, stexts, sfocus_width, sfocus_height, stext_height, _obj) {
    var shtml = "";
    var focus_width = 450;
    var focus_height = 300;
    var text_height = 24;
    var pics = spic;
    var links = slinks;
    var texts = stexts;
    var swf_height = parseInt(focus_height) + parseInt(text_height);
    shtml += '<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="' + focus_width + '" height="' + swf_height + '">';
    shtml += '<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="/res/flash/picflash.swf"><param name="quality" value="high"><param name="bgcolor" value="#EbEbEb">';
    shtml += '<param name="menu" value="false"><param name=wmode value="opaque">';
    shtml += '<param name="FlashVars" value="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '">';
    shtml += '<embed src="/res/flash/picflash.swf" wmode="opaque" FlashVars="pics=' + pics + '&links=' + links + '&texts=' + texts + '&borderwidth=' + focus_width + '&borderheight=' + focus_height + '&textheight=' + text_height + '" menu="false" bgcolor="#EbEbEb" quality="high" width="' + focus_width + '" height="' + swf_height + '" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />';
    shtml += '</object>';
    $(_obj).html(shtml);
}
//友情链接
function showlink(obj) {
    if (obj.value != null || obj.toString() != "" || obj.toString() != null) {
        window.open(obj.value);
    }
}


