function GrayOut(v)
{
    if (v)
    {
        if (getCookie('ipszonecookie'))
        {
           
            document.getElementById('divGray').style.visibility = 'hidden';
            document.getElementById('divGray').style.zIndex = '-1';
            document.getElementById('ctl00_Left_divLocation').style.visibility = 'hidden';
            document.getElementById('ctl00_Left_divLocation').style.zIndex = '-1';
            document.getElementById('body').style.overflow = 'auto';
        }
        else
        {
            document.getElementById('divGray').style.visibility = 'visible';
            document.getElementById('divGray').style.zIndex = '1000';
            document.getElementById('ctl00_Left_divLocation').style.visibility = 'visible';
            document.getElementById('ctl00_Left_divLocation').style.zIndex = '1001';
            document.getElementById('body').style.overflow = 'hidden'; 
        }
    }
    else
    {
        document.getElementById('divGray').style.visibility = 'hidden';
        document.getElementById('divGray').style.zIndex = '-1';
        document.getElementById('ctl00_Left_divLocation').style.visibility = 'hidden';
        document.getElementById('ctl00_Left_divLocation').style.zIndex = '-1';
        document.getElementById('body').style.overflow = 'auto';
    }
}

// Get the value of the cookie with the specified name.
function getCookie(sName)
{

  // cookies are separated by semicolons
  var aCookie = document.cookie.split("; ");
  for (var i=0; i < aCookie.length; i++)
  {
    // a name/value pair (a crumb) is separated by an equal sign
    var aCrumb = aCookie[i].split("=");
    if (sName == aCrumb[0])  
        if (unescape(aCrumb[1]) == '1' || unescape(aCrumb[1]) == '2')   
            return true;
        else
            return false;
  }
  
  // a cookie with the requested name does not exist
  return false;
}
