/*
javascript for www.carbontree.net

file: script_main.js
author: Debbie Thompson
date: April 11, 2008

main javascript for:
donate button

*/



/* ----- for the buttons and preloading images ------ */
// preload images - create an image object and assign it a src property

var myImages = ["button_buy"]; // array of image roots, only one for now, maybe more later
var myMouseOver = new Array();
var myMouseOut = new Array();

// Preload, if images are supported
if (document.images) {
	// make the file names, causes them to preload
	for (i=0; i<=myImages.length; ++i) {
		myMouseOver[i] = new Image();
		myMouseOver[i].src = "images/design/" + myImages[i] + "_hot.gif"; // make the hot version
		myMouseOut[i] = new Image();
		myMouseOut[i].src = "images/design/" + myImages[i] + "_norm.gif"; // make the normal version
	}
}



// Buy now button normal/hot used in menu_left
function buy_over() {
	document.button_buy.src = myMouseOver[0].src;
}

function buy_out()	{
	document.button_buy.src = myMouseOut[0].src;
}


