function getURL(uri) {
// Current Page Reference
// copyright Stephen Chapman, 1st Jan 2005
//
//Methods: uri.page and uri.path
// var uri = new Object();    -- Creates the object
// getURL(uri);               -- Assignes values to the object methods
// the value of uri.page = "mypagename"
// Returns current Page Name, ie; if your page name is "index.php" the the page name is returned without the extension "index"
uri.dir = location.href.substring(0, location.href.lastIndexOf('\/'));
uri.dom = uri.dir; if (uri.dom.substr(0,7) == 'http:\/\/') uri.dom = uri.dom.substr(7);
uri.path = ''; var pos = uri.dom.indexOf('\/'); if (pos > -1) {uri.path = uri.dom.substr(pos+1); uri.dom = uri.dom.substr(0,pos);}
uri.page = location.href.substring(uri.dir.length+1, location.href.length+1);
pos = uri.page.indexOf('?');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
pos = uri.page.indexOf('#');if (pos > -1) {uri.page = uri.page.substring(0, pos);}
uri.ext = ''; pos = uri.page.indexOf('.');if (pos > -1) {uri.ext =uri.page.substring(pos+1); uri.page = uri.page.substr(0,pos);}
uri.file = uri.page;
if (uri.ext != '') uri.file += '.' + uri.ext;
if (uri.file == '') uri.page = 'index';
uri.args = location.search.substr(1).split("?");
return uri;
}


function writeFooter() {
// Write the page footer 
    var d = new Date();
    cDates = ""
    var EndDate = d.getFullYear();
    if (EndDate > 2009) {
        cDates = "2009-" + EndDate
    } else {
        cDates = EndDate
    }
    //document.write("<div class='footerTagLine'>")
    document.write("<a href='Disclaimer.php'>Disclaimer</a>&nbsp;&nbsp;&nbsp;|")
    document.write("&nbsp;&nbsp;&nbsp;<a href='Policies.php'>Policies</a>")
    document.write("<br />&copy Copyright " + cDates)
    document.write(" * Certified Garage Door, Inc. * All Rights Reserved <br> Design & SEO By: <a style='color:white;' href='http://www.techoptionsflorida.com' target='_blank'>Tech Options</a> ")
    //document.write("</div>")
    document.write("<br>")
}


function writeLargeNavButtons() {
// Write the large page link buttons. Filter by page name.
	var uri = new Object();
	getURL(uri);
	document.write('<center>');
	document.write('<div style="width:360px; text-align:center;">');
	document.write('<div class="plainLinks" style="text-align:center; font-size:8pt;">');
	document.write('<table border="0" cellpadding="0" cellspacing="0" style="text-align:center;"><tr>');
	
	// Home
	if((uri.page != "index") && (uri.page != "Garage-Door-Repair-Service-Tampa")) {
		document.write('<td style="width:67px;"><a href="/Garage-Door-Repair-Service-Tampa.php"><img alt="Certified Garage Door Tampa" title="Certified Garage Door Tampa" src="images/button_Certified-Garage-Door-Home.png" /></a><br />Home</td>');
	};

	// Garage Doors
	if(uri.page != "Garage-Doors") {
		document.write('<td style="width:67px;"><a href="/Garage-Doors.php"><img alt="Garage Door Repair Service Sales Installation" title="Garage Door Repair Service Sales Installation" src="images/button_Garage-Doors.png" /></a><br />Doors</td>');
	};
	
	// Garage Door Openers
	if(uri.page != "Garage-Door-Openers") {
		document.write('<td style="width:67px;"><a href="/Garage-Door-Openers.php"><img alt="Garage Door Opener Repair Service Sales Installation" title="Garage Door Opener Repair Service Sales Installation" src="images/button_Garage-Door-Opener.png" /></a><br />Openers</td>');
	};
	
	// Service and Repair
	if(uri.page != "Garage-Door-Opener-Service-Repair") {
		document.write('<td style="width:67px;"><a href="/Garage-Door-Opener-Service-Repair.php"><img alt="Garage Door Repair & Garage Door Opener Repair - Service Sales Installation" title="Garage Door Repair & Garage Door Opener Repair - Service Sales Installation" src="images/button_Life-Saver.png" /></a><br />Service</td>');
	};
		
	// Contacts
	if(uri.page != "Certified-Garage-Door-Opener-Contacts") {
		document.write('<td style="width:67px"><a href="/Certified-Garage-Door-Opener-Contacts.php"><img alt="Contact Information" title="Contact Information" src="images/button_EmailContactUs.png" /></a><br />Contacts</td>');
	};
	
	// Library
	document.write('<td style="width:67px"><a href="/Garage-Door-Opener-Spring-Blog"><img alt="Browse Our Library of FAQ, Saftey and DIY Tips & Articles" title="Browse Our Library of FAQ, Saftey and DIY Tips & Articles" src="images/button_Articles.png" /></a><br />FAQ/Tips</td>');

	// End Buttons
	document.write('</tr>');
	
	
	if (uri.page != "Garage-Door-Repair-Service-Tampa" && uri.page != "index") {
		// Badges
		document.write('<tr style="height:25px;"><td style="text-align:center; font-size:12pt; font-weight:bold;" colspan="6">');
		document.write('<br /><br /><hr />');
		document.write('READ OUR REVIEWS!');
		document.write('<br /></td></tr>')
		
		document.write('<tr><td colspan="6"><center>');
	
		// SuperPages & Angies List
		document.write('<table cellpadding="0" cellspacing="0">');
		document.write('<tr>');
		document.write('<td style="width:100px;"><a href="http://www.superpages.com/bp/Lutz-FL/Certified-Garage-Door-L2124680174.htm" target="_blank"><img alt="" src="images/Superguarantee.png" style="height:100px; width:100px;"><br /><b>super</b>guarantee</td></a>');
		document.write('<td style="width:20px;">&nbsp;</td>');
		document.write('<td style="width:133px;">');
		document.write('<table style="width: 133px; background-color: white; color: black;" cellpadding="0" cellspacing="0"><tr><td><a href="http://www.angieslist.com/companylist/?cid=badge" target="_blank"><img src="http://reviews.angieslist.com/webbadges/sp/wb_small_orange_cap.aspx" alt="Read Unbiased Consumer Reviews Online at AngiesList.com" style="width:133px; height:33px;" border="0" /></a></td></tr><tr><td align="center" style="color: black; font-family: arial, sans-serif; font-size: 12px; border: 1px solid #fdb913; padding: 7px;"><a href="http://www.angieslist.com/?cid=badge" target="_blank"><img src="http://reviews.angieslist.com/webbadges/sp/wb_small_orange_logo.aspx" alt="Angies List" style="border:none; width:90px;" /></a><br/><a href="http://www.angieslist.com/companylist/tampa-bay/garage-doors.htm?cid=badge" target="_blank" style="color:blue;">Garage Doors</a> in <a href="http://www.angieslist.com/companylist/tampa-bay/?cid=badge" target="_blank" style="color:blue;">Tampa Bay</a></td></tr></table>');
		// CGD Comments
		document.write('</center></td></tr><tr><td colspan="3">');
		document.write('<table><tr rowspan="2"><td>');
		document.write('<br /><a href="http://garage-door-repair-service-tampa.com/Garage-Door-Opener-Spring-Blog/category/customer-comments/"><img src="images/QualityCheck.png" style="height:95px; width:100px;" alt="Check out our unbiased customer comments." title="Check out our unbiased customer comments." /></a>');
		document.write('</td><td>');
		document.write('<a href="http://garage-door-repair-service-tampa.com/Garage-Door-Opener-Spring-Blog/category/customer-comments/">Read Our Cusmtomer Comments</a>');
		document.write('<br /><br /><a href="http://garage-door-repair-service-tampa.com/Garage-Door-Opener-Spring-Blog/comments/">Add A Comment</a>');
		document.write('</td></tr></table>');
		document.write('</td></tr></table>');
		
		// BBB
		document.write('<tr><td colspan="6">')
		document.write("<a href='http://www.bbb.org/west-florida/business-reviews/garage-door-repairers/certified-garage-door-in-wesley-chapel-fl-90075744' target='_blank'><img src='images/bbbsealh1US.gif' style='width:135px;height:51px;' alt='We are a BBB Accredited Business.' title='We are a BBB Accredited Business.' /></a>");
		document.write('</td></tr>')
	}
	
	// Finish, Clean Up
	document.write('</td></tr></table></div></div></center>');
	
	// YellowPage.com Video
	if (uri.page == "Garage-Door-Repair-Service-Tampa" || uri.page == "index") {
		document.write('<div style="height:25px;"></div>');
		document.write('<center><span style="font-variant:small-caps;">Watch Our Yellowbook.com Video!</span><br />');
		document.write('<div style="background-image:url(images/YellowPages/ypAd_BackGround.png); background-repeat:no-repeat; width:430px; height:240px; padding-top:0px; margin-top:0px;">');
		document.write('<object id="VideoPlayer" width="430" height="240" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" type="application/x-shockwave-flash" data="http://www.yellowbook.com/flash/yb_player2.swf"><param name="movie" value="http://www.yellowbook.com/flash/yb_player2.swf" /><param name="base" value="." /><param name="quality" value="high" /><param name="play" value="true" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="allowScriptAccess" value="samedomain" /><param name="scale" value="noscale" /><param name="bgcolor" value="#000000" /><param name="wmode" value="transparent" /><param name="flashvars" value="ybVideo=http%3a%2f%2fwww.yellowbook.com%2fvideo%2fcertified-garage-door-inc_1845780981.flv&amp;autoStart=false" /><embed name="VideoPlayer" width="430" height="240" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" src="http://www.yellowbook.com/flash/yb_player2.swf" base="." quality="high" play="true" loop="true" menu="false" allowscriptaccess="samedomain" scale="noscale" salign="tl" wmode="transparent" bgcolor="#000000" flashvars="ybVideo=http%3a%2f%2fwww.yellowbook.com%2fvideo%2fcertified-garage-door-inc_1845780981.flv&amp;autoStart=false"></embed></object>');
		document.write('</div></center>');
	}
}


function writePartnerLogos() {
 	document.write('<center>');
    document.write('<a href="http://www.amarr.com/" target="_blank"><img alt="Amarr Garage Doors" title="Click to Visit Amarr Garage Doors" src="images/CorporateLogos/Amarr-Garage-Doors-Logo.png" /></a>');
	document.write('<a href="http://www.clopay.com" target="_blank"><img alt="Clopay Garage Doors" title="Click to Visit Clopay Garage Doors" src="images/CorporateLogos/Clopay-Garage-Doors-Logo.png" /></a>');
    document.write('<a href="http://www.linearcorp.com/garage_door_operator.php" target="_blank"><img alt="Linearcorp garage Door Openers, Entry Solutions, Security Solutions, Entry Gates and Entry Gate Openers" title="Click to Visit Linearcorp Garage Door Openers" src="images/CorporateLogos/Linearcorp-Garage-Door-Opener-Logo.png" /></a>');
    document.write('<a href="http://www.raynor.com/homeowners/catalog.cfm" target="_blank"><img alt="Raynor Garage Doors" title="Click to Visit Raynor Garage Doors" src="images/CorporateLogos/Raynor-Garage-Doors-Logo.png" /></a>');
    document.write('<a href="http://www.liftmaster.com/consumerweb/products/ptlGDO.htm" target="_blank"><img alt="LiftMaster Garage Door Openers" title="Click to Visit LiftMaster Garage Door Openers" src="images/CorporateLogos/LiftMaster-Garage-Door-Opener-Logo.png" /></a>');
	document.write('<a href="http://www.geniecompany.com/DIProduct.aspx" target="_blank"><img alt="Genie Garage Door Openers" title="Click to Visit Geneie Garage Door Openers" src="images/CorporateLogos/Genie-Garage-Door-Opener-Logo.png" /></a>');
	document.write('<a href="http://www.searsgaragedoors.com/" target="_blank"><img alt="Craftsman Garage Doors and  Openers" title="Click to Visit Craftsman Garage Doors and Openers" src="images/CorporateLogos/Craftsman-Garage-Door-Opener-Logo.png" /></a>');
    document.write('<a href="http://www.stanleyworks.com/stanleycorporate_faq_garagedoors.asp" target="_blank"><img alt="Stanley No Longer Makes Garage Door & Opener Products." title="Click to Visit Stanley Garage Door and Openers." src="images/CorporateLogos/Stanley-Garage-Door-Opener-Logo.png" /></a>');
    document.write('<a href="http://www.chamberlain-diy.com/DoItYourself" target="_blank"><img alt="Chamberlain Garage Door Openers" title="Click to Visit Chamberlain Garage Door Openers" src="images/CorporateLogos/Chamberlain-Garage-Door-Opener-Logo.png" /></a>');
	document.write('</center>');
}


function writePromos() {
	var uri = new Object();
	getURL(uri);
	document.write("<div style='width:195px;'>");
	// Service Call 
	document.write("<div class='leftColumnImages' style='padding-top:25px;'><b><span style='color:white; font-weight:bold;'>Call Today For A FREE Quote!</span></b><img src='images/ServiceCall.gif' alt='Call Today For A FREE Gargae Door or Garage Door Opener Repair / Installation Quote!' title='FREE Service Call. Additional charges may apply. Contact us for details.' /><br /><div style='width:180px; color:green;font-weight:bold;padding-left:5px;float:left;'>*With any repair or installation.</div></div>");
	// Be Hurricane Prepared
	document.write("<div class='leftColumnImages'><br /><br /><br /><a href='/Garage-Door-Opener-Spring-Blog/?p=1'><img src='images/HurricanePrepared.gif' alt='Be Hurricane Prepared' title='Is your garage door ready for the next hurricane?' /></a></div>");
	// Tax Credit 2009
	var d = new Date();
    cDates = "";
    var EndDate = d.getFullYear();
    if (EndDate <= 2010) {
		document.write("<div class='leftColumnImages'><a href='/Garage-Door-Opener-Spring-Blog/?p=20'><img src='images/1500dollarTaxCredit.gif' alt='Garage Door Tax Credit 2009 and 2010' title='Earn a $1500 Garage Door Tax Credit in 2009 &amp; 2010!' /></a></div>");
	};
	
	// Left Column Reviews
	if ((uri.page == "Garage-Door-Repair-Service-Tampa") || (uri.page == "index") ) {
		document.write('<div class="leftColumnImages">');
		document.write('<br /><br />');
		document.write('<span style="color:navy;font-weight:bold;">READ OUR REVIEWS!</span><br>');
		// SuperPages
		document.write('<a href="http://www.superpages.com/bp/Lutz-FL/Certified-Garage-Door-L2124680174.htm" target="_blank"><img alt="" src="images/Superguarantee.gif" style="height:100px; width:100px;"><br /><b>super</b>guarantee</a>');
		document.write('<div style="height:25px;"></div>');
		// Angies List
		document.write('<center><table style="width: 133px; background-color: white; color: black;" cellpadding="0" cellspacing="0"><tr><td><a href="http://www.angieslist.com/companylist/?cid=badge" target="_blank"><img src="http://reviews.angieslist.com/webbadges/sp/wb_small_orange_cap.aspx" alt="Read Unbiased Consumer Reviews Online at AngiesList.com" style="width:133px; height:33px;" border="0" /></a></td></tr><tr><td align="center" style="color: black; font-family: arial, sans-serif; font-size: 12px; border: 1px solid #fdb913; padding: 7px;"><a href="http://www.angieslist.com/?cid=badge" target="_blank"><img src="http://reviews.angieslist.com/webbadges/sp/wb_small_orange_logo.aspx" alt="Angies List" style="border:none; width:90px;" /></a><br/><a href="http://www.angieslist.com/companylist/tampa-bay/garage-doors.htm?cid=badge" target="_blank" style="color:blue;">Garage Doors</a> in <a href="http://www.angieslist.com/companylist/tampa-bay/?cid=badge" target="_blank" style="color:blue;">Tampa Bay</a></td></tr></table></center>');
		// CGD
		document.write('<br /><br /><a href="http://garage-door-repair-service-tampa.com/Garage-Door-Opener-Spring-Blog/category/customer-comments/"><img src="images/QualityCheck.gif" style="height:95px; width:100px;" alt="Check out our unbiased customer comments." title="Check out our unbiased customer comments." /></a>');
		document.write('<br /><a href="http://garage-door-repair-service-tampa.com/Garage-Door-Opener-Spring-Blog/category/customer-comments/">Read Our Cusmtomer Comments</a>');
		document.write('<br /><a href="http://garage-door-repair-service-tampa.com/Garage-Door-Opener-Spring-Blog/comments/">Add A Comment</a>');
		// BBB
		document.write("<br /><br /><br /><a href='http://www.bbb.org/west-florida/business-reviews/garage-door-repairers/certified-garage-door-in-wesley-chapel-fl-90075744' target='_blank'><img src='images/bbbsealh1US.gif' style='width:135px;height:51px;' alt='We are a BBB Accredited Business.' title='We are a BBB Accredited Business.' /></a>");
		document.write("</div>")
	}
	
	
	// Close left Column Promos
	document.write('</div>');
	
}

