var imageRestoreDelay=500;
var topTimeOn = null;
var bottomTimeOn = null;

var topImageTotal = 13;
var bottomImageTotal = 12;

var topRndmNbr = (Math.round(Math.random()*(topImageTotal-1)+1));
	if (topRndmNbr<10) {
		var topImageNbr = "0" + topRndmNbr;
	}
	else {
		var topImageNbr = topRndmNbr;
}
var bottomRndmNbr = (Math.round(Math.random()*(bottomImageTotal-1)+1));
	if (bottomRndmNbr<10) {
		var bottomImageNbr = "0" + bottomRndmNbr;
	}
	else {
		var bottomImageNbr = bottomRndmNbr;
}


var topImageMenu = new Image();
topImageMenu.src = "images/image_top_menu04.jpg";
var topImageMenuBlur = new Image();
topImageMenuBlur.src = "images/image_top_menu04_blur.jpg";
var topImage = new Image();
topImage.src = "images/image_top_main04.jpg";
var topImageBlur = new Image();
topImageBlur.src = "images/image_top_main04_blur.jpg";
	
var bottomImageMenu = new Image();
bottomImageMenu.src = "images/image_bottom_menu" + bottomImageNbr + ".jpg";
var bottomImageMenuBlur = new Image();
bottomImageMenuBlur.src = "images/image_bottom_menu" + bottomImageNbr + "_blur.jpg";
var bottomImage = new Image();
bottomImage.src = "images/image_bottom_main" + bottomImageNbr + ".jpg";
var bottomImageBlur = new Image();
bottomImageBlur.src = "images/image_bottom_main" + bottomImageNbr + "_blur.jpg";
	


function loadImages() {
	document.write("\t\t<table width='379' border='0' cellpadding='0' cellspacing='0' class='tableImagesTop'>\r\t\t\t<tr>\r\t\t<td width='379' height='27' background='" + topImageMenuBlur.src + "' name='topImageMenu' id='topImageMenu'>\r\t\t\t\t\t<div id='topMenuPos' style='position:relative; width:379px; height:27px;'>\r\t\t\t\t\t<img src='images/1dot.gif' width='379px' height='27px' /></div></td>\r\t</tr>\r\t<tr>\r\t\t<td width='379' height='211' align='left' valign='top'><img src='" + topImage.src + "' name='topImage' width='379' height='211' id='topImage' /></td>\r\t</tr>\r\t</table>\r\t<img src='images/1dot.gif' width='379' height='20' />\r\t<table width='379' border='0' cellpadding='0' cellspacing='0' class='tableImagesBottom'>\r\t\t\t<tr>\r\t\t<td width='379' height='27' background='" + bottomImageMenuBlur.src + "'  name='bottomImageMenu' id='bottomImageMenu'>\r\t\t\t\t\t<div id='bottomMenuPos' style='position:relative; width:379px; height:27px;'>\r\t\t\t\t\t<img src='images/1dot.gif' width='379px' height='27px' /></div></td>\r\t</tr>\r\t<tr>\r\t\t<td width='379' height='211' align='left' valign='top'><img src='" + bottomImage.src + "' name='bottomImage' width='379' height='211' id='bottomImage' /></td>\r\t</tr>\r\t </table>");	
}

function blurTopImage() {
	document.images["topImage"].src = topImageBlur.src;
}

function blurBottomImage() {
	document.images["bottomImage"].src = bottomImageBlur.src;
}

function restoreTopImageTimer() {
	topTimeOn = setTimeout("restoreTopImage()",imageRestoreDelay);
}

function restoreBottomImageTimer() {
	bottomTimeOn = setTimeout("restoreBottomImage()",imageRestoreDelay);
}

function restoreTopImage() {
	document.images["topImage"].src = topImage.src;
}

function restoreBottomImage() {
	document.images["bottomImage"].src = bottomImage.src;
}

