﻿
function getAbsPoint(e) {
    var arr = new Array();
    var x = e.offsetLeft, y = e.offsetTop;
    while (e = e.offsetParent) {
        x += e.offsetLeft;
        y += e.offsetTop;
    }
    arr[0] = x;
    arr[1] = y;
    return arr;
}
function SearchList() {
    if (document.getElementById("S_List").style.display == "block") {
        document.getElementById("S_List").style.display = "none";
    }
    else {
        var position = getAbsPoint(document.getElementById("ImgP"));
        document.getElementById("S_List").style.display = "block";
        document.getElementById("S_List").style.left = position[0]+6+ 'px';
        document.getElementById("S_List").style.top = position[1] +27 + 'px';

    }
    event.cancelBubble = true;
}
function ShowColor(index) { 

for(var i=1;i<=9;i++)
{
    document.getElementById("ModifyType" + i).style.backgroundColor = "white";
    document.getElementById("ModifyType" + i).style.color = "#000";

    document.getElementById("ModifyType" + i).style.border = "none";
}
 document.getElementById("ModifyType" + index).style.color = "#1518A2";
 document.getElementById("ModifyType" + index).style.backgroundColor = "#ccc";
 document.getElementById("ModifyType" + index).style.border = "1px solid #999";
 document.getElementById("ModifyType" + index).style.cursor = "pointer";


}
function ModifyType(index, title) {
    document.getElementById("SearchTypeTitle").innerHTML = title;
    document.getElementById("SearchType").value = index;
    document.getElementById("S_List").style.display = "none";
}
function SearchByTitle() {
    if (document.getElementById("Search").value != "") {
        var index = document.getElementById("SearchType").value;
        var title = document.getElementById("Search").value.toString();
        switch (index) {
            case "1":
                window.location.href = "/channel/SearchArticle.aspx?searchTitle=" + escape(title);
                break;
            case "2":
                window.location.href = "/channel/SearchSource.aspx?searchTitle=" + escape(title);
                break;
            case "3":
                window.location.href = "/channel/SearchDaily.aspx?searchTitle=" + escape(title);
                break;
            case "4":
                window.location.href = "/channel/SearchCircle.aspx?searchTitle=" + escape(title);
                break;
            case "5":
                window.location.href = "/channel/SearchPic.aspx?searchTitle=" + escape(title);
                break;
            case "6":
                window.location.href = "/channel/SearchKin.aspx?searchTitle=" + escape(title);
                break;
            case "7":
                window.location.href = "/channel/SearchFriend.aspx?searchTitle=" + escape(title);
                break;
            case "8":
                window.location.href = "/channel/SearchBulletin.aspx?searchTitle=" + escape(title);
                break;
            case "9":
                window.location.href = "/channel/SearchHelp.aspx?searchTitle=" + escape(title);
                break;
        }

    }
    else
        document.getElementById("Search").focus();
}




// 下面为首页和二级页面内版块用户点击情况__田归龙(ScottTian) //
//********开始***************
function pageClickAdd(forumid) {
    
    $.get("/getPageClickCount.aspx", { ActionID: forumid });
    
}
function forumClickAdd(forumid,forumsunid) {
    $.get("/getPageClickCount.aspx", { ActionID: forumid });
    $.get("/getPageClickCount.aspx", { ActionID: forumsunid });
 
  
}
function moreforumClickAdd(id1, id2,id3) {
    $.get("/getPageClickCount.aspx", { ActionID: id1 });
    $.get("/getPageClickCount.aspx", { ActionID: id2 });
    $.get("/getPageClickCount.aspx", { ActionID: id3 });
 
}
//********结束***************


 