$(document).ready(function() {

 //Add JQuery Code here for mouseover effects on buttons
//Not W3C compliant, but just for appearances so allowing it.
$(function() {
    $('.rollover').hover(function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    }, function() {
        var currentImg = $(this).attr('src');
        $(this).attr('src', $(this).attr('hover'));
        $(this).attr('hover', currentImg);
    });

}); 


});  //closes document ready


function addToFavorites(url, title) {
    if (window.sidebar) { // Mozilla Firefox Bookmark
        window.sidebar.addPanel(title, url, "");
    } else if (window.external) { // IE Favorite
        window.external.AddFavorite(url, title);
    }
}


  //Fix the IE getElementByID Bug (what will this do to IE that works?)
 // if (/msie/i.test (navigator.userAgent)) //only override IE
//{
//	document.nativeGetElementById = document.getElementById;
//	document.getElementById = function(id)
//	{
//		var elem = document.nativeGetElementById(id);
//		if(elem)
//		{
//			//make sure that it is a valid match on id
//			if(elem.id == id)
//			{
//				return elem;
//			}
//			else
//			{
//				//otherwise find the correct element
//				for(var i=1;i<document.all[id].length;i++)
//				{
//					if(document.all[id][i].id == id)
//					{
//						return document.all[id][i];
//					}
//				}
//			}
//		}
//		return 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 getQuerystring(key, default_)
{
  if (default_==null) default_="";
  key = key.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regex = new RegExp("[\\?&]"+key+"=([^&#]*)");
  var qs = regex.exec(window.location.href);
  if(qs == null)
    return default_;
  else
    return qs[1];
}



  
