
function setPage(page) {
		document.thisPage = page;
	}	


if (document.images) {
	rollovers = 1;
} else {
    rollovers = 0;
}
        
if (rollovers)
{

profile_ON = new Image(89,18);
profile_ON.src = "images/nav_profile_ON.gif";
profile_OFF = new Image(89,18);
profile_OFF.src = "images/nav_profile_OFF.gif";

portfolio_ON = new Image(89,18);
portfolio_ON.src = "images/nav_portfolio_ON.gif";
portfolio_OFF = new Image(89,18);
portfolio_OFF.src = "images/nav_portfolio_OFF.gif";

contact_ON = new Image(89,18);
contact_ON.src = "images/nav_contact_ON.gif";
contact_OFF = new Image(89,18);
contact_OFF.src = "images/nav_contact_OFF.gif";

studioPan_left_ON = new Image(102,69);
studioPan_left_ON.src = "images/studioPan_left_sm_ON.gif";
studioPan_left_OFF = new Image(102,69);
studioPan_left_OFF.src = "images/studioPan_left_sm_OFF.gif";
studioPan_left_ROLL = new Image(310,231);
studioPan_left_ROLL.src = "images/studioPan_left.jpg";

studioPan_ctr_ON = new Image(105,69);
studioPan_ctr_ON.src = "images/studioPan_ctr_sm_ON.gif";
studioPan_ctr_OFF = new Image(105,69);
studioPan_ctr_OFF.src = "images/studioPan_ctr_sm_OFF.gif";
studioPan_ctr_ROLL = new Image(310,231);
studioPan_ctr_ROLL.src = "images/studioPan_ctr.jpg";

studioPan_rt_ON = new Image(103,69);
studioPan_rt_ON.src = "images/studioPan_rt_sm_ON.gif";
studioPan_rt_OFF = new Image(103,69);
studioPan_rt_OFF.src = "images/studioPan_rt_sm_OFF.gif";
studioPan_rt_ROLL = new Image(310,231);
studioPan_rt_ROLL.src = "images/studioPan_rt.jpg";

back_ON = new Image(57,15);
back_ON.src = "images/but_back_ON.gif";
back_OFF = new Image(57,15);
back_OFF.src = "images/but_back_OFF.gif";

next_ON = new Image(59,15);
next_ON.src = "images/but_next_ON.gif";
next_OFF = new Image(59,15);
next_OFF.src = "images/but_next_OFF.gif";

backSolo_ON = new Image(75,15);
backSolo_ON.src = "images/but_backSolo_ON.gif";
backSolo_OFF = new Image(75,15);
backSolo_OFF.src = "images/but_backSolo_OFF.gif";

nextSolo_ON = new Image(75,15);
nextSolo_ON.src = "images/but_nextSolo_ON.gif";
nextSolo_OFF = new Image(75,15);
nextSolo_OFF.src = "images/but_nextSolo_OFF.gif";

var centerON = 1;
}

function studioPan_ON( imgName ) {
	if ( rollovers ) {
		if(centerON==1) { 
			document.ctr.src = eval("studioPan_ctr_OFF.src");
			centerON=0;
		}
		document[imgName].src = eval( "studioPan_" + imgName + "_ON.src" );
		document.roll.src = eval( "studioPan_" + imgName + "_ROLL.src" );
	}
}

function studioPan_OFF( imgName ) {
	if ( rollovers ) {
		if(centerON==0) { 
			document.ctr.src = eval("studioPan_ctr_ON.src");
			centerON=1;
		}
		if(imgName!="ctr") document[imgName].src = eval( "studioPan_" + imgName + "_OFF.src" );
		document.roll.src = eval( "studioPan_ctr_ROLL.src" );
	}
}


function imgOn( imgName ) {
	if ( rollovers ) {
		document[imgName].src = eval( imgName + "_ON.src" );
		if(document.thisPage) {
			if(document.thisPage!='home') document[document.thisPage].src = eval ( document.thisPage + "_OFF.src");
		}
	}
}


function imgOff( imgName ) {
	if ( rollovers ) {
		document[imgName].src = eval( imgName + "_OFF.src" );
		if(document.thisPage) {
			if(document.thisPage!='home') document[document.thisPage].src = eval (document.thisPage + "_ON.src");
		}
	}
}

function butOn( imgName ) {
	if ( rollovers ) {
		document[imgName].src = eval( imgName + "_ON.src" );
	}
}

function butOff( imgName ) {
	if ( rollovers ) {
	document[imgName].src = eval( imgName + "_OFF.src" );
	}
}


var isOpen;
var newWin;

function viewImage(img,w,h,id) {
	var theURL='viewImage.php?img='+img+'&h='+h+'&w='+w+'&id='+id;
	makeWin(theURL,w,h);	

}

function viewImage2(img,w,h,id) { // this is for the private area
	var theURL='../viewImage.php?img='+img+'&h='+h+'&w='+w+'&id='+id;
	makeWin(theURL,w,h);	

}

function makeWin(URL,w,h) {
	w=w+100;
	h=h+100;
	newWin=window.open(URL, "newWin", "width="+w+",height="+h+",status=0,toolbar=0,menubar=0,scrollbars=0,resizable=1");
		if (!newWin.opener) {
			newWin.opener = window;
		}
	newWin.focus();
}


function checkWin() {
	if(newWin) newWin.close();
}

function checkForm(theForm) {
	if ((theForm.email.value.indexOf("@") == -1) || (theForm.email.value.indexOf(".") == -1)) {
	 	theForm.email.focus();
		alert("Please enter a valid email address.");
		return false;
	}
}
