/************************************************
DESCRIPTION: to fade out and fade in content

PARAMETERS: name (ID) of DIV
*************************************************/
function fadePage(currMenu,fade)
  {
    if (document.getElementById(currMenu))
	{
      thisMenu = document.getElementById(currMenu).style;
      if (!fade)
	  { 
        thisMenu.opacity = "1.0";
		thisMenu.filter = "alpha(opacity=100)";
	  }
	  else 
	  {
		thisMenu.opacity = ".30";
		thisMenu.filter = "alpha(opacity=30)";
	  }
    return false;
	}
  }
 function fadePage2(currMenu,fade)
  {
    if (document.getElementById)
	{
      thisMenu = document.getElementById(currMenu).style;
      if (!fade)
	  { 
		thisMenu.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=100) progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/januvia/hcp/images/shared/content_wide_bg_repeat.png', sizingMethod='scale');";
	  }
	  else 
	  {
		thisMenu.filter = "progid:DXImageTransform.Microsoft.Alpha(opacity=20) progid:DXImageTransform.Microsoft.AlphaImageLoader(src='/januvia/hcp/images/shared/content_wide_bg_repeat.png', sizingMethod='scale');";
	  }
    return false;
	}
  }
  function fadePage3(currMenu,fade)
  {
    if (document.getElementById)
	{
      thisMenu = document.getElementById(currMenu).style;
      if (!fade)
	  { 
		thisMenu.visibility = "hidden";
	  }
	  else 
	  {
		thisMenu.visibility = "visible";
	  }
    return false;
	}
  }
/************************************************
DESCRIPTION: to show hidden DIV

PARAMETERS: name (ID) of DIV
*************************************************/
function showMenu(currMenu)
  {
    if (document.getElementById)
	{
      thisMenu = document.getElementById(currMenu).style;
      if (thisMenu.display == "none")
	  {
        thisMenu.display = "block";
	  }
	  else 
	  {
        thisMenu.display = "none";
	  }
    return false;
	}
  }
  
  
  
  
/**
 * Sets a Cookie with the given name and value.
 *
 * name       Name of the cookie
 * value      Value of the cookie
 * [expires]  Expiration date of the cookie (default: end of current session)
 * [path]     Path where the cookie is valid (default: path of calling document)
 * [domain]   Domain where the cookie is valid
 *              (default: domain of calling document)
 * [secure]   Boolean value indicating if the cookie transmission requires a
 *              secure transmission
 */
function setCookie(name, value, expires, path, domain, secure)
{
    document.cookie= name + "=" + escape(value) +
        ((expires) ? "; expires=" + expires.toUTCString() : "") +
        ((path) ? "; path=" + path : "") +
        ((domain) ? "; domain=" + domain : "") +
        ((secure) ? "; secure" : "");
}




/**
 * Sets a Cookie with the given name and value.
 *
 * cookieName       Name of the cookie
 * cookieValue      Value of the cookie
 * nDays            Expiration date of the cookie
 * path             Path where the cookie is valid
 */
function createCookie(cookieName, cookieValue, nDays, path) {
     var today = new Date();
     var expire = new Date();
     if (nDays==null || nDays==0) nDays=1;
     expire.setTime(today.getTime() + 3600000*24*nDays);
     document.cookie = cookieName+"="+escape(cookieValue)
                 + ";expires="+expire.toGMTString()+";path=" + path;
}


/**
 * getCookie is for home page
 */
function getCookie(US_healthcare)
{ 
//if (document.cookie.length > 0)
if (document.cookie.indexOf("US_healthcare=") > -1)
{ 
document.getElementById('overlay').style.display = 'none';
document.getElementById('disclaimer-popup').style.display = 'none';
document.getElementById('disclaimer-popup2').style.display = 'none';
document.getElementById('hm_flashcontent').style.display = 'inline';
//document.getElementById('hm_isi_flashcontent').style.display = 'inline';
}
else
{ 
document.getElementById('overlay').style.display = 'inline';
document.getElementById('disclaimer-popup').style.display = 'inline';
document.getElementById('disclaimer-popup2').style.display = 'inline';
document.getElementById('hm_flashcontent').style.display = 'none';
//document.getElementById('hm_isi_flashcontent').style.display = 'none';
}
return "";
}


/**
 * getCookie2 is for pages with flash chart
 */
function getCookie2(US_healthcare)
{ 
//if (document.cookie.length > 0)
if (document.cookie.indexOf("US_healthcare=") > -1)
{ 
document.getElementById('overlay').style.display = 'none';
document.getElementById('disclaimer-popup').style.display = 'none';
document.getElementById('disclaimer-popup2').style.display = 'none';
//document.getElementById('isi_flashcontent').style.display = 'inline';
document.getElementById('flashcontent').style.display = 'inline';
}
else
{ 
document.getElementById('overlay').style.display = 'inline';
document.getElementById('disclaimer-popup').style.display = 'inline';
document.getElementById('disclaimer-popup2').style.display = 'inline';
//document.getElementById('isi_flashcontent').style.display = 'none';
document.getElementById('flashcontent').style.display = 'none';
}
return "";
}



/**
 * getCookie3 is for pages without flash chart
 */
function getCookie3(US_healthcare)
{ 
if (document.cookie.indexOf("US_healthcare=") > -1)
{ 
document.getElementById('overlay').style.display = 'none';
document.getElementById('disclaimer-popup').style.display = 'none';
document.getElementById('disclaimer-popup2').style.display = 'none';
//document.getElementById('isi_flashcontent').style.visibility = 'visible';
//var isi_flashcontent = document.getElementById('isi_flashcontent');
//if (isi_flashcontent != null && isi_flashcontent != 'undefined') 
//{
// document.getElementById('isi_flashcontent').style.display = 'inline';
//}
}
else
{ 
document.getElementById('overlay').style.display = 'inline';
document.getElementById('disclaimer-popup').style.display = 'inline';
document.getElementById('disclaimer-popup2').style.display = 'inline';
//var isi_flashcontent = document.getElementById('isi_flashcontent');
//if (isi_flashcontent != null && isi_flashcontent != 'undefined')
//{
//    document.getElementById('isi_flashcontent').style.display = 'none';
//}
}
return "";
}

function pgReload() {
window.location.reload( false );
}