
function hide_show() {
    
    var ele = document.getElementById("prev_banner");
    var text = document.getElementById("prev_control");
    var breaker = document.getElementById("break");
    if(ele.style.display == "none") {
        ele.style.display = "block";
        
        text.style.top = "2px";
        if(breaker != null)
        {
        text.innerHTML = "<div id='break'><a href=\"javascript:export_to_word();\"><img src=\"images/word_new.png\" border=\"0\" alt=\"hide\" width=\"35\" style=\"padding-bottom:3px\"></a><a href='javascript:hide_show();'><img src='images/hide1.gif' alt='hide' border='0' title='You are in preview Mode'></a></break>";
        }
        else
        {
            text.innerHTML = "<a href='javascript:hide_show();'><img src='images/hide1.gif' alt='hide' border='0' title='You are in preview Mode'></a>";  
        }
        //text.innerHTML = "Hide";
        //script to store block menu state 
        var display_type = "block";  
        
       createCookie('hide_show_prev',display_type)
        
      } else {
        ele.style.display = "none";   
        var display_type = "none";
        text.style.top = "2px";
        
        if(breaker != null)
        {
            text.innerHTML = "<div id='break'></div><a href='javascript:hide_show();'><img src='images/show1.gif' alt='show' border='0' title='You are in preview Mode'></a>";
        }
        else
        {
                 text.innerHTML = "<a href='javascript:hide_show();'><img src='images/show1.gif' alt='show' border='0' title='You are in preview Mode'></a>";   
        }
        
        //script to store hide menu state  
          
        createCookie('hide_show_prev',display_type)
    }
       
    

} 

 //new float menu
 var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
function JSFX_FloatDiv(id, sx, sy)
{
    var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
    var px = document.layers ? "" : "px";
    window[id + "_obj"] = el;
    if(d.layers)el.style=el;
    el.cx = el.sx = sx;el.cy = el.sy = sy;
    el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};

    el.floatIt=function()
    {
        var pX, pY;
        pX = (this.sx >= 0) ? 0 : ns ? innerWidth : 
        document.documentElement && document.documentElement.clientWidth ? 
        document.documentElement.clientWidth : document.body.clientWidth;
        pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? 
        document.documentElement.scrollTop : document.body.scrollTop;
        if(this.sy<0) 
        pY += ns ? innerHeight : document.documentElement && document.documentElement.clientHeight ? 
        document.documentElement.clientHeight : document.body.clientHeight;
        this.cx += (pX + this.sx - this.cx)/8;this.cy += (pY + this.sy - this.cy)/8;
        this.sP(this.cx, this.cy);
        setTimeout(this.id + "_obj.floatIt()", 10);
    }
    return el;
}
JSFX_FloatDiv("floatdiv", 0,0).floatIt();   

       //create cookie to save status of hide/show
function createCookie(name,value,days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime()+(days*24*60*60*1000));
        var expires = "; expires="+date.toGMTString();
    }
    else var expires = "";
    document.cookie = name+"="+value+expires+"; path=/";
}


