function chg_thisclass(obj,clsName,event_type)
{
    var event_obj;
    event_obj=eval(obj);
    if (event_type==1) {
        if (clsName!=""){
            event_obj.className +=" "+clsName;
        }
    }
    else {
        if (clsName!=""){
            event_obj.className=event_obj.className.replace(" "+clsName,"");
        }
    }
}
function getthe_hrefvar(strVar)
{
    var the_urlvar="0";
    if(strVar)
    {
        if(document.location.search.substr(1))
        {
            var aParams = document.location.search.substr(1).split('&');
            for (i=0; i<aParams.length; i++)
            {
                var aParam = aParams[i].split('=');
                if(aParam[0]==strVar)
                {
                    the_urlvar = aParam[1];
                    break;
                }
            }
        }
    }
    return the_urlvar;
}
function changetab_objdiv(event_obj,div_obj,now_i,total_num,the_class,other_class)
{
    for(var i=1;i<=total_num;i++)
    {
        if(document.getElementById(event_obj+i))
        {
            var the_eobj=document.getElementById(event_obj+i);
            if(now_i==i)
            {
                the_eobj.className=the_class;
            }
            else
            {
                if(other_class)
                {
                    the_eobj.className=other_class;
                }
                else
                {
                    the_eobj.className="";
                }
            }
        }
        if(document.getElementById(div_obj+i))
        {
            var item_obj=document.getElementById(div_obj+i);
            if(now_i==i)
            {
                item_obj.style.display="";
            }
            else
            {
                item_obj.style.display="none";
            }
        }
    }
}
function changeNoImage()
{
    var webImgs=document.getElementsByTagName("img");
    for(var i=0;i<webImgs.length;i++){
        webImgs[i].onerror=function(event){
            event = event || window.event;
            event.srcElement.src="/images/no_pic.jpg";
        }
    }
}
function start_upmarquee(lh,speed,delay,index_obj){
    var the_time;
    var the_stop=false;
    var moveObj=document.getElementById(index_obj);
    moveObj.innerHTML+=moveObj.innerHTML;
    moveObj.onmouseover=function(){the_stop=true}
    moveObj.onmouseout=function(){the_stop=false}
    moveObj.scrollTop = 0;
    function start(){
        the_time=setInterval(scrolling,speed);
        if(!the_stop) moveObj.scrollTop += 2;
    }
    function scrolling(){
        if(moveObj.scrollTop%lh!=0){
            moveObj.scrollTop += 2;
            if(moveObj.scrollTop>=moveObj.scrollHeight/2) moveObj.scrollTop = 0;
        }else{
            clearInterval(the_time);
            setTimeout(start,delay);
        }
    }
    setTimeout(start,delay);
}
function showhide_objdiv(div_obj,event_type,event_obj){
    if(document.getElementById(div_obj))
    {
        var showhide_obj=document.getElementById(div_obj);
        if (event_type==1)
        {
            if(event_obj)
            {
                eval(event_obj).style.position="relative";
            }
            showhide_obj.style.display="";
        }
        else
        {
            if(event_obj)
            {
                eval(event_obj).style.position="";
            }
            showhide_obj.style.display="none";
        }
    }
}