/* $Id: i_public_utilities.js,v 1.1.2.5 2009/11/23 18:16:42 bobg Exp $ 

i_public_utilities.js
requires i_footer_public_as.asp

*/

function fakeLink(p_me,p_onOff) 
{
	
	if (p_onOff == 1)
		p_me.style.cursor='pointer';
	else
		p_me.style.cursor='auto';
}

function hideShowText(p_strID)
{
	var elem = document.getElementById(p_strID);
	if (elem.currentStyle != undefined &&
		elem.currentStyle.display == 'none')
		elem.style.display = "block";
	else if (elem.currentStyle != undefined)
		elem.style.display = "none";
	else if (window.getComputedStyle(elem,null).display == 'none')
		elem.style.display = "block";
	else
		elem.style.display = "none";	
	
}

function unhide(p_me, p_strID)
{

	if (p_me.className == "d_seen")
	{
		var elem = document.getElementById(p_strID);
		elem.style.display = "";
		p_me.origHTML = p_me.innerHTML;
		p_me.innerHTML = p_me.innerHTML + elem.innerHTML;
		p_me.setAttribute("className","d_seen2"); 
	}
	else
	{
		p_me.setAttribute("className","d_seen");
		p_me.innerHTML = p_me.origHTML;
		var elem = document.getElementById(p_strID);
		elem.style.display = "none";
	}
	
}

function showInModalPopup(p_strURL)
{
	var l_objReturnValue;
    
    var l_strFeatures = "dialogWidth:" + 700 + "px;dialogHeight:" + 600 + "px;resizable:yes;" +
                        "maximize:" + "false"  +  "; minimize:" + "false" ;
   
    l_objReturnValue = top.window.showModalDialog( p_strURL, "modalDialog", l_strFeatures);
}

// This function requires i_footer_public_as.asp with google analytics for
// the pageTracker object.
// It also assumes that every url passed into it will be a fully realized URL
// relative to the root of the site.  The URL must contain the leading slash.
//
function showInPopup(p_strURL)
{

   
    var l_strFeatures = "width=" + 810 + ",height=" + 600 + 
                        ",menubar=no,toolbar=no,scrollbars=yes,resizable=yes" ;
    
    
    var aWind = window.open( p_strURL, null, l_strFeatures );
	if (window.focus) {aWind.focus()}
}