<!-- 
function displayWindow(url, width, height) { 
var Win = window.open(url,"displayWindow",'width=' + width + ',height=' +height +',resizable=1,scrollbars=yes,menubar=no' ); 
} 

function toggler(theID) { 
// http://www.jefflouella.com/byte_this/2005/06/toggle_an_eleme.html
// Hides or shows an element
          myID = document.getElementById(theID); 
          myID.style.display = (myID.style.display == 'block') ? 'none' : 'block';

}


function show(theID) { 
/*
		Shows a particular DIV, and hides the span above it which contains a hyperlink, calling this 'show' Javascript function, showing the DIV itself
*/
		// Handle the DIV itself
        showdivID = document.getElementById(theID); 	// e.g. a div with id=mydiv
        showdivID.style.display =  ''; 					//show  the div we want to see
		
		// Handle the show/hide spans referring to the above DIV:
		showspanID = document.getElementById('show_' + theID); 	// The hyperlink before should be held in a span with id = a_mydiv
		showspanID.style.display = 'none'; 						// HIDE  the span holding the '+More' and hyperlink
  
		// Ensure the span to 'unhide' the DIV is visible 
		unshowspanID = document.getElementById('unshow_' + theID); 	// The hyperlink before should be held in a span with id = a_mydiv
		unshowspanID.style.display = ''; 	

	  return;
}

function unshow(theID) { 
/*
		Hides a particular DIV, and shows the span above it which contains a hyperlink, calling the 'show' Javascript function, showing the DIV itself
*/
        // HIDE the DIV itself
		unshowdivID = document.getElementById(theID); 	// e.g. a div with id=mydiv
        unshowdivID.style.display =  'none'; 			//hide  the div we want to see
		
		// Show the 'details show' span referring to the above DIV:		
		unshowspanID = document.getElementById('show_' + theID); 	// The hyperlink before should be held in a span with id = a_mydiv
		unshowspanID.style.display = ''; 							// show the span holding the '+More' and hyperlink
		
		// HIDE  the 'details hide' span 
		showspanID = document.getElementById('unshow_' + theID); 	// The hyperlink before should be held in a span with id = a_mydiv
		showspanID.style.display = 'none'; 		  
	  return;
}



function expand_all_sections() {
/* 
	SHOW all the divs with classname 'toggle'
	SHOW all the spans with class UNSHOW (within which are hyperlinks to the 'hide this div' action)
	HIDE all the spans with class SHOW (within which are hyperklinks to the 'show this div' action)
	
	Reference:	http://www.webdeveloper.com/forum/archive/index.php/t-41010.html

*/
	var divs = document.getElementsByTagName('div');
	var spans = document.getElementsByTagName('span');
	var expandlink = document.getElementById('expand_all');	// The 'contract_all' link
	var contractlink = document.getElementById('contract_all');	// The 'contract_all' link


	// Cycle through all the DIV elements, expanding/showing each.
	for (var loop=0; loop<divs.length; loop++) {
		if (divs[loop].className == 'toggle') {
			divs[loop].style.display = '';
		} 
	}
	
	// SHOW all the spans which contain the hyperlinks marked 'click to hide', all of which are  of class 'unshow'
	for (var loop=0; loop<spans.length; loop++) {
		if (spans[loop].className == 'unshow') {
			spans[loop].style.display =  '' ;
		} 
	}
	
	// HIDE all the spans which contain the hyperlinks marked 'click to show', all of which are  of class 'show'
	for (var loop=0; loop<spans.length; loop++) {
		if (spans[loop].className == 'show') {
			spans[loop].style.display =  'none' ;
		} 
	}
	
	// Hide the Expand-all link
	expandlink.style.display = 'none';
	//Show the Contract all link
	contractlink.style.display = '';
	
}


function contract_all_sections() {
// Toggle ALLl the divs with classname 'toggle'
// http://www.webdeveloper.com/forum/archive/index.php/t-41010.html
	var divs = document.getElementsByTagName('div');
	var spans = document.getElementsByTagName('span');
	var expandlink = document.getElementById('expand_all');	// The 'contract_all' link
	var contractlink = document.getElementById('contract_all');	// The 'contract_all' link	


	// Cycle through all the DIV elements, toggling each.
	for (var loop=0; loop<divs.length; loop++) {
		if (divs[loop].className == 'toggle') {
			// divs[loop].style.display = 'block';
			divs[loop].style.display = 'none';
		} 
	}
	
	// Hide all the spans which contain the hyperlinks marked 'click to hide', all of which are  of class 'unshow'
	for (var loop=0; loop<spans.length; loop++) {
		if (spans[loop].className == 'unshow') {
			// divs[loop].style.display = 'block';
			spans[loop].style.display =  'none' ;
		} 
	}
	
	// Show all the spans which contain the hyperlinks marked 'click to show', all of which are  of class 'show'
	for (var loop=0; loop<spans.length; loop++) {
		if (spans[loop].className == 'show') {
			// divs[loop].style.display = 'block';
			spans[loop].style.display =  '' ;
		} 
	}
	
	// Show the Expand-all link
	expandlink.style.display = '';
	//Hide the Contract all link
	contractlink.style.display = 'none';
}


function showhidespan(myelement,mychoice){
/*
 Show a span onmouseover, hide the span onmousout.
 First parameter is the element id, second is show/hide.
*/
var mychoice, myelement

if (mychoice=='show')
{
	if (document.getElementById(myelement))	{
			/*
			Different spans require different text to appear within them.
			*/
			if (myelement=='apologies') {
				document.getElementById(myelement).innerHTML="Apologies, this example is awaiting hypertext markup.";
			}	
			if (myelement=='ieee') {
				document.getElementById(myelement).innerHTML="*IEEE &amp; SPIE require a login and may request a charge to access their documents.";
			}	
		
			
			return;
	}
}

if (mychoice=='hide')
{
	if (document.getElementById(myelement))	{
			document.getElementById(myelement).innerHTML="&nbsp;";
			return;
	}
}

} // eof

--> 