// This javascript file is for brand specific variables and routines.

// This variable is used for adbanners. Each brand should have a unique sitepage.
var g_sitepage = "www.ancestry.families.aol.com/";


// If using .js file to display the brand header then set this variable and create a writeheader.js file
var g_bUsesJSFile = true;


//This is the code which allows the pulldowns to jump to the correct page when
//an option is selected.
	function redir3(theForm)
	{
	 var anyString;
	 var index;

	 index=theForm.URL.selectedIndex

	 anyString=theForm.URL.options[index].value;

	 if (anyString.substring(0,3) == "aol")
	    {
	    window.location=theForm.URL.options[index].value;
	    theForm.URL.focus();
	    }
	 else
	    {
	    window.open(theForm.URL.options[index].value);
	    }

	 return (false);
	}

// Include other funtions and variables that are brand specific
function writeBrandHeader(strDomain)
{
	var showNone = ( (typeof g_hdShowNone) != 'undefined' ) ? g_hdShowNone : false;

	if (showNone == false)	
	{
		document.write('<\script src="http://hats.channel.aol.com/main.adp?ch=rl"><\/script>');
	}
}


function writeBrandFooter(strDomain)
{
	var showNone = ( (typeof g_ftShowNone) != 'undefined' ) ? g_ftShowNone : false;

	if (showNone == false)
	{
		document.write('<\script src="http://hats.channel.aol.com/main.adp?ch=rl"><\/script>');
	}

	// Omniture tracking has been moved to header.js/header.ascx. This test prevents double tracking during transition:
	if (typeof(g_ftNeedTrack)=='undefined' || g_ftNeedTrack)
	{
		// This code adds Omniture include files at the end of the page footer, for convenience on some stacks.
		// Other stacks include the files via a .NET module or ISAPI filter and should not be tagged here.
		// List the domains that should NOT be tagged here:
		var m_sExcludeDomains = 'ancestry.com::www.ancestry.com::search.ancestry.com::content.ancestry.com::shops.ancestry.com::'+
			'landing.ancestry.com::trees.ancestry.com::';

		var sSimpleHostname = window.document.location.hostname.replace("ancestryaol","ancestry").replace(".families.aol.",".").replace("test.",".").replace("dev.",".").replace("stage.",".");
		if (m_sExcludeDomains.indexOf(sSimpleHostname) == -1)
		{
			document.write('<\script language="JavaScript" src="' + m_CachePartner + '/js/omniture_tracking.js"><\/script>');
			document.write('<\script language="JavaScript" src="' + m_Cache + '/js/omniture_base.js"><\/script>');
		}
		g_ftNeedTrack=false;	// Don't repeat again
	}
}