//used to swap images and highlight selected view in the Work section
safari=(navigator.userAgent.indexOf('Safari')!=-1);
function showPic (whichpic,vname) {
if (document.getElementById) {
	
	// find all the a tags in the views div and set the class to nothing
	var alinks = document.getElementById('views').getElementsByTagName('a');
	for(var i=0;i<alinks.length;i++){
		alinks[i].className='';
	}
	// find the a tag to switch and change the class to viewon
	document.getElementById(vname).className = "viewon";

	// if the browser is safari, set the placeholder div to a blank image; this fixes a resize error
	if (safari) document.getElementById('placeholder').src = "/images/blank.gif";
	
	// set the placholder div to the url of the href passed
	document.getElementById('placeholder').src = whichpic.href;			
		return false;
	} 
	else {
		return true;
	}
}
