// JavaScript Document

//createCopyright function
// desc: forms the latest copyright information
function createCopyright() {
	var d = new Date();

	document.write(" " + d.getFullYear());
}

//showSubMenu function
// desc: shows the sub menus
function showSubMenu(id) {
	
	//hide all submenus
	hideSubMenus();
	
	styleObj=document.getElementById(id).style
	//alert(styleObj.display);
	styleObj.display = '';
	//alert(styleObj.display);
}

//hideSubMenus function
// desc: hides all sub menus
function hideSubMenus() {
	document.getElementById('newFloorsSubButtons').style.display = 'none';
	document.getElementById('existingFloorsSubButtons').style.display = 'none';
}

//buildSubMenus function
// desc: builds the sub menus into the html at runtime
function buildSubMenus() {
	//New Floors Sub Menu
	document.write('<div id="newFloorsSubButtons" style="position:absolute; top:125px; left:147px; display:none;">');
	document.write('<table width="131" height="101" cellpadding="0" cellspacing="0" border="0" background="images/subMenuBackdropNewFloors.png"  style="background-repeat:no-repeat">');
	// Buffer
	document.write('<tr><td width="131" height="1"></td></tr>	');
	// Overview Sub Button
	document.write('<tr><td width="131" height="20"><a href="newFloors.php" class="buttonsNewFloorsOverview" title="Go to New Floors Page"></a></td></tr>');
	// Solid Unfinished
	document.write('<tr><td width="131" height="20"><a href="solidUnfinishedFloors.php" class="buttonsNewFloorsSolidUnfinish" title="Go to Solid Unfinished Floors Page"></a></td></tr>');
	// Solid Prefinished
	document.write('<tr><td width="131" height="20"><a href="solidPrefinishedFloors.php" class="buttonsNewFloorsSolidPrefinish" title="Go to Solid Prefinished Floors Page"></a></td></tr>');
	// Engineered
	document.write('<tr><td width="131" height="20"><a href="engineeredFloors.php" class="buttonsNewFloorsEngineered" title="Go to Engineered Floors Page"></a></td></tr>');
	// Laminate
	document.write('<tr><td width="131" height="20"><a href="laminateFloors.php" class="buttonsNewFloorsLaminate" title="Go to Laminate Floors Page"></a></td></tr>');
	// Custom
	document.write('<tr><td width="131" height="20"><a href="customFloors.php" class="buttonsNewFloorsCustom" title="Go to Custom Floors Page"></a></td></tr>');
	document.write('</table>');
	document.write('</div>');

	//Existing Floors Sub Menu
	document.write('<div id="existingFloorsSubButtons" style="position:absolute; top:166px; left:147px; display:none;">');
	document.write('<table width="131" height="61" cellpadding="0" cellspacing="0" border="0" background="images/subMenuBackdropExistingFloors.png"  style="background-repeat:no-repeat">');
	// Buffer
	document.write('<tr><td width="131" height="1"></td></tr>');
	// Overview Sub Button
	document.write('<tr><td width="131" height="20"><a href="existingFloors.php" class="buttonsExistingFloorsOverview" title="Go to Existing Floors Page"></a></td></tr>');
	// Cleaning Sub Button
	document.write('<tr><td width="131" height="20"><a href="maintenance.php" class="buttonsExistingFloorsCleaning" title="Go to Care & Maintenance Page"></a></td></tr>');
	// Refinishing
	document.write('<tr><td width="131" height="20"><a href="repairs.php" class="buttonsExistingFloorsRefinishing" title="Go to Repairs & Refinishing Page"></a></td></tr>');
	document.write('</table>');
	document.write('</div>');
}
