
function largerImage(imgurl, w, h, iw)
{
	if (!w) w = 600;
	if (!h) h = 600;
	if (!iw) iw = 500;	// image width
   lswin = window.open("","pic","width=" + w + ",height=" + h + ",top=1,resizable=yes,scrollbars=yes");
   lswin.document.writeln('<html><body bgcolor="black" oncontextmenu="return false;"><center>');
   lswin.document.writeln('<head><META HTTP-EQUIV="imagetoolbar" CONTENT="no"></head>');
   lswin.document.writeln('<img src=' + imgurl + ' width=' + iw + ' >');
   lswin.document.writeln('</center></body></html>')
   lswin.document.close();
	

}


function fadetext()
{ 
	if (red < 172) 	
	{ 
		red+=8; 
	}
	
	if (grn < 55) 
	{ 
		grn+=2; 
	}
	
	if (blu < 2) 
	{ 
		blu+=1; 
	}
		
	document.getElementById("introtext").style.color="rgb("+red+","+grn+","+blu+")";
		
	if (red < 172 || grn < 55 || blu < 2)		
	{
		setTimeout("fadetext()",250); 		
	}
}

function fadedelay()
{
	red = 0;
	grn = 0;
	blu = 85;

	setTimeout("fadetextin()",1000); 
}

function fadetextin()
{ 
	// #DE924E is ochre text color.
	// #000055 is dark blue background color.
	
	if (red < 222) 	
	{ 
		//red+=2.5; 
		//red+=.5; 
		red+=1; 
	}
	else
	{
		red = 222;
	}
	
	if (grn < 146) 
	{ 
		//grn+=1.25; 
		//grn+=.5
		grn+=1
	}
	else
	{
		grn = 146;
	}
	
	if (blu > 78) 
	{ 
		//blu-=.0625; 
		//blu-=.5
		blu-=1
	}
	else
	{
		blu = 78;
	}
		
	document.getElementById("introclicktext").style.color="rgb("+red+","+grn+","+blu+")";
		
	if (red < 222 || grn < 146 || blu > 78)		
	{
		setTimeout("fadetextin()",10); 		
	}
}


function testit() {alert("blah");}

/*
function XshowImg(img,caption,w,h)
{

	document.getElementById("theimg").width = w;
	document.getElementById("theimg").height = h;
	
	document.getElementById("theimg").src = img;
	var object = document.getElementById('infobox');
	object.innerHTML = '<b>' + caption + '</b>';

}
*/

function getRandomPic()
{
	var array = new Array(
	"imagesA/bobandecho.jpg",					// 0
	"imagesA/edgeofthelake.jpg",
	"imagesA/endofjune.jpg",
	"imagesA/firstfamilyadamshobby.jpg",
	"imagesA/firstfamilychildandmother.jpg",
	"imagesA/firstfamilysayinggoodbye.jpg",
	"imagesA/schoolofpainting.jpg",
	"imagesA/thenewpainting.jpg",
	"imagesB/abelsbalance.jpg",
	"imagesB/aboutdesire.jpg",
	"imagesB/firstfamilylikeabelandeve.jpg",	// 10
	"imagesB/gravitygone.jpg",
	"imagesB/onceafamily.jpg",
	"imagesB/ritasbath.jpg",
	"imagesB/sometimesairborne.jpg",
	"imagesB/sometimesitseems.jpg",
	"imagesC/aletter.jpg",
	"imagesC/blanche.jpg",
	"imagesC/risa.jpg",
	"imagesC/risaandlee.jpg",
	"imagesC/stanley.jpg",						// 20
	"imagesC/stella.jpg",
	"imagesC/sweeperandthechair.jpg",
	"imagesC/volvo.jpg",
	"imagesD/assassin.jpg",
	"imagesD/bathroomneardelphi.jpg",
	"imagesD/elementalatmosphericpressure.jpg",
	"imagesD/hoteltableau.jpg",
	"imagesD/inthecitynight.jpg",
	"imagesD/thebeautythestranger.jpg",
	"imagesD/whereshouldistand.jpg",			// 30
	"imagesE/AcrossStreet.jpg",
	"imagesE/LastRide.jpg",
	"imagesE/RiverStudy1.jpg",
	"imagesE/RiverStudy2.jpg",
	"imagesE/RiverStudy3.jpg"					
	
	);											// 35 base zero
	
	var arrLength = array.length;
	var imgUrl = "imagesD/assassin.jpg";		// default image.

	if (arrLength)
	{
		var rndNum = Math.floor(arrLength * Math.random() );
		var imgSub = array[rndNum];
		var imgUrl = "selectedpaintings/" + imgSub;	
	}
	

	return imgUrl;

}