// This javascript file is for brand specific variables and routines.
document.write('<\script language="JavaScript" src="' + m_Cache + '/js/utility.js"><\/script>');

// This variable is used for adbanners. Each brand should have a unique sitepage.
var g_sitepage = "msn.ancestry.com/";

// This javascript file is for brand specific variables and routines.
function gotosite(site, activeSelect) 
{
	if (site != "") 
	{
		activeSelect.selectedIndex=0;
		self.location=site; 
	}
}

function writeBrandHeader( strDomain )
{
	var showNone = ( (typeof g_hdShowNone) != 'undefined' ) ? g_hdShowNone : false;
	
	if (showNone == false)	
	{
		document.write(' <style>')
		document.write(' .big7 {font:11px tahoma, sans-serif;background:#D64300;color:#FFFFFF}')
		document.write(' .big7 a {font:bold 11px tahoma, sans-serif;text-decoration:none;color:#FFFFFF ! important;}')
		document.write(' .big7 a:hover{text-decoration: underline;color:#FFFFFF ! important;}')
		document.write(' .big7 a:visited:hover{text-decoration: underline;color:#FFFFFF ! important;}')
		document.write(' .big7 input{font: 11px tahoma, sans-serif}')
		
		document.write(' .GoBtn {margin-left:3px;margin-right:2px;padding:0px}')

		document.write(' .adbar {margin-bottom:5px}')

		document.write(' .sf {font:11px tahoma, sans-serif;background-color:#D64300;color:#FFFFFF}')
		document.write(' .sf a{text-decoration:none;color:#FFFFFF}')
		document.write(' .sf a:hover{text-decoration: underline;color:#FFFFFF}')
		document.write(' .sf a:visited:hover{text-decoration: underline;color:#FFFFFF}')

		document.write(' .sfl {font:24px tahoma, sans-serif;border-bottom: 1px solid #F07005;white-space:nowrap}')
		document.write(' .sfl a{color:#FFFFFF}')

		document.write(' .sflptrn {font:24px tahoma, sans-serif;white-space:nowrap}')
		document.write(' .sflptrn a{color:#FFFFFF ! important}')
		document.write(' .sflrptrn{font:11px tahoma, arial, sans-serif;padding-left:10px;padding-right:5px;white-space:nowrap}')
		document.write(' .sflrptrn a{color:#FFFFFF ! important}')
		document.write(' .sfdd{font:11px tahoma, arial, sans-serif}')

		document.write(' .sfr {font-size:1px}')
		document.write(' .sfi {background:#E1590D;background-image:url(' + GetPageScheme() + '://sc.msn.com/global/c/sf/sfg_o.gif);border-bottom:1px solid #D64300;border-top:1px solid #F07005;border-right:1px solid #A9460B;padding:0px 0px 9px 0px}')
		document.write(' .sflb {font-size:1px;background:#E1590D}')

		document.write(' .nav {background:#FEE6D7}')
		document.write(' .vnav {font:11px tahoma, sans-serif;color:#000000;margin-top:5px}')
		document.write(' .vnav a {text-decoration: none;color:#000000}')
		document.write(' .vnav a:hover{text-decoration: underline;color:#D64300}')
		document.write(' .vnav a:visited:hover{text-decoration: underline;color:#D64300}')

		document.write(' .vnav td{border-bottom: 1px solid #FCC7A4;height:19px;padding-left:3px}')
		document.write(' .vnav .tdh {font:bold;background:#FFFFFF}')
		document.write(' .vnav .tds {font:bold;background:#FEF2EB}')
		document.write(' .vnav .tdsi {background:#FEF2EB;padding-left:7px}')
		document.write(' .vnav .tdsh {background:#FFFFFF;padding-left:7px}')

		document.write(' .tb {background:#F98336;color:#FFFFFF}')
		document.write(' .tb a {color:#FFFFFF}')
		document.write(' .tb a:visited {color:#FFFFFF}')
		document.write(' .tb a:visited:hover {color:#FFFFFF}')

		document.write(' .fhelp a {font-weight:normal}')

		document.write(' .big1 a {color:#FEE6D7}')
		document.write(' .big1 a:hover {color:#FEE6D7}')
		document.write(' .big1 a:visited {color:#FEE6D7}')
		document.write(' .big1 a:visited:hover {color:#FEE6D7}')

		document.write(' .terms {color:#FFFFFF}')
		document.write(' .terms td {font: 10px tahoma, sans-serif;border-top-width:1px;border-top-color:#E68E66;border-top-style:solid}')
		document.write(' .terms a {font: 10px tahoma, sans-serif;text-decoration:none;color:#FFFFFF}')
		document.write(' .terms a:hover {text-decoration:underline;color:#FFFFFF}')

		document.write(' .LoginLinks {font:11px tahoma, sans-serif;color:#FFFFFF;text-align:left;background:#E1590D;padding:5px 5px 5px 12px}')
		document.write(' .LoginLinks a {color:#FFFFFF;text-decoration:underline}')
		document.write(' .LoginLinks a:hover {color:#FFFFFF}')
		document.write(' .LoginLinks a:visited {color:#FFFFFF}')
		document.write(' .LoginLinks a:visited:hover {color:#FFFFFF}')

		document.write(' .page {background:#FFFFFF;padding:0px 5px 5px 16px}')
		document.write(' </style>')


		if (navigator.appName.indexOf('WebTV') != -1) {
			document.write('<embed src="wtv-tricks:/msndispatch?type=tv-navbar-insert&amp;loc=top-navbar" height="33" width="544"></embed>');
		} else {
			document.write('<div class="dMSNME_1"><table width="779" height="30" cellpadding="0" cellspacing="0" class="big7" border="0"><form id="form1" name="form1" method="get" action="http://g.msn.com/0nwenus0/CD/16"><input type="hidden" name="cp" value="1252" /><tr><td align="left" valign="middle" width="450">&nbsp;&nbsp;<a href="http://g.msn.com/0nwenus0/CD/00">MSN&nbsp;Home</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://g.msn.com/0nwenus0/CD/01">My&nbsp;MSN</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://g.msn.com/0nwenus0/CD/02">Hotmail</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://g.msn.com/0nwenus0/CD/04">Shopping</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://g.msn.com/0nwenus0/CD/05">Money</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="http://g.msn.com/0nwenus0/CD/06">People&nbsp;&amp;&nbsp;Chat</a></td><td width="66"></td><td width="*" align="right" nowrap>Web&nbsp;Search:&nbsp;&nbsp;<input type="text" name="q" size="14" maxlength="150" style="width:46%;" /><input type="submit" id="submit1" name="submit1" size="4" class="GoBtn" value="Go" /></td></tr><input type="hidden" name="FORM" value="CD" /></form></table></div>');
		}
		
		document.write(' <table class="sf" width="779" cellpadding="0" cellspacing="0" border="0"> ')
		document.write('	<tr> ')
		document.write('		<td width="118"><a href="http://g.msn.com/0nwenus0/CD/14" target="_top"><img src="' + GetPageScheme() + '://logo.msn.com/en-us/dark/logo35.gif" width="118" height="35" border="0" alt="go to MSN.com" title="go to MSN.com" align="absMiddle"></a></td>' );
		document.write('		<td class="sflptrn" width="*" valign="bottom"><a href="http://family.msn.com/">Family</a></td> ')
		document.write('		<form> ');
		document.write('		<td class="sflrptrn" width="100%" valign="bottom" height="30"> ');
		//<!--- Begin Menu Links ---- [MSN PARTNER TO MODIFY] To replace with the property-specific persistent menu links ---->
		document.write('			<a href="http://family.msn.com/frs/default.aspx?dept=familyr">Family Roots</a>&nbsp;&nbsp;|&nbsp;&nbsp; <a href="http://family.msn.com/rks/default.aspx?dept=raising">Raising Kids</a>&nbsp;&nbsp; ' );
		document.write('			<select class="sfdd" onchange="javascript:gotosite(this.options[this.selectedIndex].value, this);" id="Select2" name=select2> ')
		document.write('				<option value="" selected>More...</option> ')
		document.write('				<option value="http://family.msn.com/cas/default.aspx?dept=crafts">Crafts & Activities</option> ')
		document.write('				<option value="http://family.msn.com/lea/default.aspx?dept=learn">Learning</option> ')
		document.write('				<option value="http://www.family.msn.com/hsy/default.aspx?dept=health">Health & Safety</option> ')
		document.write('				<option value="http://eshop.msn.com/partnercategory.aspx?catid=907&ptnrid=64&ptnrdata=10">Bargain Center</option></select><br> ')
		//<!--- End Menu Links --->
		document.write('				<div style="WIDTH:1px;HEIGHT:4px"><spacer type="block" height="4" /></div> ')
		document.write('		</td> ')
		document.write('		</form> ')
		document.write('	</tr> ')
		document.write(' </table> ')
	}
	if (m_PageWidth != "100%")
		document.write(' <table cellpadding=5 cellspacing=0 border=0 width=100%><tr><td bgcolor="FFFFFF">')
}


function writeBrandFooter(strDomain)
{
	var showNone = ( (typeof g_ftShowNone) != 'undefined' ) ? g_ftShowNone : false;

	if (m_PageWidth != "100%")
	{
		document.write('	</TD>');
		document.write('	<td><img src="' + m_CachePartner + '/i/cleardot.gif" width="3" height="1" alt="-"></td>');
		document.write('	</tr>');
	}
	else
	{
		document.write('<table width="' + m_PageWidth + '" border=0 cellpadding=0 cellspacing=0>');
	}

	document.write('		<tr>');
	document.write('			<td align="left"><img src="' + m_CachePartner + '/i/cleardot.gif" width="10" height="14" alt="_"></td>');
	document.write('			<td colspan="3"><img src="' + m_CachePartner + '/i/cleardot.gif" width="8" height="1" alt="-"></td>');
	document.write('			<td align="right"><img src="' + m_CachePartner + '/i/cleardot.gif" width="10" height="14" alt="_"></td>');
	document.write('		</tr>');
	document.write('	</table>');
	<!--END CONTENT TABLE-->
	if (m_PageWidth != "100%")
		document.write(' </td></tr></table>')
	<!--END FOOTER-->

	// 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("msn.","").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>');
	}
}