function lang()
{
	var langCode = "";
	if (/MSIE (\d+\.\d+);/.test(navigator.userAgent))
      	  	langCode = navigator.userLanguage;
	else
        	langCode = navigator.language;
	return langCode.toLowerCase(); 
}

function ebay()
{
	if (lang() == 'en-gb')
	{
		document.write('<script src="http://adn.ebay.com/files/js/min/ebay_activeContent-min.js"></script><script src="http://adn.ebay.com/cb?programId=15&campId=5336637937&toolId=10026&keyword=Genealogy&sortBy=2&width=728&height=90&font=1&textColor=333366&linkColor=333333&arrowColor=8BBC01&color1=ccdab5&color2=FFFFFF"></script>');
	}
	else
	{
		document.write('<script src="http://adn.ebay.com/files/js/min/ebay_activeContent-min.js"></script><script src="http://adn.ebay.com/cb?programId=1&campId=5336637938&toolId=10026&keyword=Genealogy&sortBy=2&width=728&height=90&font=1&textColor=333366&linkColor=333333&arrowColor=8BBC01&color1=ccdab5&color2=FFFFFF"></script>');
	}
}


function start_tree()
{
	if (lang() == 'en-gb')
	{
		document.write('<a href="http://www.dpbolvw.net/click-3317594-10505988?url=http%3A//trees.ancestry.co.uk/Default.aspx%3Freq%3Dtree" target="_blank">Start your FREE Family Tree at Ancestry.co.uk</a><img src="http://www.ftjcfx.com/image-3317594-10400327" width="1" height="1" border="0"/>');
	}
	else
	{
		document.write('<a href="http://www.kqzyfj.com/click-3317594-10491253" target="_blank">Start your FREE Family Tree at Ancestry.com</a><img src="http://www.awltovhc.com/image-3317594-10491253" width="1" height="1" border="0"/>');
	}
}

function start_searching()
{
	document.write('Start searching now with an ');
	if (lang() == 'en-gb')
	{
		document.write('<a href="http://www.anrdoezrs.net/click-3317594-10400327" target="_blank">Ancestry.co.uk FREE trial</a><img src="http://www.ftjcfx.com/image-3317594-10400327" width="1" height="1" border="0"/>');
	}
	else
	{
		document.write('<a href="http://www.dpbolvw.net/click-3317594-10467614" target="_blank">Ancestry.com FREE trial</a><img src="http://www.tqlkg.com/image-3317594-10467614" width="1" height="1" border="0"/>');
	}
}

function free_trial()
{
	document.write('Start searching now with an ');
	if (lang() == 'en-gb')
	{
		document.write('<a href="http://www.anrdoezrs.net/click-3317594-10400327" target="_blank">Ancestry.co.uk FREE trial</a><img src="http://www.ftjcfx.com/image-3317594-10400327" width="1" height="1" border="0"/>');
	}
	else
	{
		document.write('<a href="http://www.dpbolvw.net/click-3317594-10467614" target="_blank">Ancestry.com FREE trial</a><img src="http://www.tqlkg.com/image-3317594-10467614" width="1" height="1" border="0"/>');
	}
}

function origins(surname)
{
	if (lang() == 'en-gb')
	{
		document.write('<p>View <a href="http://www.dpbolvw.net/click-3317594-10470501?url=http%3A%2F%2Fwww.ancestry.co.uk/facts/' + surname + '-places-origin.ashx" target="_blank">countries of origin</a> for people with the ' + surname + ' surname.</p>');
	}
	else
	{
		document.write('<p>View <a href="http://www.anrdoezrs.net/click-3317594-10470501?sid=originscolumn&url=http%3A%2F%2Flanding.ancestry.com/learn/clues/fact.aspx?html=freetrial&fid=5&ln=' + surname + '&submit=go" target="_blank">countries of origin</a> for people with the ' + surname + ' surname.</p>');
	}
}

function smallbutton()
{
	if (lang() == 'en-gb')
	{
		document.write('<a href="http://www.dpbolvw.net/click-3317594-10391801" target="_top"><img src="http://www.ftjcfx.com/image-3317594-10391801" width="120" height="60" alt="The World Number 1 Genealogy Site" border="0" class="floatLeft"/></a>');
	}
	else
	{
		document.write('<a href="http://www.jdoqocy.com/click-3317594-10466508" target="_top"><img src="http://www.tqlkg.com/image-3317594-10466508" width="120" height="60" alt="The World Number 1 Genealogy Site" border="0" class="floatLeft"/></a>');
	}
}

function store()
{
	if (lang() == 'en-gb')
	{
		document.write('<iframe src="http://astore.amazon.co.uk/famitreeassi-21" width="100%" height="4000" frameborder="0" scrolling="no"></iframe>');
	}
	else
	{
		document.write('<iframe src="http://astore.amazon.com/famitreeassi-20" width="100%" height="4000" frameborder="0" scrolling="no"></iframe>');
	}
}


function ftm()
{
	if (lang() == 'en-gb')
	{
		document.write('<a href="http://www.amazon.co.uk/gp/product/B002MCYVMW?ie=UTF8&tag=famitreeassi-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=B002MCYVMW" target="_blank">Family Tree Maker 2010 Platinum Edition</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=famitreeassi-21&l=as2&o=2&a=B002MCYVMW" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> contains all you need to get started including 6 months membership of Ancestry (essentials package).  ');
		document.write('<a href="http://www.amazon.co.uk/gp/product/B002TKLK9O?ie=UTF8&tag=famitreeassi-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=B002TKLK9O" target="_blank">Family Tree Maker 2010 World Edition</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=famitreeassi-21&l=as2&o=2&a=B002TKLK9O" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> is the cheapest way to get access to Ancestry\'s worldwide membership - giving you 6 months membership for a fraction of the normal cost.');
	}
	else
	{
		document.write('<a href="http://www.amazon.com/gp/product/B002ASAEH4?ie=UTF8&tag=famitreeassi-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=B002ASAEH4" target="_blank">Family Tree Maker 2010 Essentials</a><img src="http://www.assoc-amazon.com/e/ir?t=famitreeassi-20&l=as2&o=1&a=B002ASAEH4" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> contains all you need to get you up and running - particularly useful when combined with an ');
		document.write('<a href="http://www.anrdoezrs.net/click-3317594-10467614" target="_blank">Ancestry.com Free Trial</a><img src="http://www.ftjcfx.com/image-3317594-10467614" width="1" height="1" border="0"/>.');
	}
}

function wdytya_book()
{
	if (lang() == 'en-gb')
	{
		document.write('<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&bc1=FFFFFF&IS2=1&nou=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=famitreeassi-21&o=2&p=8&l=as1&m=amazon&f=ifr&md=0M5A6TN3AXP2JHJBWT02&asins=0007261993" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
	}
	else
	{
		document.write('<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=FFFFFF&IS2=1&nou=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=famitreeassi-20&o=1&p=8&l=as1&m=amazon&f=ifr&md=10FE9736YVPPT7A0FBG2&asins=0670021636" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
	}
}

function book_text()
{
	if (lang() == 'en-gb')
	{
		document.write('A good general book to start with is the <a href="http://www.amazon.co.uk/gp/product/0007261993?ie=UTF8&tag=famitreeassi-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=0007261993">Who do you think you are? Encyclopedia of Genealogy</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=famitreeassi-21&l=as2&o=2&a=0007261993" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  ');
		document.write('For a book dedicated to researching your tree online try <a href="http://www.amazon.co.uk/gp/product/1905615396?ie=UTF8&tag=famitreeassi-21&linkCode=as2&camp=1634&creative=19450&creativeASIN=1905615396">The Genealogist\'s Internet</a><img src="http://www.assoc-amazon.co.uk/e/ir?t=famitreeassi-21&l=as2&o=2&a=1905615396" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  ');
	}
	else
	{
		document.write('A good general book to start with is the <a href="http://www.amazon.com/gp/product/0670021636?ie=UTF8&tag=famitreeassi-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=0670021636">Who Do You Think You Are?: The Essential Guide to Tracing Your Family History</a><img src="http://www.assoc-amazon.com/e/ir?t=famitreeassi-20&l=as2&o=1&a=0670021636" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  ');
		document.write('For a book dedicated to researching your tree online try <a href="http://www.amazon.com/gp/product/1598694979?ie=UTF8&tag=famitreeassi-20&linkCode=as2&camp=1789&creative=390957&creativeASIN=1598694979">The Everything Guide to Online Genealogy: A complete resource to using the Web to trace your family history</a><img src="http://www.assoc-amazon.com/e/ir?t=famitreeassi-20&l=as2&o=1&a=1598694979" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />.  ');
	}
}

function internet_book()
{
	if (lang() == 'en-gb')
	{
		document.write('<iframe src="http://rcm-uk.amazon.co.uk/e/cm?lt1=_blank&bc1=FFFFFF&IS2=1&nou=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=famitreeassi-21&o=2&p=8&l=as1&m=amazon&f=ifr&md=0M5A6TN3AXP2JHJBWT02&asins=1905615396" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
	}
	else
	{
		document.write('<iframe src="http://rcm.amazon.com/e/cm?lt1=_blank&bc1=FFFFFF&IS2=1&nou=1&bg1=FFFFFF&fc1=000000&lc1=0000FF&t=famitreeassi-20&o=1&p=8&l=as1&m=amazon&f=ifr&md=10FE9736YVPPT7A0FBG2&asins=1598694979" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
	}
}

function skyscrapers()
{
	if (lang() == 'en-gb')
	{
       	 	if (Math.floor(Math.random()*3) == 0)
                	document.write('<a href="http://www.jdoqocy.com/click-3317594-10493534" target="_blank"><img src="http://www.tqlkg.com/image-3317594-10493534" width="160" height="600" alt="Discover your ancestors at Genes Reunited.co.uk" border="0"/></a>');
        	else
                	document.write('<a href="http://www.anrdoezrs.net/click-3317594-10666480" target="_blank"><img src="http://www.awltovhc.com/image-3317594-10666480" width="160" height="600" alt="London Metropolitan Archives" border="0"/></a>');
	}
	else
	{
        	if (Math.floor(Math.random()*2) == 0)
                	document.write('<a href="http://www.dpbolvw.net/click-3317594-10471823" target="_blank"><img src="http://www.tqlkg.com/image-3317594-10471823" width="160" height="600" alt="Leaf" border="0"/></a>');
        	else
                	document.write('<a href="http://www.jdoqocy.com/click-3317594-10688298" target="_blank"><img src="http://www.ftjcfx.com/image-3317594-10688298" width="160" height="600" alt="My Story" border="0"/></a>');
	}

	document.write('<br /><br />');
}

function skyscraper_novice(firstname,surname)
{
	firstname = firstname || "First name";
	surname = surname || "Last name";

	document.write('<div style="background-image:url(http://c.mfcreative.com/affiliate/widgets/0909/160_600_tree1.jpg);height:600px;position:relative;width:160px;overflow:hidden;">' +
'<form style="height:600px;margin:0;padding:0;width:160px;" target="_blank" action="http://www.dpbolvw.net/interactive" method="get">' +
'<div style="padding:207px 13px;text-align:center;">' +
'<input type="text" id="ancestryFN" name="fn" value="' + firstname + '" style="border-width:1px;border-style:solid;border-color:#aaadb2 #dcdfe6 #e2e9ef #e2e2ec;color:#695e49;font:11px/13px Tahoma, Arial, Helvetica, sans-serif;height:16px;margin:0 0 14px;padding:1px 5px;width:120px;" onfocus="javascript:if(this.value==\'First name\'){this.value=\'\'}" onblur="javascript:if(this.value==\'\'){this.value=\'First name\';}" />' +
'<input type="text" id="ancestryLN" name="ln" value="' + surname + '" style="border-width:1px;border-style:solid;border-color:#aaadb2 #dcdfe6 #e2e9ef #e2e2ec;color:#695e49;font:11px/13px Tahoma, Arial, Helvetica, sans-serif;height:16px;margin:0 0 20px;padding:1px 5px;width:120px;" onfocus="javascript:if(this.value==\'Last name\'){this.value=\'\'}" onblur="javascript:if(this.value==\'\'){this.value=\'Last name\';}" />' +
'<span style="color:#566c11;font:700 11px/12px Tahoma, Arial, Helvetica, sans-serif;vertical-align:middle;">Gender</span>' +
'<select id="gen" name="gen" style="border-width:1px;border-style:solid;border-color:#aaadb2 #dcdfe6 #e2e9ef #e2e2ec;color:#695e49;font:12px/16px Tahoma, Arial, Helvetica, sans-serif;margin:0 0 0 3px;padding:0;width:70px;vertical-align:middle;" >' +
'<option value="M">M</option>' +
'<option value="F">F</option>' +
'</select>' +
'<input name="startTree" type="image" src="http://c.mfcreative.com/affiliate/widgets/0909/lg_tree.gif" style="border:none;cursor:pointer;height:27px;margin:31px 0 0;padding:0;width:116px;" onclick="if( document.getElementById(\'ancestryFN\').value==\'First name\')document.getElementById(\'ancestryFN\').value=\'\'; if( document.getElementById(\'ancestryLN\').value==\'Last name\')document.getElementById(\'ancestryLN\').value=\'\';" />' +
'</div>    ' +
'<input type="hidden" name="aid" value="10533472"/>' +
'<input type="hidden" name="pid" value="3317594"/>' +
'<input type="hidden" name="url" value="http://trees.ancestry.com/pt/StartPed.aspx"/>' +
'</form>' +
'</div>');

}

function skyscraper_books()
{
	if (lang() == 'en-gb')
	{
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_9036a5ab-111e-4423-9b08-1fbd580d9c1c"  WIDTH="160px" HEIGHT="600px"> <PARAM NAME="movie" VALUE="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Ffamitreeassi-21%2F8010%2F9036a5ab-111e-4423-9b08-1fbd580d9c1c&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Ffamitreeassi-21%2F8010%2F9036a5ab-111e-4423-9b08-1fbd580d9c1c&Operation=GetDisplayTemplate" id="Player_9036a5ab-111e-4423-9b08-1fbd580d9c1c" quality="high" bgcolor="#ffffff" name="Player_9036a5ab-111e-4423-9b08-1fbd580d9c1c" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="600px" width="160px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Ffamitreeassi-21%2F8010%2F9036a5ab-111e-4423-9b08-1fbd580d9c1c&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT>');
	}
	else
	{
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_07db7244-b85e-4628-9a0b-2d7125a979da"  WIDTH="160px" HEIGHT="600px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ffamitreeassi-20%2F8010%2F07db7244-b85e-4628-9a0b-2d7125a979da&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ffamitreeassi-20%2F8010%2F07db7244-b85e-4628-9a0b-2d7125a979da&Operation=GetDisplayTemplate" id="Player_07db7244-b85e-4628-9a0b-2d7125a979da" quality="high" bgcolor="#ffffff" name="Player_07db7244-b85e-4628-9a0b-2d7125a979da" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="600px" width="160px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ffamitreeassi-20%2F8010%2F07db7244-b85e-4628-9a0b-2d7125a979da&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT>');
	}
}

function skyscraper_software()
{
	document.write('<a href="http://www.dpbolvw.net/click-3317594-10535545" target="_blank"><img src="http://www.lduhtrp.net/image-3317594-10535545" width="160" height="600" alt="Protection" border="0"/></a>');
}

function small()
{
	if (lang() == 'en-gb')
	{
		document.write('<div align=center><a href="http://www.kqzyfj.com/click-3317594-10390705" target="_blank"><img src="http://www.lduhtrp.net/image-3317594-10390705" width="120" height="60" alt="Rising Gas & Electricity prices!" border="0"/></a></div>');
	}
	else
	{
		document.write('<div align=center><a href="http://clickserve.cc-dt.com/link/tplclick?lid=41000000023980662&pubid=21000000000257276" target="_blank"><img src="http://clickserve.cc-dt.com/link/tplimage?lid=41000000023980662&pubid=21000000000257276" border=0 alt="Magellan&#39;s"></a></div>');
	}
}

function banner_familytreesoftware()
{
	if (lang() == 'en-gb')
	{
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_6aec9bdb-45a9-455a-9d67-c007902b52e9"  WIDTH="600px" HEIGHT="200px"> <PARAM NAME="movie" VALUE="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Ffamitreeassi-21%2F8010%2F6aec9bdb-45a9-455a-9d67-c007902b52e9&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Ffamitreeassi-21%2F8010%2F6aec9bdb-45a9-455a-9d67-c007902b52e9&Operation=GetDisplayTemplate" id="Player_6aec9bdb-45a9-455a-9d67-c007902b52e9" quality="high" bgcolor="#ffffff" name="Player_6aec9bdb-45a9-455a-9d67-c007902b52e9" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="200px" width="600px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.co.uk/widgets/q?ServiceVersion=20070822&MarketPlace=GB&ID=V20070822%2FGB%2Ffamitreeassi-21%2F8010%2F6aec9bdb-45a9-455a-9d67-c007902b52e9&Operation=NoScript">Amazon.co.uk Widgets</A></NOSCRIPT>');
	}
	else
	{
		document.write('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" id="Player_626c67f4-f215-46cd-b027-47a6e68ff990"  WIDTH="600px" HEIGHT="200px"> <PARAM NAME="movie" VALUE="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ffamitreeassi-20%2F8010%2F626c67f4-f215-46cd-b027-47a6e68ff990&Operation=GetDisplayTemplate"><PARAM NAME="quality" VALUE="high"><PARAM NAME="bgcolor" VALUE="#FFFFFF"><PARAM NAME="allowscriptaccess" VALUE="always"><embed src="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ffamitreeassi-20%2F8010%2F626c67f4-f215-46cd-b027-47a6e68ff990&Operation=GetDisplayTemplate" id="Player_626c67f4-f215-46cd-b027-47a6e68ff990" quality="high" bgcolor="#ffffff" name="Player_626c67f4-f215-46cd-b027-47a6e68ff990" allowscriptaccess="always"  type="application/x-shockwave-flash" align="middle" height="200px" width="600px"></embed></OBJECT> <NOSCRIPT><A HREF="http://ws.amazon.com/widgets/q?ServiceVersion=20070822&MarketPlace=US&ID=V20070822%2FUS%2Ffamitreeassi-20%2F8010%2F626c67f4-f215-46cd-b027-47a6e68ff990&Operation=NoScript">Amazon.com Widgets</A></NOSCRIPT>');
	}
}
