﻿function OpenFriendLink(obj) { if (obj.value.length != 0) { window.open(obj.value); } }
function Research(type, counter, item) { var val = ""; var count = 0; if (type == 0) { val = $("input[name='OnlineSurveyRadio']:checked").val(); if ($("input[name='OnlineSurveyRadio']:checked").length > 0 && val.length != 0) { SendAjax(item, val); } else { $("#OnlineSurveyErrorMsg").html("请先选择！"); } } else { $("#OnlineSurvey input:checked").each(function() { val += $(this).val() + ","; count++; }); if (count == 0) { $("#OnlineSurveyErrorMsg").html("请先选择！"); } else if (count > counter) { $("#OnlineSurveyErrorMsg").html("最多只能选择" + counter + "项！"); } else if (count <= counter) { SendAjax(item, val); } } }
function SendAjax(item, val) { $.ajax({ type: "GET", cache: false, url: "/Ajax/OnlineSurvey.aspx", data: "ItemID=" + item + "&Value=" + val, error: function() { $("#OnlineSurveyErrorMsg").html("服务器繁忙，请稍候再试！"); }, success: function(data) { $("#OnlineSurveyErrorMsg").html(data); } }); }
$(document).ready(function() {
    $("#tab_button_list a").click(function() { $(this).siblings().css("color", "green"); $(this).css("color", "#FB812C"); });
    $("#click1").click(function() { $("#content1").animate({ marginLeft: "0" }, { duration: 500 }); $("#content2").animate({ marginLeft: "0" }, { duration: 500 }); });
    $("#click2").click(function() { $("#content1").animate({ marginLeft: "-650px" }, { duration: 500 }); $("#content2").animate({ marginLeft: "0" }, { duration: 500 }); });
    $("#click3").click(function() { $("#content1").animate({ marginLeft: "-650px" }, { duration: 500 }); $("#content2").animate({ marginLeft: "-650px" }, { duration: 500 }); });
    $("#ineedhelp_button_warp").hover(function() { $(this).stop().animate({ marginTop: "-12px" }, { duration: 200 }); }, function() { $(this).stop().animate({ marginTop: "-6px" }, { duration: 200 }); });
    $("#special img").hover(function() { $(this).stop().animate({ width: "144px", height: "72px" }, { duration: 200 }); }, function() { $(this).animate({ width: "140px", height: "68px" }, { duration: 200 }); });
    var top_speed = 50; var top_tab = document.getElementById("top_demo"); var top_tab1 = document.getElementById("top_demo1"); var top_tab2 = document.getElementById("top_demo2"); top_tab2.innerHTML = top_tab1.innerHTML; function top_Marquee() { if ((top_tab2.offsetTop - top_tab.scrollTop) <= 20) { top_tab.scrollTop -= top_tab1.offsetHeight; } else { top_tab.scrollTop++; } } var top_MyMar = setInterval(top_Marquee, top_speed); top_tab.onmouseover = function() { clearInterval(top_MyMar); }; top_tab.onmouseout = function() { top_MyMar = setInterval(top_Marquee, top_speed); }
    var speed = 20; var tab = document.getElementById("demo"); var tab1 = document.getElementById("demo1"); var tab2 = document.getElementById("demo2"); tab2.innerHTML = tab1.innerHTML; function Marquee() { if (tab2.offsetWidth - tab.scrollLeft <= 0) { tab.scrollLeft -= tab1.offsetWidth; } else { tab.scrollLeft++; } } var MyMar = setInterval(Marquee, speed); tab.onmouseover = function() { clearInterval(MyMar) }; tab.onmouseout = function() { MyMar = setInterval(Marquee, speed) };
    function rightBottomAd() {
        var ads = document.getElementById("ads");
        ads.style.top = document.documentElement.scrollTop + document.documentElement.clientHeight - 280 + "px";
        setTimeout(function() { rightBottomAd(); }, 50);
    }
    rightBottomAd();
})