    var TermsWindow;

    function TermsPopUp()
    {
      if ( ! TermsWindow || TermsWindow.closed )
      {
        TermsWindow = window.open("../../nonindexed/sitetext/TermsPopUp.htm", "myNewTermsWin", "toolbar=no,location=no,scrollbars=yes,resizable=no,width=400,height=600,left=60,top=60");
      }

      TermsWindow.focus();
    }


    var PrivacyPolicyWindow;

    function PrivacyPolicyPopUp()
    {
      if ( ! PrivacyPolicyWindow || PrivacyPolicyWindow.closed )
      {
        PrivacyPolicyWindow = window.open("../../nonindexed/sitetext/PrivacyPolicyPopUp.htm", "myNewPrivacyWin", "toolbar=no,location=no,scrollbars=yes,resizable=no,width=400,height=600,left=80,top=80");
      }

      PrivacyPolicyWindow.focus();
    }


    var LoginHelpWindow;

    function LoginHelpPopUp()
    {
      if ( ! LoginHelpWindow || LoginHelpWindow.closed )
      {
        LoginHelpWindow = window.open("../../dynamic/login/loginHelpPopUp.aspx", "myNewLoginHelpWin", "toolbar=no,location=no,scrollbars=yes,resizable=no,width=400,height=150,left=80,top=80");
      }

      LoginHelpWindow.focus();
    }


    var notesWindow;

    function NotesPopUp( theNote )
    {
      if ( ! notesWindow || notesWindow.closed )
      {
        notesWindow = window.open("", "myNewWin", "toolbar=no,location=no,scrollbars=yes,resizable=no,width=300,height=200,left=20,top=20");
      }

      notesWindow.document.open();

      notesWindow.document.write( theNote );

      notesWindow.document.close();
      
      notesWindow.focus();
    }

	//toggles the description display and the plus/minus image
	//of the section specified by the ident variable 
	function description(ident)
	{
		var anchor = document.getElementById(ident);
		var desc = document.getElementById('description-' + ident);
		var showImg = "../../images/SmallPlus.gif";
		var hideImg = "../../images/SmallMinus.gif";

		// Change the image source depending on what was selected
		
		anchor.src = (getFileNameFromPath(anchor.src) == getFileNameFromPath(showImg)) ? hideImg : showImg;
		setClassStyle('0','aa-description-' + ident,'display','block');
	}
	
	// For a particular element, set the style toggle
	// the style between none and block
	function ShowHide(elementId)
	{
		// Get the element by id
		var anchor = document.getElementById(elementId);
		
		// Set show and hide images names
		var showImg = "../../images/SmallPlus.gif";
		var hideImg = "../../images/SmallMinus.gif";
		
		var imageAnchor = document.getElementById(elementId + '_img');
		
		// Toggle image from + to -.
		if (imageAnchor != null)
		{
			if (getFileNameFromPath(imageAnchor.src) == getFileNameFromPath(showImg))
			{
				imageAnchor.src = hideImg;
			}
			else
			{
				imageAnchor.src = showImg;
			}
		}		

		// Toggle show/hide
		if (anchor != null)
		{
			
			if (anchor.style.display == 'block')
			{
				anchor.style.display = 'none';
			}
			else
			{
				anchor.style.display = 'block';
			}
		}
	}
	
	// Get the short file name from a fully qualified file name.
	function getFileNameFromPath(path)
	{
		return path.substr(path.lastIndexOf('/')+1);
	}
	
	//changes the class style of the class name specified
	//to block or noe
	function setClassStyle(sheet_index,classname,class_style,style_value)
	{
		// styleSheets an array of style sheets used in this
		// document, linked using the link tag at the top.
		var style_sheet=document.styleSheets[sheet_index];
		
		// Make sure there are stylesheets!
		if(!style_sheet){return;}
		
		// Get the rules from the sheet
		var sRules = style_sheet.cssRules || style_sheet.rules;
		
		// Iterate through the rules
		for (var j=sRules.length-1;j>=0;j--)
		{ 
			// later rules will overide earlier
			var sS=sRules[j];
			
			var class_name=sS.selectorText.replace(/\./g,'');
			if(class_name==classname)
			{
				sS.style[class_style]=(sS.style[class_style]  == 'none') ? 'block':'none';
				break;
			}
		}
	}
	
	//calls a number of functions that should be
	//run when the page loads
	function doPageLoad()
	{
		showDescriptionByDefault('pubs');
		showDescriptionByDefault('pps');
		showDescriptionByDefault('prods');
	}	
