var img = new Array();

function imageOn(pimg,ext) {
	if (!ext) {
		document.getElementById(pimg).src = "images/" + pimg + "01.gif";
	} else {
		document.getElementById(pimg).src = "images/" + pimg + "01." + ext;
	}
}

function imageOff(pimg,ext) {
	if (!ext) {
		document.getElementById(pimg).src = "images/" + pimg + "00.gif";
	} else {
		document.getElementById(pimg).src = "images/" + pimg + "00." + ext;
	}
}

function divOn(div) {
	document.getElementById(div).style.visibility = "visible";
}

function divOff(div) {
	document.getElementById(div).style.visibility = "hidden";
}

function portfolioOn(pimg) {
	var inum = pimg.charAt(pimg.length - 1);
	var cat = pimg.substring(0, pimg.length - 1);
	var icount = 6;
	for (i=1;i<=icount;i++) {
		portfolioOff(cat, i);
	}
	document.getElementById(pimg).src = "images/number" + inum + ".gif";
	document.getElementById("imgLarge").src = "images/portfolio_" + cat + inum + "_fs.jpg";
	//document.getElementById("divPortfolioImageCopy" + inum).style.visibility = "visible";
}

function portfolioOff(cat, inum) {
	document.getElementById(cat + inum).src = "images/portfolio_" + cat + inum + "_tn.jpg";
	//document.getElementById("divPortfolioImageCopy" + inum).style.visibility = "hidden";
}

// The Central Randomizer 1.3 (C) 1997 by Paul Houle (houle@msc.cornell.edu)
// See:  http://www.msc.cornell.edu/~houle/javascript/randomizer.html

rnd.today=new Date();
rnd.seed=rnd.today.getTime();

function rnd() {
        rnd.seed = (rnd.seed*9301+49297) % 233280;
        return rnd.seed/(233280.0);
}

function rand(number) {
        return Math.ceil(rnd()*number);
}