__isenglish=false;

try
{
    var url=""+document.location;
    var ls=url.split("?");
    if(ls.length>1)
    {
        if(ls[1]=="language=zh_cn")
        {
            __isenglish=false;
        }else if(ls[1]=="language=en_us")
        {
            __isenglish=true;       
        }
    }
}catch(eevv){}



function IsEnglish()
{
    return __isenglish;
}



function GetDefaultLang(idname,defaultstr)
{
    try
    {
        var str="";
        str=eval(idname);
        if(str==null || str==undefined)
        {
            str="";
        }
        return str;
    }catch(eeddvv)
    {
        //alert("读取"+idname+",失败!");
    }
    return defaultstr;
}

function GetResetButtonPicName()
{    
    if(IsEnglish())
    {
        return "ptz/images/a2enn.jpg";
    }else
    {
        return "ptz/images/a2n.jpg";
    }
}

function GeLanguageLink()
{
    if(IsEnglish())
    {
        return "<a href='?language=zh_cn'   style='margin-top:2px;' class='linka' ><img src='images/ch.gif'  border='0' /></a>";
    }else
    {
        return "<a href='?language=en_us'  style='margin-top:2px;'  class='linka'  ><img src='images/en.gif'   border='0' /></a>";
    }
}