function isNull(val){return(val==null);}
function IsNumeric(sText)

{
   var ValidChars = "0123456789.";
   var IsNumber=true;
   var Char;

 
   for (i = 0; i < sText.length && IsNumber == true; i++) 
      { 
      Char = sText.charAt(i); 
      if (ValidChars.indexOf(Char) == -1) 
         {
         IsNumber = false;
         }
      }
   return IsNumber;
   
   }
function showPic(whichpic) {
  if (!document.getElementById("placeholder")) return true;
  var source = whichpic.getAttribute("href");
  var placeholder = document.getElementById("placeholder");

  placeholder.setAttribute("src",source);
  
  if (!document.getElementById("description")) return false;
  if (whichpic.getAttribute("title")) {
    var text = whichpic.getAttribute("title");
  } else {
    var text = "";
  }
  var description = document.getElementById("description");
  if (description.firstChild.nodeType == 3) {
    description.firstChild.nodeValue = text;
  }

  return false;
}

function prepareGallery() {

	$("a.imggallery").click(function(event)	{
		event.preventDefault();
		return showPic(this);
	});
	
	$("a.imggallery").mouseover(function(event)	{
		event.preventDefault();
		return showPic(this);
	}); 
	
	$("a.imggallery").keypress(function(event)	{
		event.preventDefault();
		return showPic(this);
	});
  
}
$(document).ready(prepareGallery);