﻿// JScript 文件
function ResizeBox(param1,param2)
{
    var tHeight=220;
    var myPubHeight=document.getElementById("ctl00_inputMyPubActivityHasValue").value;
    if(myPubHeight>180)
        tHeight+=5;
    else if(myPubHeight>0)
        tHeight+=4;
    tHeight+=parseInt(myPubHeight);
    var myHotHeight=document.getElementById("ctl00_inputHotActivityHasValue").value;
    tHeight+=parseInt(myHotHeight);
    document.getElementById(param1).style.height=tHeight;
    document.getElementById(param2).style.height=tHeight;
}

function $(id){return document.getElementById(id);}

function SearchActivity()
{
    var item = $("selItemEnt").value;
    if (item == "0")
    {
        alert("请选择搜索类型！");
        return false;
    }
    else
    {
        var field = $("txtSearch").value;
        var url = "";
        if (field == "")
        {
            alert("请输入搜索内容！");
            $("txtSearch").focus();
            return false;
        }
        //官方活动
        if (item == "1")
        {
            url = "/ActivityList.aspx?from=3&type=1&pi=0&key=" + field
        }
        //会员活动
        else if (item == "2")
        {
            url = "/ActivityList.aspx?from=3&type=2&pi=0&key=" + field
        }
        //window.open(encodeURI(url));
        location.replace(encodeURI(url));
    }
}
