// scripts for PantheonDesign.com
// copyright Feb 2004 PantheonDesign.com

// ======================================================= 
// Show a random image for L + R on the index page
// =======================================================
//    These functions works by building a filename and 
// displaying that image in place of a named 1 pixel 
// gif in the html of the index page. 
//    The index page loads a 1 pixel gif  
// then an onLoad handler in the index pgae calls 
// this function and this function swaps a random image 
// into the 1 pixel gif.
//    This function creates a random integer between 1
// and whatever theNumOfImages is set to. 
// If the variable theNumOfImages is set to 4 then
// this function will generate 1,2, 3 or 4.
// Then it concatanates a string and the number to
// create the filename of the random image.
// This is the file that will get loaded into
// the named 1 piexel gif in the index page.
// =======================================================



// calls all the random image showers
function showAllRandomImages() {
	showRandomImage_1();
	showRandomImage_2();
	showRandomImage_3();
	showRandomImage_4();
}
// ------------------------------------



// show a random Laura and Rick
function showRandomImage_1() {

	theNumOfImages	= 4;	// change this number based on how many images there are.
	
	theRandomImageNumber	= Math.floor(Math.random() * theNumOfImages) + 1 ;	// no zeroes
	theImageToShow			= "image_1_" + theRandomImageNumber + ".jpg";
	// alert("Image 1 is " 	+ theImageToShow + ".");
	document.image_1.src 	= theImageToShow;
}

// show  random image #2
function showRandomImage_2() {

	theNumOfImages	= 5;	// change this number based on how many images there are.
	theRandomImageNumber	= Math.floor(Math.random() * theNumOfImages) + 1 ;	// no zeroes
	theImageToShow			= "image_2_" + theRandomImageNumber + ".jpg";
	// alert("Image 2 is " 	+ theImageToShow + ".");
	document.image_2.src 	= theImageToShow;
}

// show random image #3
function showRandomImage_3() {

	theNumOfImages	= 4;	// change this number based on how many images there are.
	theRandomImageNumber	= Math.floor(Math.random() * theNumOfImages) + 1 ;	// no zeroes
	theImageToShow			= "image_3_" + theRandomImageNumber + ".jpg";
	// alert("Image 3 is " 	+ theImageToShow + ".");
	document.image_3.src 	= theImageToShow;
}


// show random image #4
function showRandomImage_4() {

	theNumOfImages	= 5;	// change this number based on how many images there are.
	theRandomImageNumber	= Math.floor(Math.random() * theNumOfImages) + 1 ;	// no zeroes
	theImageToShow			= "image_4_" + theRandomImageNumber + ".jpg";
	// alert("Image 4 is " 	+ theImageToShow + ".");
	document.image_4.src 	= theImageToShow;
}


// open the window
function mostraQuelcose (url) {
 NewWindow =
window.open(url,'miniviewer','toolbar=0,menubar=0,location=0,scrollbars=0,width=620,height=550,RESIZABLE=yes');
 NewWindow.focus();
}

// open the window for "after-image"
function mostraAfterImage (url) {
 NewWindow =
window.open(url,'miniviewer','toolbar=0,menubar=0,location=0,scrollbars=0,width=620,height=610,RESIZABLE=yes');
 NewWindow.focus();
}

// end of FUNCTIONS










