// JavaScript Document
function setPage() {
// specify which image to show
		var page = checkpage();
		if (page == "index.html"){document.write('<img src="images/titles/index.jpg" width="794" height="250" alt="IPA Lithographic Printers" border="0" />');}
		else if(page == "embossing.html"){document.write('<img src="images/titles/embossing.jpg" width="794" height="250" alt="IPA Embossing" border="0" />');}
		else if(page == "hotfoil.html"){document.write('<img src="images/titles/hotfoil.jpg" width="794" height="250" alt="IPA Hot Foil" border="0" />');}
		else if(page == "printing.html"){document.write('<img src="images/titles/printing.jpg" width="794" height="250" alt="IPA Printing" border="0" />');}
		else if(page == "diecutting.html"){document.write('<img src="images/titles/diecutting.jpg" width="794" height="250" alt="IPA Die Cutting" border="0" />');}
		else{document.write('<img src="images/titles/index.jpg" width="794" height="250" alt="IPA Lithographic Printers" border="0" />');}
}

function checkpage() {
//Get the current location
var currentlocation = location.href;
//Split this location at "/"
var currentlocationArray = currentlocation.split("/");
//Find the position of the file name in this array and store it
var LengthCL = currentlocationArray.length -1;
//Assign the current file name to the variable currentpage
var currentpage = currentlocationArray[LengthCL];
//Return the currentpage name and send it to the flash document
return currentpage.toString();
}
