/* Some standard use functions used on most pages */
/* Separating my javascripts from my HTML files    */
 
/*  -------------------------------------------------------------------
      Debug is only used as I can't find a good javascript debugger! 
    -------------------------------------------------------------------
*/
 
var myDebug = false;
function scrawl (something)
{
	if (myDebug)
	   document.write(" "+something);
}

/*  -------------------------------------------------------------------
	follow goes to the html path given in menuChooser
	This is used by the drop down Form menu for prime navigation
    -------------------------------------------------------------------
*/

function follow(placeToGoTo) 
{
   var newURL=document.getElementById(placeToGoTo).value;
   scrawl (newURL);
   window.location=newURL;  // Change the URL, there may be parameters now
}

function followUp(ExNum) 
{
   	if (ExNum > 15) 
	  alert("The next example is not available yet, please try again tomorrow");
	else 
	  {
		var newURL;
   		if (ExNum < 10)
			newURL="index.php?new=example0"+String(ExNum)+".php";		
		else	
			newURL="second.php?new=example"+String(ExNum)+".php";		
	    scrawl (newURL);
   	   	window.parent.location=newURL;  // escape from within an iframeelse if (ExNum < 14)
	  }
}

function showURL()  /* Just that */ 
{
   document.write(window.location);
}

