﻿<!--

    function reversedisplay(controlid)
    {
        var obj = document.getElementById(controlid);
        if( obj != null )
        {
            if( obj.style.display != 'block' ){
                obj.style.display = 'block';
            }
            else{
                obj.style.display = 'none';
            }
        }
    }

    function showHide(controlID)
    {
         var obj = document.getElementById(controlID);
         if( obj != null )
         {
            if (obj.style.display != 'block')
                obj.style.display = 'block';
            else
                obj.style.display = 'none';
        }
    }
    
    
    function hideShow(controlID)
    {
         var obj = document.getElementById(controlID);
         if( obj != null )
         {
            if (obj.style.display != 'none')
                obj.style.display = 'none';
            else
                obj.style.display = 'block';
        }
    }
    
    function nav(idx){
        document.getElementById("currPage").value=idx;
        document.forms["aspnetForm"].submit();
        return false;
    }
    
    function gotochapter(chapterlocation,plBodyid,plPropsid)
     {
        document.getElementById(plBodyid).style.display = "";
        document.getElementById(plPropsid).style.display = "none";

        window.location = chapterlocation;
        
        
     }
    
    var glossaryMedia;
    function showGlossMedia(glossID){
        glossaryMedia=window.open("fGlossaryMedia.aspx?glossaryID="+glossID, "glossaryMedia", "width=400, height=390, scrollbars=no");
    }
    
    if (glossaryMedia)
        glossaryMedia.close();

    
    
    function mailPage(emailSubject){
        window.location.href='mailto:?subject="' + escape(emailSubject) + '"&body='+window.location.href.substr(0,window.location.href.indexOf('&'));
    }

    function gotoLemmaContent(src)
    {
        document.location = src;
    }
    
    function getMore()
    {
        showHide('home_ergo_content_more');
        hideShow('ergoMoreLink');
        hideShow('ergo_intro_text');
    }
    function windowOpener(pageSrc,paramsAr,paramValsAr,pWidth,pHeight)
    {
        var urlParams='?';
        params=paramsAr.split('?');
        paramVals=paramValsAr.split('?');
        for(var i=0;i<params.length;i++)
            urlParams+=params[i]+'='+paramVals[i]+"&";
        urlParams=urlParams.substr(0,urlParams.length-1);
        window.open(pageSrc+urlParams,null,'width='+pWidth+', height='+pHeight+', scrollbars=auto');
        //return false;
    }

    function showHidePortletLeft(stateId)
    {
         var objState = document.getElementById(stateId);
         if ( objState != null )
         {
            if (objState.value == 'no')
                objState.value = 'yes';
            else
                objState.value = 'no';
            document.forms["aspnetForm"].action=document.forms["aspnetForm"].action+'#'+stateId+"_anchor";
            document.forms["aspnetForm"].submit();
        }
        return false;
    }
//-->


