/*
	www.robdeering.com
	MAIN JAVASCRIPT FILE
	Author: Robin King, redPandaDesign.com
	Created: 6-7-2007
*/


// THUMBNAIL GALLERY

var current ;

function loadFace (whichface) {
	if (document.getElementById) {
		// load the face
		obj=document.getElementById(whichface) ;
		document.getElementById('manyFacesOfRob').src = obj.href ;
		
		// reset last thumbnail
		if (document.getElementById(current)) {
//		document.getElementById(current + "Txt").style.color="#333" ;
		document.getElementById(current + "Border").style.backgroundColor="#f8edd8" ;
		}

		// highlight the new thumbnail
//		document.getElementById(whichface + "Txt").style.color="#FFF" ;
		document.getElementById(whichface + "Border").style.backgroundColor="#f1dbae" ;

		// update the current thumbnail
		current = whichface ;
		
		return false ;
	} else {
		return true ;
	}
}

// Mailing list form

function clearField (field) {
	if (document.getElementById) {
		// clear the field & reset color
		field.value="" ;
		field.style.color="#000" ;		
	}
}

// Load the Flash music player
//	uses SWFObject javascript Flash player, more info at 
//	http://blog.deconcept.com/swfobject/
 
function playMusic() {
	var so = new SWFObject("flash/spinning-rob.swf", "spinningrob", "30", "30", "6", "#000000");
	so.write("spinningRob");
}
