var header, description;

function goodsObj(Header, Description){
	this.header = Header;
	this.description = Description;
}
var goodsArray = new Array(new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/red_velvet.gif'/>","Our family perfected red velvet cake recipe with a cream cheese frosting"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/24_carrot.gif'/>","Fresh carrot cake made with walnuts and topped with cream cheese frosting"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/strawberry_shortcake.gif'/>","Moist vanilla cake topped with buttercream frosting made with fresh strawberries"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/apple_pie.gif'/>","Apple cake baked with fresh apple bits and topped with a vanilla cinnamon buttercream"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/limonade.gif'/>","Light lemon cake with lemon-lime frosting"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/mocha_latte.gif'/>","Rich chocolate cake with mocha buttercream topped off with a chocolate covered coffee bean"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/cookies_cream.gif'/>","Moist vanilla cake with an Oreo crumb buttercream and topped off with a mini Oreo cookie"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/pink_lemonade.gif'/>","Light lemon cake topped with a pink grenadine buttercream frosting"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/lemonberry.gif'/>","Light lemon cake topped with fresh blueberry frosting"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/orange_creamsicle.gif'/>","Orange cake made with fresh squeezed orange juice and topped with a vanilla-orange buttercream"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/monkey_love.gif'/>","Fresh banana cake with our peanut butter frosting and topped with peanut butter kisses"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/snickerdoodle.gif'/>","Vanilla cinnamon cake with a cinnamon-sugar frosting, lightly dusted with cinnamon and sugar"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/cloud_9.gif'/>","Madagascar Bourbon Vanilla cake with a sky blue vanilla buttercream"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/sugar_mama.gif'/>","Madagascar Bourbon Vanilla cake with milk chocolate frosting"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/diva.gif'/>","Rich chocolate cake with a pink vanilla buttercream"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/chocolate_fantasy.gif'/>","Rich chocolate cake topped with milk chocolate frosting rolled in chocolate sprinkles"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/cocoa_nut.gif'/>","Rich chocolate cake topped with peanut butter frosting and sprinkled with peanut butter crunchies"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/snowball.gif'/>","Rich chocolate cake with coconut buttercream rolled in coconut shavings"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/pina_colada.gif'/>","Pineapple cake with coconut buttercream, topped with coconut shavings"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/tiramisu.gif'/>","Vanilla and chocolate marbled cake with an espresso-mascarpone cheese frosting, lightly dusted with cocoa powder and topped with chocolate shavings"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/original.gif'/>","Double layered and twice baked on top of a thick buttery graham cracker crust"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/orea.gif'/>","A single layer of original cheesecake with a second layer of Oreo cheesecake sitting on a buttery graham cracker crust"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/blueberry.gif'/>","Our original cheesecake covered with our blueberry cheesecake topping"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/strawberry.gif'/>","Our original cheesecake covered with our strawberry cheesecake topping"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/raspberry.gif'/>","Our original cheesecake covered with our raspberry cheesecake topping"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/chocolate_chip.gif'/>","Baked fresh daily these soft and chewy cookies are just like mom use to make them"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/sugar.gif'/>","Baked fresh daily these soft and chewy cookies are just like mom use to make them"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/snickerdoodle.gif'/>","Baked fresh daily these soft and chewy cookies are just like mom use to make them"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/oatmeal.gif'/>","Baked fresh daily these soft and chewy cookies are just like mom use to make them"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/shortbread.gif'/>","Baked fresh daily these buttery cookies will melt in your mouth"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/apple.gif'/>","Homemade and baked fresh, our tasty pies are the perfect size for one person."), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/cherry.gif'/> ","Homemade and baked fresh, our tasty pies are the perfect size for one person."), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/fudge_brownie.gif'/>","Our wonderfully rich brownies are moist and full of flavor."), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/old_school.gif'/>","A delicious Granny Smith apple dipped in caramel"), new goodsObj("<div><img src='images/spc.gif' height='5' width='1' alt=''/></div><img src='images/apple_pie2.gif'/>","Granny Smith dipped in caramel then dipped in white chocolate and sprinkled with cinnamon-sugar"));

function showLink(linkId){
	tempId = document.getElementById("cupcake"+linkId);
	tempId.innerHTML = "<table cellpadding='0' cellspacing='0' align='center' bgcolor='#ECD7D2'>";
	tempId.innerHTML += "<tr><td><img src='images/spc.gif' height='20' width='1' alt=''/></td></tr><tr><td><div>"+goodsArray[linkId].header+"</div><h4>"+goodsArray[linkId].description+"</h4></td></tr></table>"; 	

}
function hideLink(linkId,imgSrc){
	tempId = document.getElementById("cupcake"+linkId);
	tempId.innerHTML = "<img src='"+imgSrc+"' onmouseover='showLink("+linkId+")' />";
}
function getWindowHeight(){
		return document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.offsetHeight;
	}
function preloadImages(){
	for(i=0;i<imgArray.length;i++){
		newImage[i] = new Image();
		newImage[i].src = imgArray[i];
	}
	
	moveHomePage();
}
function movePage(contentHeight){
	var tempHeight = getWindowHeight(contentHeight);
	tempHeight = (tempHeight > contentHeight) ? Math.floor(((tempHeight - contentHeight) / 2)) : 0;
	if(document.getElementById('shell')){
		tempElement = document.getElementById('shell');
		tempElement.style ? tempElement.style.marginTop = tempHeight + "px" : tempElement.padding = tempHeight;
	}
	return;	
}
