﻿/*==========================================
    Function to show/hide a div and a div shim (for hiding dropdowns in IE)
    example was taken from http://www.soxiam.com/Code/UsingIframeShimToCoverOverFormSelectBoxes
 
    Note: The divShimId is the id of an IFrame that sits under the div being shimmed.  See sample below
    <iframe id="divShim_" src="javascript:false;" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; display:none;"></iframe>
    
    Author: Shane Stetler
    Date: 12/27/2006
==========================================*/
function ShowDivAndDivShim(divId, divShimId)
{
    var div  = document.getElementById(divId);
    var divShim  = document.getElementById(divShimId);
  
    if (div != null && div != 'undefined')   
    {
        div.style.display = 'block';
    }
        
    if (divShim != null && divShim != 'undefined')   
    {
        //setup div shim - for hiding combos in IE...
        divShim.style.display = "block";
        divShim.style.width = div.offsetWidth;
        divShim.style.height = div.offsetHeight;
        divShim.style.top = div.style.top;
        divShim.style.left = div.style.left;
        divShim.style.zIndex = div.style.zIndex - 1;    
    }
}

/*==========================================
    Note: The divShimId is the id of an IFrame that sits under the div being shimmed.  See sample below
    <iframe id="divShim_" src="javascript:false;" scrolling="no" frameborder="0" style="position:absolute; top:0px; left:0px; display:none;"></iframe>
    
    Author: Shane Stetler
    Date: 12/27/2006
==========================================*/
function HideDivAndDivShim(divId, divShimId)
{
    var div  = document.getElementById(divId);
    var divShim  = document.getElementById(divShimId);
  
    if (div != null && div != 'undefined')   
    {
        div.style.display = 'none';
    }
        
    if (divShim != null && divShim != 'undefined')   
    {
        divShim.style.display = "none";
    }
}

if( typeof(Sys) != "undefined" && typeof(Sys.Application) != "undefined" )
{
  Sys.Application.notifyScriptLoaded();
}

