﻿

function show_hide_login()
{
    var pe=$("login_layer");
    var e=$("client_login_layer");
    if(e.style.display=='none')
    {
        e.style.display='block';
        pe.style.height="110px";
        pe.style.background=" url(img/login/login.gif) no-repeat 0px -24px";
    }
    else
    {
        e.style.display='none';
        pe.style.height="24px";
        pe.style.background=" url(img/login/login.gif) no-repeat 0px 0px";
}
}

function $(id){return document.getElementById(id);}
function getVer(){
	var ua=new String(navigator.userAgent);
	if(ua.indexOf("Firefox")!=-1) return "ff";
	if(ua.indexOf("Opera")!=-1) return "op";
	if(ua.indexOf("MSIE")!=-1&&ua.indexOf("Opera")==-1) return "ie";
}
function includer(){
    var j=$('main_js');
    var st=$('main_style');
    j.src="../../wwwroot/home/index.js";
    $('logo_img').src="../../img/PartoBG4.gif";
}

var state='visible';
function show_hide_panel(){
    if(state=='visible') hide_left_panel();
    else show_left_panel();
}//end show_hide_panel()
function hide_left_panel(){
    var e=$('right_panel');
    var pe=$('linklist');
    var m=$('content_left');
    var c=$('content_panel');
    var h=parseInt(e.style.right);
    var w=parseInt(pe.style.width);
    var mw=parseInt(m.style.width);
    var cw=parseInt(c.style.width);
    if(h!=-140){
        h-=10;
        w-=10;
        mw+=10;
        cw+=10;
        e.style.right=h;
        pe.style.width=w;
        m.style.width=mw;
        c.style.width=cw;
        setTimeout('hide_left_panel()',1);
    }
    else{
        e.style.right='-140px';
        pe.style.width='20px';
        m.style.width='750px';
        c.style.width='540px';      
        state="hidden";
        }
}

function show_left_panel(){
    var e=$('right_panel');
    var pe=$('linklist');
    var m=$('content_left');
    var c=$('content_panel');
    var h=parseInt(e.style.right);
    var w=parseInt(pe.style.width);
    var mw=parseInt(m.style.width);
    var cw=parseInt(c.style.width);
    if(h!=0){
        h+=10;
        w+=10;
        mw-=10;
        cw-=10;
        e.style.right=h;
        pe.style.width=w;
        m.style.width=mw;
        c.style.width=cw;        
        setTimeout('show_left_panel()',1);
    }
    else{
        e.style.right='0px';
        pe.style.width='160px';
        m.style.width='610px';
        c.style.width='400px';        
        state="visible";
        }
}

