//Quote randomizer on index page
function randomQuote() {
	var rnumb = "";
	var img = "";
	
	rnumb += Math.floor(Math.random()*3);
	img = rnumb;
	
	if (img == "0") {
		document.quote.src='images/quote_index01.gif';
	}
	if (img == "1") {
		document.quote.src='images/quote_index02.gif';;
	}
	if (img == "2") {
		document.quote.src='images/quote_index03.gif';;
	}
}

//Image preloader
imageSource = new Array (
	"images/nav_item01.gif",
	"images/nav_item01_hover.gif",
	"images/nav_item02.gif",
	"images/nav_item02_hover.gif",
	"images/nav_item03.gif",
	"images/nav_item03_hover.gif",
	"images/nav_item04.gif",
	"images/nav_item04_hover.gif",
	"images/nav_item05.gif",
	"images/nav_item05_hover.gif",
	"images/nav_item06.gif",
	"images/nav_item06_hover.gif",
	"images/nav_item07.gif",
	"images/nav_item07_hover.gif",
	"images/nav_item08.gif",
	"images/nav_item08_hover.gif",
	"images/nav_item09.gif",
	"images/nav_item09_hover.gif"
)

imageList = new Array ();

for (counter in imageSource) {
    imageList[counter] = new Image();
    imageList[counter].src = imageSource[counter];
}

//Popup window function
function openPopup(newWindow, iScrollbars, iWidth, iHeight) {
    iX = (screen.width) ? (screen.width-360)/2 : 0;
	iY = (screen.height) ? (screen.height-600)/2 : 0;
	
	
	winStats="menubar=no,location=no,directories=no,status=no,resizable=no,scrollbars=" + iScrollbars;

    if (navigator.appName.indexOf("Microsoft")>=0)
    {
      winStats+=",left=" + iX + ",top=" + iY + ",width=" + iWidth + ",height=" + iHeight;
    }
    else
    {
      winStats+=",screenX=" + iX + ",screenY=" + iY + ",width=" + iWidth + ",height=" + iHeight;
    }
    popwin=window.open(newWindow,"popupwin",winStats);
}

//Function for closing window
function winClose()
{
	window.close()
}
