var isNav, isIE, isN6;
var coll = "";
var styleObj = "";
 
if( navigator.appName == "Netscape"){
	if ( parseInt( navigator.appVersion ) >= 5 ){
		isN6 = true;
		//styleObj = ".style";
		//coll = "getElementById(";
		//styleObj = ").style";
	}
	else
		isNav = true;
	
}
else{
	isIE = true;
	coll = "all.";
	styleObj = ".style";
}

function getObject( obj ){
	var theObj, temp;
	//if( isN6 ){
		//theObj = document.getElementById( obj )
		//alert( theObj );
	//}
	if(typeof obj == "string"){
		if( isN6 ){
			theObj = document.getElementById( obj ).style;
			//theObj = eval("document."+obj+".style");
			//alert( theObj );
		}
		else
			theObj = eval("document."+coll+obj+styleObj);
	}else{
		theObj = obj;
	}
	return theObj;
}


function hide( obj ){
		var theObj = getObject(obj);
		theObj.visibility = "hidden";

}


function show( obj ){
		var theObj = getObject(obj);
		theObj.visibility = "visible";
}




var timer;

// submenu, stop timer when moused over
function stopClock(){
	clearTimeout( timer );
	
}

function stopClock2(){
	clearTimeout( timer );
	
}

//timer function - hides submenu when time is up
function setClock(){
	timer = setTimeout( "closeMenu()", 1000 );
}

function setClock2(){
	timer = setTimeout( "closeMenu2()", 1000 );
}

function closeMenu(){
	
	rollOver( "portfolio", "images/menu/homeportfoliooff.gif", "" );
	hide("folio");
}

function closeMenu2(){
	if(!foliopage){
		rollOver( "portfolio", "images/menu/portfoliooff.gif", "" );	
		hide("folio");
	}
}

testvar = "";
function zoom(pic) { 
  testvar = pic;
  var newWin3 = window.open("zoom.htm","newWin3","toolbar=no,scrollbars=auto,width=500,height=500,location=no,left=100,top=100");
  newWin3.focus();
  

}

function subOver( imageName, imageSrc, layer ){
		
		if( isNav ){
			if( layer != "" ){
				var obj = eval("document."+layer+".document");
				obj.images[imageName].src = imageSrc;
			}
			else
				document.images[imageName].src = imageSrc;
		}
		else{
			document[imageName].src = imageSrc;
		}
}


function rollOver( imageName, imageSrc, layer ){
		
		if((imageName=="portfolio") || (layer=="folio")){
			show("folio");
		}else{
			rollOver( "portfolio", "images/menu/homeportfoliooff.gif", "" );	
			hide("folio");
		}
		
		if( isNav ){
			if( layer != "" ){
				var obj = eval("document."+layer+".document");
				obj.images[imageName].src = imageSrc;
			}
			else
				document.images[imageName].src = imageSrc;
		}
		else{
			document[imageName].src = imageSrc;
		}
}

function rollOver2( imageName, imageSrc, layer ){
		
		if((imageName=="portfolio") || (layer=="folio")){
			show("folio");
		}else{
			if(!foliopage){
				rollOver( "portfolio", "images/menu/portfoliooff.gif", "" );	
				hide("folio");
			}
		}
		
		if( isNav ){
			if( layer != "" ){
				var obj = eval("document."+layer+".document");
				obj.images[imageName].src = imageSrc;
			}
			else
				document.images[imageName].src = imageSrc;
		}
		else{
			document[imageName].src = imageSrc;
		}
}

foliopage=false; 