


// Floating Sidebar Menu Script from Flooble.com
// For more information, visit 
//	http://www.flooble.com/scripts/sidebar.php
// Copyright 2003 Animus Pactum Consulting inc.
//---------------------------------------------------------
    var ie = false;
	
    var open = true;
    var oldwidth = -1;
	
	var open2 = true;
    var oldwidth2 = -1;
	
	var open3 = true;
	var oldwidth3 = -1;
	
    if (document.all) { ie = true; }

    function getObj(id) {
        if (ie) { return document.all[id]; }
        else {    return document.getElementById(id);    }
    }
    
    function toggleSidebar() {
        var sidebar = getObj('sidebarcontents');
        var menu = getObj('sidebarmenu');
        var arrow = getObj('sidearrow');
        if (open) {
        	var sidec = getObj('sidebar');            
            var h = sidec.scrollHeight;
            if (oldwidth < 0) { 
            	oldwidth = sidebar.scrollWidth;
            }
            sidebar.style.display = 'none';
            td = getObj('sidebartd');
            td.style.width = 0;         
            arrow.innerHTML = '<';
            //alert(h + ' - ' + sidec.scrollHeight);
            sidec.style.height = h;
            open = false;
        } else {
            sidebar.style.display = 'block';
            sidebar.style.width = oldwidth;
            arrow.innerHTML = '>';
            open = true;
        }
        getObj('focuser').focus();
        
    } 
	
    function setSidebarTop() {
        //alert('hoy');
        var sidec = getObj('sidebar');
        sidec.style.top = 0 + document.body.scrollTop;
        setTimeout('setSidebarTop()', 10);
    }
	
	setTimeout('setSidebarTop();', 2000);
	
	
	
	
	
	
    function toggleSidebar2() {
        var sidebar = getObj('sidebarcontents2');
        var menu = getObj('sidebarmenu2');
        var arrow = getObj('sidearrow2');
        if (open2) {
        	var sidec = getObj('sidebar2');            
            var h = sidec.scrollHeight;
            if (oldwidth2 < 0) { 
            	oldwidth2 = sidebar.scrollWidth;
            }
            sidebar.style.display = 'none';
            td = getObj('sidebartd2');
            td.style.width = 0;         
            arrow.innerHTML = '<';
            //alert(h + ' - ' + sidec.scrollHeight);
            sidec.style.height = h;
            open2 = false;
        } else {
            sidebar.style.display = 'block';
            sidebar.style.width = oldwidth2;
            arrow.innerHTML = '>';
            open2 = true;
        }
        getObj('focuser2').focus();
        
    }    
    
    function setSidebarTop2() {
        //alert('hoy');
        var sidec = getObj('sidebar2');
        sidec.style.top = 300 + document.body.scrollTop;
        setTimeout('setSidebarTop2()', 10);
    }	
    
    setTimeout('setSidebarTop2();', 2000);
    

	
	function toggleSidebar3() {
        var sidebar = getObj('sidebarcontents3');
        var menu = getObj('sidebarmenu3');
        var arrow = getObj('sidearrow3');
        if (open3) {
        	var sidec = getObj('sidebar3');            
            var h = sidec.scrollHeight;
            if (oldwidth3 < 0) { 
            	oldwidth3 = sidebar.scrollWidth;
            }
            sidebar.style.display = 'none';
            td = getObj('sidebartd3');
            td.style.width = 0;         
            arrow.innerHTML = '>';
            //alert(h + ' - ' + sidec.scrollHeight);
            sidec.style.height = h;
            open3 = false;
        } else {
            sidebar.style.display = 'block';
            sidebar.style.width = oldwidth3;
            arrow.innerHTML = '<';
            open3 = true;
        }
        getObj('focuser3').focus();
        
    }    
    
    function setSidebarTop3() {
        //alert('hoy');
        var sidec = getObj('sidebar3');
        sidec.style.top = 300 + document.body.scrollTop;
        setTimeout('setSidebarTop3()', 10);
    }	
    
    setTimeout('setSidebarTop3();', 2000);
	
	
	
	/*
    function toggleSidebarT(idNumber, bracket) {
        var sidebar = getObj('sidebarcontents' + idNumber);
        var menu = getObj('sidebarmenu' + idNumber);
        var arrow = getObj('sidearrow' + idNumber);
        if (open3) {
        	var sidec = getObj('sidebar' + idNumber);            
            var h = sidec.scrollHeight;
            if (oldwidth2 < 0) { 
            	oldwidth2 = sidebar.scrollWidth;
            }
            sidebar.style.display = 'none';
            td = getObj('sidebartd' + idNumber);
            td.style.width = 0;         
            arrow.innerHTML = bracket;
            //alert(h + ' - ' + sidec.scrollHeight);
            sidec.style.height = h;
            open3 = false;
        } else {
            sidebar.style.display = 'block';
            sidebar.style.width = oldwidth3;
            arrow.innerHTML = bracket;
            open3 = true;
        }
        getObj('focuser' + idNumber).focus();
        
    }    
    
    function setSidebarTopT(idNumber) {
        //alert('hoy');
        var sidec = getObj('sidebar' + idNumber);
        sidec.style.top = 300 + document.body.scrollTop;
        setTimeout('setSidebarTopT()', 10);
    }	
    
    setTimeout('setSidebarTopT();', 2000);
    */