function write_top(pagename,dir){
var pagename = pagename || 'home';
var dir = dir || '';
document.write('<table width="780" border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom" background="'+ dir +'images/bluebar_stretch.gif"><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><img src="'+ dir +'images/top_01.jpg" width="271" height="26" /></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/index.cfm?fuse=html&amp;pg=1205"><img src="'+ dir +'images/city.gif" name="city" width="54" height="26" border="0" id="city" onmouseover="MM_swapImage(\'city\',\'\',\''+ dir +'images/city_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/index.cfm?fuse=html&amp;pg=151"><img src="'+ dir +'images/business.gif" name="business" width="78" height="26" border="0" id="business" onmouseover="MM_swapImage(\'business\',\'\',\''+ dir +'images/business_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/sportscentral"><img src="'+ dir +'images/sports.gif" name="sports" width="109" height="26" border="0" id="sports" onmouseover="MM_swapImage(\'sports\',\'\',\''+ dir +'images/sports_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="index.asp?page=home"><img src="'+ dir +'images/home.gif" name="home" width="65" height="26" border="0" id="home" onmouseover="MM_swapImage(\'home\',\'\',\''+ dir +'images/home_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><table border="0" cellspacing="0" cellpadding="0"><form action="'+ dir +'search.asp" method="post" name="search_form" id="search_form"><tr><td width="135" align="right"><input name="q" type="text" class="searchbox" id="q" style="width: 119px;" /></td>');
document.write('<td valign="bottom"><input type="image" src="'+ dir +'images/search.gif" width="68" height="26" border="0" /></td></tr></form></table></td></tr></table></td></tr><tr>');
document.write('<td background="'+ dir +'images/greybar_stretch.gif"><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+ dir +'images/top_02.jpg" width="271" height="15" /></td>');
document.write('<td><a href="index.asp?page=about"><img src="'+ dir +'images/about.gif" name="about" width="165" height="15" border="0" id="about" onmouseover="MM_swapImage(\'about\',\'\',\''+ dir +'images/about_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=industry"><img src="'+ dir +'images/industry.gif" name="industry" width="113" height="15" border="0" id="industry" onmouseover="MM_swapImage(\'industry\',\'\',\''+ dir +'images/industry_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=media"><img src="'+ dir +'images/media.gif" name="media" width="90" height="15" border="0" id="media" onmouseover="MM_swapImage(\'media\',\'\',\''+ dir +'images/media_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=advertise"><img src="'+ dir +'images/advertise.gif" name="advertise" width="74" height="15" border="0" id="advertise" onmouseover="MM_swapImage(\'advertise\',\'\',\''+ dir +'images/advertise_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=contact"><img src="'+ dir +'images/contact.gif" name="contact" width="67" height="15" border="0" id="contact" onmouseover="MM_swapImage(\'contact\',\'\',\''+ dir +'images/contact_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('</tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="0"><tr>');
document.write('<td><img src="'+ dir +'images/top_03.jpg" width="34" height="159" /></td>');
document.write('<td><img src="'+ dir +'images/'+ pagename +'_01.jpg" width="220" height="159" border="0" usemap="#discover" /></td>');
document.write('<td><img src="'+ dir +'images/'+ pagename +'_02.jpg" width="526" height="159" /></td>');
document.write('</tr></table></td></tr></table>');
}

function write_giant(dir){
var dir = dir || '';
document.write('<table width="780" border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom" background="'+ dir +'images/bluebar_stretch.gif"><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><img src="'+ dir +'images/top_blank_01.gif" width="271" height="26" /></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/index.cfm?fuse=html&amp;pg=1205"><img src="'+ dir +'images/city.gif" name="city" width="54" height="26" border="0" id="city" onmouseover="MM_swapImage(\'city\',\'\',\''+ dir +'images/city_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/index.cfm?fuse=html&amp;pg=151"><img src="'+ dir +'images/business.gif" name="business" width="78" height="26" border="0" id="business" onmouseover="MM_swapImage(\'business\',\'\',\''+ dir +'images/business_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="index.asp?page=sports"><img src="'+ dir +'images/sports.gif" name="sports" width="109" height="26" border="0" id="sports" onmouseover="MM_swapImage(\'sports\',\'\',\''+ dir +'images/sports_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="index.asp?page=home"><img src="'+ dir +'images/home.gif" name="home" width="65" height="26" border="0" id="home" onmouseover="MM_swapImage(\'home\',\'\',\''+ dir +'images/home_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><table border="0" cellspacing="0" cellpadding="0"><form action="'+ dir +'search.asp" method="post" name="search_form" id="search_form"><tr><td width="135" align="right"><input name="q" type="text" class="searchbox" id="q" style="width: 119px;" /></td>');
document.write('<td valign="bottom"><input type="image" src="'+ dir +'images/search.gif" width="68" height="26" border="0" /></td></tr></form></table></td></tr></table></td></tr><tr>');
document.write('<td background="'+ dir +'images/greybar_stretch.gif"><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+ dir +'images/top_blank_02.gif" width="271" height="15" /></td>');
document.write('<td><a href="index.asp?page=about"><img src="'+ dir +'images/about.gif" name="about" width="165" height="15" border="0" id="about" onmouseover="MM_swapImage(\'about\',\'\',\''+ dir +'images/about_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=industry"><img src="'+ dir +'images/industry.gif" name="industry" width="113" height="15" border="0" id="industry" onmouseover="MM_swapImage(\'industry\',\'\',\''+ dir +'images/industry_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=media"><img src="'+ dir +'images/media.gif" name="media" width="90" height="15" border="0" id="media" onmouseover="MM_swapImage(\'media\',\'\',\''+ dir +'images/media_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=advertise"><img src="'+ dir +'images/advertise.gif" name="advertise" width="74" height="15" border="0" id="advertise" onmouseover="MM_swapImage(\'advertise\',\'\',\''+ dir +'images/advertise_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=contact"><img src="'+ dir +'images/contact.gif" name="contact" width="67" height="15" border="0" id="contact" onmouseover="MM_swapImage(\'contact\',\'\',\''+ dir +'images/contact_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('</tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="0"><tr>');
document.write('<td><img src="'+ dir +'images/giant.jpg" width="780" height="159" /></td>');
document.write('</tr></table></td></tr></table>');
}

function write_outdoor(dir){
var dir = dir || '';
document.write('<table width="780" border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom" background="'+ dir +'images/bluebar_stretch.gif"><table border="0" cellspacing="0" cellpadding="0"><tr><td valign="bottom"><img src="'+ dir +'images/top_blank_01.gif" width="271" height="26" /></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/index.cfm?fuse=html&amp;pg=1205"><img src="'+ dir +'images/city.gif" name="city" width="54" height="26" border="0" id="city" onmouseover="MM_swapImage(\'city\',\'\',\''+ dir +'images/city_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="http://www.thunderbay.ca/index.cfm?fuse=html&amp;pg=151"><img src="'+ dir +'images/business.gif" name="business" width="78" height="26" border="0" id="business" onmouseover="MM_swapImage(\'business\',\'\',\''+ dir +'images/business_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="index.asp?page=sports"><img src="'+ dir +'images/sports.gif" name="sports" width="109" height="26" border="0" id="sports" onmouseover="MM_swapImage(\'sports\',\'\',\''+ dir +'images/sports_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><a href="index.asp?page=home"><img src="'+ dir +'images/home.gif" name="home" width="65" height="26" border="0" id="home" onmouseover="MM_swapImage(\'home\',\'\',\''+ dir +'images/home_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td valign="bottom"><table border="0" cellspacing="0" cellpadding="0"><form action="'+ dir +'search.asp" method="post" name="search_form" id="search_form"><tr><td width="135" align="right"><input name="q" type="text" class="searchbox" id="q" style="width: 119px;" /></td>');
document.write('<td valign="bottom"><input type="image" src="'+ dir +'images/search.gif" width="68" height="26" border="0" /></td></tr></form></table></td></tr></table></td></tr><tr>');
document.write('<td background="'+ dir +'images/greybar_stretch.gif"><table border="0" cellspacing="0" cellpadding="0"><tr><td><img src="'+ dir +'images/top_blank_02.gif" width="271" height="15" /></td>');
document.write('<td><a href="index.asp?page=about"><img src="'+ dir +'images/about.gif" name="about" width="165" height="15" border="0" id="about" onmouseover="MM_swapImage(\'about\',\'\',\''+ dir +'images/about_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=industry"><img src="'+ dir +'images/industry.gif" name="industry" width="113" height="15" border="0" id="industry" onmouseover="MM_swapImage(\'industry\',\'\',\''+ dir +'images/industry_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=media"><img src="'+ dir +'images/media.gif" name="media" width="90" height="15" border="0" id="media" onmouseover="MM_swapImage(\'media\',\'\',\''+ dir +'images/media_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=advertise"><img src="'+ dir +'images/advertise.gif" name="advertise" width="74" height="15" border="0" id="advertise" onmouseover="MM_swapImage(\'advertise\',\'\',\''+ dir +'images/advertise_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('<td><a href="index.asp?page=contact"><img src="'+ dir +'images/contact.gif" name="contact" width="67" height="15" border="0" id="contact" onmouseover="MM_swapImage(\'contact\',\'\',\''+ dir +'images/contact_over.gif\',1)" onmouseout="MM_swapImgRestore()" /></a></td>');
document.write('</tr></table></td></tr><tr><td><table border="0" cellspacing="0" cellpadding="0"><tr>');
document.write('<td><img src="'+ dir +'images/outdoor.jpg" width="780" height="159" name="outdoor" id="outdoor" usemap="#outdoor_map" /></td>');
document.write('</tr></table></td></tr></table>');
}

function write_dock(dir){
var dir = dir || '';
document.write('<img src="'+ dir +'images/dock.gif" name="dock" width="780" height="85" border="0" usemap="#sponsor_map" id="dock" />');
}
