
//=========================================================================
// Routines for flipping the picture
//=========================================================================

// Preload the images we want to use
item1     = new Image();
item1.src = "pasfoto.jpg";

item2     = new Image();
item2.src = "pasfoto2.jpg";

itemselected = 1; 

/* Following checks the src string itself for the correct picture.
   Doesn't work any more because we now also flip on mouseover/out

	if ( pasfoto.src.substring(pasfoto.src.length - item1.length) == item1 ) 

 */

function setsource(pasfoto) {
	
	if ( itemselected == 1 ) {
		itemselected = 2
	}
	else {
		//In all other cases (including errors), we revert to item1
		itemselected = 1
	}
}

function flippic(pasfoto,onover) {
	if ( itemselected ==1 ^ onover) {
		pasfoto.src=item1.src;
	}
	else {
		pasfoto.src=item2.src;
	}
}


//=========================================================================
// Other Routines
//=========================================================================

//
// Create the footer text, using the values of CVS keywords
//
// Input are the texts generated by the CVS keywords Date and Author
//
function footerText(date, auth) {
	//Extract the information we want from the strings
	date = date.substring(7 + 10, 7);
	var newdate = date.substring(10, 8) +  
		"-" + date.substring(7, 5) +  
		"-" +  date.substring(4, 0);

	document.write( "Last Update: " + newdate);

	//Only show the author if the field has a legal value
	if ( auth != null && auth.length > 9  ) {
		auth = auth.substring(9, auth.length -2);
		document.write( " By: " + auth);
	}

	document.writeln("." );
}


