var ie=false;
var mosafop=false;
var oldie=false;
var ie9=false;
var ie7=false;
var browser=navigator.appName;
var showname=false;
var ver=navigator.appVersion;
var stopleft;
var stopbottom;
var thetop;
var theleft;
var showdir=false;
verspot=ver.search("MSIE")
if(verspot < 0)
  {mosafop = true;}
if(verspot > 0)
  { ie=true;
   var realver=ver.substr((verspot+5),1)
   
   if(realver < 9)
     {oldie=true}
   else
     {ie9=true;}
   if(realver==7)
     {ie7=true;}
   }
thebox="";
topspot=0;
leftspot=0;
bw=0;
bh=0;
bhi=0;
growit=false;
function boxpop2(h)
  {b=0}
function boxpop(d)
  {dd=d.id; 
   who=d;
   while(who)
 {topspot=topspot+who.offsetTop;
  who=who.offsetParent;
  }
   who=d;
   while(who)
  {leftspot=leftspot+who.offsetLeft;
  who=who.offsetParent;
  }
  dw=d.offsetWidth;
  dh=d.offsetHeight;
  leftspot=leftspot+dw+2;
  thebox=dd+"pop";
  
  b=document.getElementById(thebox).scrollHeight;
  topspot=topspot -((b-dh)/2);
  
  document.getElementById(thebox).style.top=topspot+"px";
  document.getElementById(thebox).style.left=leftspot+"px";
  document.getElementById(thebox).style.visibility="visible";

  bhi=b/5;
  
  
  growit=true;
  growbox();
  }
function growbox()
  {if(growit)
    {
   bw=bw+110;
   bh=bh+bhi;
  
   document.getElementById(thebox).style.width=bw+"px";
   document.getElementById(thebox+"2").style.width=(bw-50)+"px";
    document.getElementById(thebox).style.height=bh+"px";
    if(bw < 550)
      {t=setTimeout("growbox()",50);}
    else
      {clearTimeout(t);}
    
    }
   else
      {clearTimeout(t);}
   
   }
function delbox() 
   {growit=false;
    d=document.getElementById(thebox);
    document.getElementById(thebox+"2").style.width="1px";
    d.style.visibility="hidden";
    d.style.width="1px";
    d.style.heigth="1px";
    d.style.top="0px";
    d.style.left="0px";
    topspot=0;
    leftspot=0;
     bw=0;
     bh=0;
     bhi=0
    
    }
function changecolor(d,s)
  {col=d.style.backgroundColor;
   sc="#303030";
   if(s==0)
     {sc="#a0a0a0"}
   document.getElementById('shad1').style.color=sc;
   document.getElementById('shad2').style.color=sc;
   
   
   document.getElementById('toptext').style.color=col;
   document.getElementById('bottomtext').style.color=col;
   }

function shadowon()
  { document.getElementById('shad1').style.visibility='visible';
    document.getElementById('shad2').style.visibility='visible';
    document.getElementById('sh').innerHTML='<a href="javascript:shadowoff()">Without Shadow</a>';
  }
  
function shadowoff()
  { document.getElementById('shad1').style.visibility='hidden';
    document.getElementById('shad2').style.visibility='hidden';
    document.getElementById('sh').innerHTML='<a href="javascript:shadowon()">With Shadow</a>';
  }  

function loggedin(firstname,lastname)
  { 
     window.location.href='client_documents.php';


}

function logout()
  { xmlhttp=GetXmlHttpObject();
    url='logout.php';
    
   
    xmlhttp.onreadystatechange=stateChanged2;
    xmlhttp.open("GET",url,true);
    xmlhttp.send(null);
  }
function stateChanged2()
{
if (xmlhttp.readyState==4)
  {
  
  window.location.reload();
  
  }
}
function GetXmlHttpObject()
{
if (window.XMLHttpRequest)
  {
  // code for IE7+, Firefox, Chrome, Opera, Safari
  return new XMLHttpRequest();
  }
if (window.ActiveXObject)
  {
  // code for IE6, IE5
  return new ActiveXObject("Microsoft.XMLHTTP");
  }
return null;
}
