// JavaScript Document

var current = 0; //start the counter at 0
var ns6 = document.getElementById&&!document.all; //detect netscape 6
 
var items = new Array();
    items[0]="<a href=\"http://www.jenngrijalva.com/\" target=\"_blank\">CLICK TO VIEW THIS PROJECT</a><br /><br /><span style=\"font-size: 8pt; font-weight: bold;\">JENN GRIJALVA'S OFFICIAL WEBSITE,<br />MTV'S THE REAL WORLD: DENVER</span><!--<br />CLIENT: JENN GRIJALVA-->";
    items[1]="<a href=\"http://www.dstvallejo.org/\" target=\"_blank\">CLICK TO VIEW THIS PROJECT</a><br /><br /><span style=\"font-size: 8pt; font-weight: bold;\">DELTA SIGMA THETA SORORITY, INC.<br />VALLEJO ALUMNAE CHAPTER</span>"; 
    items[2]="<a href=\"http://www.isaacs-jellinek.com/\" target=\"_blank\">CLICK TO VIEW THIS PROJECT</a><br /><br /><span style=\"font-size: 8pt; font-weight: bold;\">ISAACS/JELLINEK</span>";

function next_portfolio() {
	current = (current==items.length-1)? 0 : current+1;
	document.getElementById("portfolio-container").innerHTML=items[current];
	document.getElementById("countdiv").innerHTML=(current+1) + ' of ' + (items.length);
}
 
function prev_portfolio() {
	if (current > 0) {
		current--;
		document.getElementById("portfolio-container").innerHTML=items[current];
		document.getElementById("countdiv").innerHTML=(current+1) + ' of ' + (items.length);
	}
	else {
		current = items.length - 1;
		document.getElementById("portfolio-container").innerHTML=items[current];
		document.getElementById("countdiv").innerHTML=(current+1) + ' of ' + (items.length);
	}
}
 
function PortfolioViewer() {
    if(ns6)document.getElementById("portfolio-container").innerHTML=items[current]
        if(document.all)
			current = (current==items.length-1)? 0 : current+1;
			document.getElementById("portfolio-container").innerHTML=items[current];
			document.getElementById("countdiv").innerHTML=(current+1) + ' of ' + (items.length);
}

window.onload = function() {
current = Math.floor(Math.random() * items.length);
//alert(current+1); //display random item number
	if (current >= 0) {
		document.getElementById("portfolio-container").innerHTML=items[current];
		document.getElementById("countdiv").innerHTML=(current+1) + ' of ' + (items.length);
	}
}