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

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

function arrowOn(img) {
	document.getElementById(img).src = "images/arrow.gif";
}

function arrowOff(img) {
	document.getElementById(img).src = "images/px_trans.gif";
}

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

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

function portfolioOn(img) {
	var inum = img.charAt(img.length - 1);
	var cat = img.substring(0, img.length - 1);
	var icount = 6;
	if (cat == "cg") icount = 3;
	if (cat == "location") icount = 5;
	for (i=1;i<=icount;i++) {
		portfolioOff(cat, i);
	}
	document.getElementById(img).src = "images/number" + inum + ".gif";
	document.getElementById("imgLarge").src = "images/portfolio_" + img + "_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);
}