//-----------------------------------------------------------------
// JavaScript for Josefiak.com menu system
//-----------------------------------------------------------------

// Note that this file depends on other initialization accomplished
// by in-line JavaScript on each page (which is generated by php).

//-----------------------------------------------------------------
// Define functions for doing the image replacement.
// (including pop-up character)

function mouseIn(position) {
	document.images["pop" + pop_pos].src = cimg_blank.src;
	pop_pos = Math.floor(cimg_hot.length*Math.random());

	if (position != menu_pos) {
		document.images["item" + position].src = cimg_hot[position].src;
	}
	document.images["pop" + pop_pos].src = cimg_popper.src;
	window.status = cimg_page[position];
}

function mouseOut(position) {
	document.images["item" + position].src = cimg_idle[position].src;
	window.status = "";
}

function mouseClick(position) {
	location.replace(cimg_page[position]);
}

function mouseIn2(position, text) {
	document.getElementById("menu2_" + position).className = "menuHover";
	window.status = text;
}

function mouseOut2(position) {
    document.getElementById("menu2_" + position).className = "menu";
	window.status = "";
}

function mouseClick2(newURL) {
    location.replace(newURL);
}
