// JavaScript Document

function table_header()
{
	//START FRAMESET
	document.write('<div align="center">');
	document.write('<table border="0" width="800" cellpadding="0" cellspacing="0">');
		
		//class="frame" was bgcolor="#AFE6E9"
 	//TOP ROW	
	document.write('<tr height="34" class="frame">');
		document.write('<td width="34" background="http://madebyluke.com/gamedesign/images/table_top_left.gif"></td>');
		document.write('<td colspan="12" background="http://madebyluke.com/gamedesign/images/table_top_middle.gif" class="frame"></td>');
		document.write('<td width="34" background="http://madebyluke.com/gamedesign/images/table_top_right.gif"></td>');
	document.write('</tr>');
	

	//NAVIGATION
	add_navigation();

	//PAGE ROW START
	document.write('<tr>');

	//PAGE ROW - LEFT COLUMN
	document.write('<td width="34" background="http://madebyluke.com/gamedesign/images/table_middle_left.gif" class="frame"></td>');
	
	//PAGE ROW - MIDDLE COLUMN - PAGE CONTENT
	//table for the page content
	document.write('<td colspan="12" width="732" height="400" valign="top" class="table_content">');
}

function table_footer()
{
	//CLOSE PAGE ROW - MIDDLE COLUMN - PAGE CONTENT
	//closes table for page content
	document.write('</td>');
	
    
   	//PAGE ROW - RIGHT COLUMN
	document.write('<td width="34" background="http://madebyluke.com/gamedesign/images/table_middle_right.gif" class="frame">&nbsp;</td>');
	
	//CLOSE PAGE ROW
	document.write('</tr>');
	
	//BASE ROW
	document.write('<tr>');
	document.write('<td width="34" height="34" background="http://madebyluke.com/gamedesign/images/table_bottom_left.gif" class="frame">&nbsp;</td>');
	document.write('<td height="34" colspan="12" background="http://madebyluke.com/gamedesign/images/table_bottom_middle.gif" class="frame">&nbsp;</td>');
	document.write('<td width="34" height="34" background="http://madebyluke.com/gamedesign/images/table_bottom_right.gif" class="frame">&nbsp;</td>');
	document.write('</tr>');
	
	//CLOSE FRAMESET
	document.write('</table></div>');
	document.write('<p class="disclaimer">all content by Luke Harrsion unless otherwise stated</p>');
}

function add_navigation()
{	
	//start navi row
	document.write('<tr>');
	
	//LEFT COLUMN
	document.write('<td width="34" height="50" valign="top" background="http://madebyluke.com/gamedesign/images/table_navi_middle_left.gif" class="frame">&nbsp;</td>');

	//LOGO
	document.write('<td width="130" height="50" align="center" valign="top" class="table_navi_bg">');
	document.write('<img src="http://madebyluke.com/gamedesign/images/img_logo.gif" width="130" height="40" alt="Logo"/></td>');
	document.write('<td width="137" height="50" valign="top" class="table_navi_bg">&nbsp;</td>');
	  

	//LINKS
	 navi_image_link("btn_about_up.gif","index.html",60,"about",15);
	 navi_image_link("btn_showcase_up.gif","showcase.html",100,"showcase",10);
	 navi_image_link("btn_tutorials_up.gif","tutorials/index.html",90,"tutorials",10);
	 navi_image_link("btn_resources_up.gif","resources.html",100,"resources",10);
	 navi_image_link("btn_contact_up.gif","contact.html",80,"contact",10);
	  
		
	//close the navigation table
	document.write('</td>');
	
	//RIGHT COLUMN
	document.write('<td width="34" height="50" valign="top" background="http://madebyluke.com/gamedesign/images/table_navi_middle_right.gif" class="frame">&nbsp;</td>');
	document.write('</tr>');
}

function navi_image_link(i,url,w,a,spacing)
 {
	 //i = image
	 //w = width
	 //a = alt tag name
	 
	document.write('<td width="' + w + '" valign="top" class="table_navi_bg"><div align="center">');
	document.write('<a href="http://madebyluke.com/gamedesign/' + url + '">');
	document.write('<img src="http://madebyluke.com/gamedesign/images/' + i + '" alt="' + a + '" name="btn_' + a + '" width="' + w + '" height="40" border="0" id="btn_' + a + '"/>');
	document.write('</a></div></td>');

	 if (spacing)
		document.write('<td width="' + spacing + '" height="50" valign="top" class="table_navi_bg">&nbsp;</td>');
 }


function game_table(img_path, title, desc, download_path)
{	

	  
	document.write('<table width="100" height="50" cellpadding="5" cellspacing="0" class="game_table">');

	//IMAGE
	document.write('<tr><td width="50">');
	document.write('<a href="' + download_path + '">');
	document.write('<img src="' + img_path + '" width="50" height="50" class="game_image"/>');
	document.write('<br/><div class="game_download">download</div>');
	document.write('</a></td>');
	
	//TITLE
	document.write('<td valign="top"><span class="heading">');
	document.write(title);
	document.write('</span><br/><br/>');
	
	//DESCRIPTION
	document.write('<span class="game_info">');
	document.write(desc);
	document.write('</span><br/>');
	
	//document.write('<a href="' + download_path + '">Download</a></td>');
	document.write('</tr></table><br/>');
}