	// Determine X, Y location of mouse
	document.onmousemove = Mouse_XY;
	var XPos = 0;
	var YPos = 0;
	function Mouse_XY(e) {
		var IE = document.all?true:false;
	  if (IE) {
	    XPos = event.clientX + document.body.scrollLeft;
	    YPos = event.clientY + document.body.scrollTop;
	  } else {
			document.captureEvents(Event.MOUSEMOVE);
	    XPos = e.pageX;
	    YPos = e.pageY;
	  }
//		XPos = e.screenX;
//		YPos = e.screenY;
	}

  function setOpacity(obj, opacity) {
    opacity = (opacity == 100)?99.999:opacity;
    obj.style.filter = "alpha(opacity:"+opacity+")";
    obj.style.KHTMLOpacity = opacity/100;
    obj.style.MozOpacity = opacity/100;
    obj.style.opacity = opacity/100;
  }

function getStyleObject(objectId) {
  if (document.getElementById && document.getElementById(objectId)) {
    return document.getElementById(objectId).style;
  } else if (document.all && document.all(objectId)) {
    return document.all(objectId).style;
  } else {
    return false;
  }
}
	// Display data box
	function Show(idName) {
 		theDiv = new Object();
 		theDiv = document.getElementById(idName);
		var the_style = getStyleObject(idName);
 		setOpacity(theDiv, 0);
 		the_style.display='block';
		setTimeout("setOpacity(theDiv, 30)", 50);
		setTimeout("setOpacity(theDiv, 60)", 100);
		setTimeout("setOpacity(theDiv, 85)", 150);
	}

	// Hide data box - have to do individual ones due to JS bug
	function Hide4(idName)
	{
 		theDiv4 = new Object();
 		theDiv4 = document.getElementById(idName);
		setTimeout("setOpacity(theDiv4, 60)", 0);
		setTimeout("setOpacity(theDiv4, 30)", 40);
		setTimeout("theDiv4.style.display='none'", 80);
	}

	// Move data box
	function Move(idName)
	{
 		theDivToMove = new Object();
 		theDivToMove = document.getElementById(idName);
 		theDivToMove.style.left = XPos + 2;
 		theDivToMove.style.top = YPos + 25;
	}

	// Position the info box in the middle of the screen
	function MoveDimScreen(Mode) {
		if (Mode!='noHide') {
			document.getElementById('dimScreen').style.display = 'none';
			document.getElementById('infoBox').style.display = 'none';
		}
		var TopOffset;
		var LeftOffset;
		var BoxHeight;
		if (navigator.appName=="Netscape") {
    	TopOffset  = window.pageYOffset;
			WinHeight  = window.innerHeight;
			LeftOffset = window.innerWidth * 0.5 - 260;
		} else {
    	TopOffset  = document.body.scrollTop;
			WinHeight  = document.body.offsetHeight;
			LeftOffset = document.body.offsetWidth * 0.5 - 260;
		}
		BoxHeight  = document.all['infoBox'].clientHeight;
		document.getElementById('dimScreen').style.top = TopOffset;
		document.getElementById('infoBox').style.top = TopOffset + (WinHeight-BoxHeight)*0.5;
		document.getElementById('infoBox').style.left = LeftOffset;
	}
	
 	// Function to make easier showing/hiding divs
	function displayID(idName,show) {
		var the_style = getStyleObject(idName);
		if (show=='y' && the_style != false) {
			the_style.display = '';
		} else if(show=='n' && the_style != false) {
			the_style.display = 'none';
		}	
	}
	
	function move_me(s){ 
		if(s == "*new*"){
			document.getElementById('photocat_det').style.display='';
		}else{
			document.getElementById('photocat_det').style.display='none';
		}
	}
	
function noLink(){
	//Hack to stop some IE7.0 bug causing link to still work
	this.event.returnValue = false;
	try{
	}
	catch(err) {
	}
	return false;
}

