/* Some standard use functions used on most pages */
/* Separating my javascipts from my HTML files    */

var script_debug = false;
function scrawl (something)
{
	if (script_debug)
	   document.write(" "+something);
}

function swapImages(ImageName, NewImage)
{
	/* test to see if the browser understands rollovers
	   If it does swap one image for the other */
	   
	if (document.images)
	{
		document[ImageName].src = NewImage;
	}
}


function follow(placeToGoTo) 
{
   var newURL=document.getElementById(placeToGoTo).value;
   var hash = newURL.search("#");  // Check if a parameter is passed

   scrawl (newURL);
   if (hash < 0)  //  No parameters given
	{
	scrawl ("New URL"); 
	window.location=newURL;  // if URL is current, don't reload 
	}
   else
      if (document.URL.search(newURL.slice(0,hash)) < 0)  // new URL?	
	{	
	scrawl(newURL.slice(0,hash));
	window.location=newURL;  // Change the URL anyway, there may be parameters now
	}
      else	
	{
	window.location=newURL;  // Change the URL anyway, there are parameters now
	window.location.reload(); // Browsers 'optimize' by not reloading the current page
	}
}  