﻿/// <summary>
/// 
/// Great Lakes Health Plan.  All rights reserved.
///
/// FileName:	ClientFunctions.js
/// Purpose:	Client Side JavaScript Functions used across the site
///		     
/// Developer:	Vince Bucchare
/// Created:	07/28/2006
///
/// Procedures: 
///
/// Update history:
/// ===============
///	09/10/2007 - VJB - Added function for popups
/// </summary>

// Function for hiding and showing of divisions for long articles.
function showHideDiv(divName, link, text)
{
    if (text == null)
    {
        text = '';
    }
    div = document.getElementById(divName);
    if (div.style.display == 'none')
    {	
	    div.style.display = 'block';
	    if (text == '')	
	    {
	        text = 'Hide';
	    }
	    if (link != null)
	    {
	        link.innerHTML = '-' + text;
	    }
    }
    else
    {
	    div.style.display = 'none';
	    if (text == '')	
	    {
	        text = 'More';
	    }
	    if (link != null)
	    {			    
	        link.innerHTML = '+' + text;
	    }
    }	
}

// VJB - 2006/02/09 - Added function for Hiding and Showing Divisions
function showHidePopup(divName, showCenterScreen, width, height)
{
	div = document.getElementById(divName);
	
	if (div.style.display == 'none')
	{
		div.style.display = 'block';
		document.body.className = 'modalBackground';
	}
	else 
	{
		div.style.display = 'none';
		document.body.className = '';
	}
	if (showCenterScreen == 'true')
	{		
		div.style.left = (screen.availWidth - width) / 2;
		div.style.top = (screen.availHeight - height) / 2;
	}
	
//	alert(document.body.offsetHeight);	
//	alert(screen.availWidth);	
}	    	    