document.onclick = closeTran;
    function closeTran(){
        var trandiv = document.getElementById("p_l");
        if(trandiv){
            if(trandiv.style.visibility == "visible"){
                trandiv.style.visibility='hidden';
                var imgsrc = document.getElementById("tranimg").src;
                document.getElementById("tranimg").src = imgsrc.replace(/close.gif/,'open.gif');
            }
        }
    }
    function open_img(a,event){
    var div=document.getElementById('selectlang');
        function get_pos(div){
            var pos={'left':0,'top':0}
            while(1){
                if(!div){
                    break;
                }
                pos['left']+=div.offsetLeft;
                pos['top']+=div.offsetTop;
                div=div.offsetParent;

            }
            return pos;
        }
        var pos=get_pos(div);

        var show=document.getElementById("p_l");
        var imgsrc=a.src.split("/");
        if(imgsrc[imgsrc.length-1]=="open.gif"){
            a.src=a.src.replace(/open.gif/,'close.gif');
            div.style.background='#F8FBFF';
            div.style.borderBottom='none';
            show.style.visibility='visible';
            show.style.left=pos['left']+"px";
            show.style.top=pos['top']+20+"px";
        }else{
            a.src=a.src.replace(/close.gif/,'open.gif');
            div.style.borderBottom='#D3E9FF solid 1px';
            show.style.visibility='hidden';
        }
        event.cancelBubble=true;

    }
    function change_subdomain(subdomain){
        var url = window.location.href;
        var domain = window.location.host;
        var newdomain = subdomain + domain.substring(domain.indexOf("."),domain.length);
        var newurl = url.replace(domain,newdomain);
        window.location.href = newurl;
    }
