// this file contains useful functions
// Author: Gabriel Codina trianodon@start.com.au


// routine to open a popup window of size w x h no menus etc
// padding is added for window frame, caption and title bar
    function popup(page,w,h)
    {
		var hgt=(100+h).toString();
		var wid=(50+w).toString();
        window.open (page,page.substring(0,page.substring-4),"width="+wid+",height="+hgt+",history=0");
    }

// this routine selects the specified button on the toc
// it is called by the top pages to update the toc display
// if the user has navigated there other than thru the toc

	function signal(iName)
	{	// check if running in whole window
		if (parent.frames.length > 0)
		{	// dont stuff up toc images if it isnt loaded
			if (parent.tocIsLoaded.toString()=="true")
			{	//select each image
				for (index in parent.frames["toc"].document.images)
	        	{	// dont stuff up the lionfish image
					if (index.toString() != "notme" && index != 0)
					{
		        		if (index.toString() == iName)
		        		{	// is it the button we are after ?
		    				parent.frames["toc"].document.images[iName].src=("toc_imgs/"+iName+"_on.gif");
		        		} else
		        		{	// dont use if index is a number
			   				if (!(index >=0))
							{
								parent.frames["toc"].document.images[index].src=("toc_imgs/"+index+"_off.gif");
							}
			    		}
					}
				}
			}
		}
	}
// array of month names

var months = new Array;
months[0]="January";
months[1]="February";
months[2]="March";
months[3]="April";
months[4]="May";
months[5]="June";
months[6]="July";
months[7]="August";
months[8]="September";
months[9]="October";
months[10]="November";
months[11]="December";
months[12]="Octember";