//	JAVASCRIPTS FOR LUIGI'S PIZZA.
//	Chuck Little
//
//	FUNCTIONS:
//	footerInfo		footerVariables 	pix4Index		goBack		
//					pix4(various sections)
//	Uses a_header.html & a_footer.html to load webpage.	version here and in a_footer.html
//
	myVer="3.21 Apr. 2 2011";
//************************************************************************************
	myHomePath="";
//	myHomePath="/public_html"
	myName="Luigi\'s Pizza Litchfield, MI";
	myMail="none";
	myWeb="A Little Web Page<br>517.542.3213";
//***********************************************************************************
//
function myChoice() {
	 if (myDataPath.search(/pizza/) != -1) {
		pix4pizza(); }	
	else if (myDataPath.search(/sub/) != -1) {
		pix4sub(); }
	else if (myDataPath.search(/salad/) != -1) {
		pix4salad(); }
	else if (myDataPath.search(/nachos/) != -1) {
		pix4sub(); }
	else if (myDataPath.search(/wings/) != -1) {
		pix4wings(); }
	else if (myDataPath.search(/appetizer/) != -1) {
		pix4appetizer(); }
	else if (myDataPath.search(/lunch/) != -1) {
		pix4lunch(); }
	else if (myDataPath.search(/anytimespecials/) != -1) {
		pix4anytime(); }
	else  {pix4Index();}  
}

function footerInfo() {
//	end of mainInfo...start footer...write Office address, file, host &  ver
	document.write("<br></div><div id='footerInfo'>");
	document.write("<a class='footerName'>Luigi's Pizza<br>243 Jonesville St.<br>Litchfield, MI 49252<br>517-542-5111</a>");
	document.write("<br><br><a class='footerName'>File:&nbsp;"+ myFile+"<br>Host:&nbsp;"+myHost+"<br>Ver:&nbsp;"+myVer+"<br></a>");
//	MY WEB STUFF
	document.write("<div id='web'>"+"<img src='"+myHomePath+"/images/alittleweb.jpg\'  class='image3' width='50' height='50' title=\""+myWeb+"\" alt=\""+myWeb+"\">");
	document.write("<a>"+myWeb+"</a></div>");
//	close footerInfo,    centerBar,   bodyId   &   html
	document.write("<br></div></div></body></html>"); 	}
	
function footerVariables() {
	myDataPath=document.location.pathname;
	str=document.location.pathname;
	var i =(str.lastIndexOf("/",1));
//	myDataPath=str.slice(0,i);
	myFile=str.slice(i);
	myHost=document.location.hostname;
 }
//	START of functions to load the 4 pixs at top of a page.
function pix4Index() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/building.jpg width='150' height='130' alt=\"Luigi's building picture\" title=\"Home of Luigi's Pizza, Litchfield, MI\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/pizza.jpg width='150' height=130' alt=\"Pizza picture\" title=\"Luigi's Pizza \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/sub.jpg width='150' height='130' alt=\"Sub picured\" title=\"Luigi's Sub\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/salad.jpg width='150'  height='130' alt=\"Salad picture\" title=\"Luigi's Salad\"/></td></tr></table>");}
//	PIZZA
function pix4pizza() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/plainluigi3.jpg width=150 height=130 alt=\"Luigi3 picture\" title=\"Luigi's picture\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/pizza.jpg width=150 height=130 alt=\"Luigi's Pizza\" title=\"Lugi's Pizza \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/salad.jpg width=150  height=130 alt=\"Salad picture\" title=\"Luigi's Salad\"/>");
	document.write("<td ><img src="+myHomePath+"/images/pizza2.jpg width=150 height=130 alt=\"Pizza picture\" title=\"Luigi's Pizza\"/></td></tr></table>");}
//	SUB
function pix4sub() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/sign.jpg width=150 height=130 alt=\"Luigi's sign\" title=\"Luigi's sign \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/breadsticks.jpg width=150 height=130 alt=\"breadsticks picture\" title=\"Luigi's Breadsticks \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/sub.jpg width=150 height=130 alt=\"Sub picture\" title=\"Luigi's Sub\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/plainluigi2.jpg width=150  height=130 alt=\"Luigi's picture\" title=\"Luigi's picture\"/></td></tr></table>");}
//	SALAD	
function pix4salad() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/building.jpg width=150 height=130 alt=\"Luigi's building picture\" title=\"Home of Luigi's Pizza, Litchfield, MI\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/cheesybread.jpg width=150 height=130 alt=\"Luigi's Cheesy Bread\" title=\"Lugi's Cheesy Bread \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/salad.jpg width=150  height=130 alt=\"Salad picture\" title=\"Luigi's Salad\"/>");
	document.write("<td ><img src="+myHomePath+"/images/luigi.jpg width=150 height=130 alt=\"Luigi picture\" title=\"Luigi's picture\"/></td></tr></table>");}
//	WINGS	
function pix4wings() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/plainluigi3.jpg width=150 height=130 alt=\"plainluigi picture\" title=\"Luigi's picture\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/cheesybread.jpg width=150 height=130 alt=\"Luigi's Cheesy Bread\" title=\"Lugi's Cheesy Bread \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/salad.jpg width=150  height=130 alt=\"Salad picture\" title=\"Luigi's Salad\"/>");
	document.write("<td ><img src="+myHomePath+"/images/pizza2.jpg width=150 height=130 alt=\"Pizza picture\" title=\"Luigi's Pizza\"/></td></tr></table>");}
//	APPETIZER	
function pix4appetizer() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/sign2.jpg width=150 height=130 alt=\"sign2 picture\" title=\"Luigi's Sign\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/calzone.jpg width=150 height=130 alt=\"Calzone picture\" title=\"Luigi's Calzone\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/cheesybread.jpg width=150 height=130 alt=\"Luigi's Cheesy Bread\" title=\"Lugi's Cheesy Bread \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/breadsticks.jpg width=150 height=130 alt=\"breadsticks picture\" title=\"Luigi's Breadsticks \"/></td></tr></table>");}
//	LUNCH	
function pix4lunch() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/cheesybread.jpg width=150 height=130 alt=\"Luigi's Cheesy Bread\" title=\"Lugi's Cheesy Bread \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/sub.jpg width=150 height=130 alt=\"Sub picture\" title=\"Luigi's Sub\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/breadsticks.jpg width=150 height=130 alt=\"breadsticks picture\" title=\"Luigi's Breadsticks \"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/calzone.jpg width=150 height=130 alt=\"Calzone picture\" title=\"Luigi's Calzone\"/></td></tr></table></tr></table>");}
//	ALLDAY	
function pix4anytime() {
	document.write("<table class='pixtable'><tr><td ><img src="+myHomePath+"/images/pizza2.jpg width=150 height=130 alt=\"Pizza picture\" title=\"Luigi's Pizza\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/sub.jpg width=150 height=130 alt=\"Sub picture\" title=\"Luigi's Sub\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/plainluigi3.jpg width=150 height=130 alt=\"plainluigi picture\" title=\"Luigi's picture\"/></td>");
	document.write("<td ><img src="+myHomePath+"/images/calzone.jpg width=150 height=130 alt=\"Calzone picture\" title=\"Luigi's Calzone\"/></td></tr></table>");}

function goBack() {
//	go back one page
	parent.history.go(-1);  }

