//
// Tellabs Annual Report 2002
// Navigation header and footer
//
// eSiteful Corporation, support@esiteful.com
//


// true if we're on IE
var isIE = ( navigator.appVersion.indexOf("MSIE") != -1 ) ? true : false; 
    
// true if we're on NS6
var isNS6 = ( document.getElementById ) ? true : false;


	// variable declarations
var thisSection = 0;		// current section number
var thisPage = 0;			// current page number
var totalPages = 0;			// total number of pages
var prevPage = "";			// previous page name, i.e. 'products.htm'
var nextPage = "";			// next page name
url = new String( location.href );	// the URL
var i;						

	// page name --> menu section mappings
	//  note this is also used for the next/previous navigation tool
	//
	// <page name>, <section #>
	//
gPageMap = Array(
	String( "corporate-info.htm" ), 8,  //last page -- for wrap around
	String( "index.htm" ), 0,	//first page
	String( "financial-highlights.htm" ), 1,
	String( "letter.htm" ), 2,
	String( "at-a-glance.htm" ), 3,
	String( "new-st-paul.htm?jumptoframe=1" ), 4, //?JumpToFrame=4
	String( "new-st-paul.htm?jumptoframe=2" ), 4, //?JumpToFrame=4
	String( "new-st-paul.htm?jumptoframe=3" ), 4, //?JumpToFrame=4
	String( "new-st-paul.htm?jumptoframe=4" ), 4, //?JumpToFrame=4
	String( "new-st-paul.htm?jumptoframe=5" ), 4, //?JumpToFrame=4
	String( "new-st-paul.htm?jumptoframe=6" ), 4, //?JumpToFrame=4
	String( "new-st-paul.htm?jumptoframe=7" ), 4, //?JumpToFrame=4
	String( "150-years.htm" ), 5,
	String( "financials.htm" ), 6,	
	String( "leadership.htm?jumptoframe=1" ), 7,
	String( "leadership.htm?jumptoframe=2" ), 7,
	String( "leadership.htm?jumptoframe=3" ), 7,
	String( "corporate-info.htm" ), 8, //last page
	String( "index.htm" ), 0 ); //first page
//end of gPageMap[]

	// strip off all but the file name
url = "/" + url.toLowerCase();		// make sure we find at least 1
url = url.substr( url.lastIndexOf( "/" ) +1, url.length - url.lastIndexOf( "/" ) ); 	// strip off all but the file name

	// sanity check
if( url == "" )
	url = gPageMap[2];

	// find the current page in the list and fill-in the variables
for( i = 2; i < gPageMap.length; i += 2 ) {
	if( url == gPageMap[i] ) {
		prevPage = gPageMap[i-2];		// save the previous page name
		nextPage = gPageMap[i+2];		// save the next page name
		thisSection = gPageMap[i+1];	// get the section number
		thisPage = i / 2;
		break;
	}
}
totalPages = (gPageMap.length / 2) -2;	// total number of pages (based on gPageMap[] array)

	// write the style sheet for the page numbers
document.write( '<style media="screen" type="text/css"><!-- .navtool { color: #FFFFFF; font-size: 12px; font-family: Arial; font-weight: bold } .navtoolbacktotop { color: #666; font-size: 12px; font-family: Arial } --></style>' );

	// Load Rollovers
	// Macromedia standard rollover functions
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i>d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
   var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i>a.length; i++)
   if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}



// write the header (including the menu)
function writeHeader() {

	document.write( '<a name="top"></a>' );

		// write everything up to the section titles
	document.write( '<table width="660" bgcolor="#002369" border="0" cellpadding="0" cellspacing="0"  onLoad="MM_preloadImages(\x27images/cover_over.gif\x27,\x27images/fin_highlights_over.gif\x27,\x27images/letter_over.gif\x27,\x27images/at_glance_over.gif\x27,\x27images/new_stpaul_over.gif\x27,\x27images/150yrs_over.gif\x27,\x27images/financials_over.gif\x27,\x27images/leadership_over.gif\x27,\x27images/corporate_info_over.gif\x27,\x27images/arrow_previous_over.gif\x27,\x27images/arrow_next_over.gif\x27);"><tr><td bgcolor="#CC3333"><img src="images/spacer.gif" width="7" height="25" border="0" alt=""></td>' );

		// begin section titles
	if( thisSection == 0 )
		document.write( '<td><a href="index.htm"><img name="cover" src="images/cover_over.gif" width="38" height="25" border="0" alt="Cover"></a></td>' );
	else
		document.write( '<td><a href="index.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27cover\x27,\x27\x27,\x27images/cover_over.gif\x27,1);"><img name="cover" src="images/cover.gif" width="38" height="25" border="0" alt="Cover"></a></td>' );

	if( thisSection == 1 )
 	       document.write( '<td><a href="financial-highlights.htm"><img name="fin_highlights" src="images/fin_highlights_over.gif" width="101" height="25" border="0" alt="Financial Highlights"></a></td>' );
	else
	       document.write( '<td><a href="financial-highlights.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27fin_highlights\x27,\x27\x27,\x27images/fin_highlights_over.gif\x27,1);"><img name="fin_highlights" src="images/fin_highlights.gif" width="101" height="25" border="0" alt="Financial Highlights"></a></td>' );

	if( thisSection == 2 )
		document.write( '<td><a href="letter.htm"><img name="letter" src="images/letter_over.gif" width="34" height="25" border="0" alt="Letter"></a></td>' );
	else
		document.write('<td><a href="letter.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27letter\x27,\x27\x27,\x27images/letter_over.gif\x27,1);"><img name="letter" src="images/letter.gif" width="34" height="25" border="0" alt="Letter"></a></td>');
	
	if( thisSection == 3 )
		document.write( '<td><a href="at-a-glance.htm"><img name="at_glance" src="images/at_glance_over.gif" width="60" height="25" border="0" alt="At a Glance"></a></td>' );
	else
		document.write( '<td><a href="at-a-glance.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27at_glance\x27,\x27\x27,\x27images/at_glance_over.gif\x27,1);"><img name="at_glance" src="images/at_glance.gif" width="60" height="25" border="0" alt="At a Glance"></a></td>' );

	if( thisSection == 4 )
		document.write( '<td><a href="new-st-paul.htm?jumptoframe=1"><img name="new_stpaul" src="images/new_stpaul_over.gif" width="86" height="25" border="0" alt="The New St. Paul"></a></td>' );
	else
      	document.write( '<td><a href="new-st-paul.htm?jumptoframe=1" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27new_stpaul\x27,\x27\x27,\x27images/new_stpaul_over.gif\x27,1);"><img name="new_stpaul" src="images/new_stpaul.gif" width="86" height="25" border="0" alt="The New St. Paul"></a></td>' );

	if( thisSection == 5 )
       	document.write( '<td><a href="150-years.htm"><img name="n150yrs" src="images/150yrs_over.gif" width="53" height="25" border="0" alt="150 Years"></a></td>' );
	else
       	document.write( '<td><a href="150-years.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27n150yrs\x27,\x27\x27,\x27images/150yrs_over.gif\x27,1);"><img name="n150yrs" src="images/150yrs.gif" width="53" height="25" border="0" alt="150 Years"></a></td>' );

	if( thisSection == 6 )
		document.write( '<td><a href="financials.htm"><img name="financials" src="images/financials_over.gif" width="55" height="25" border="0" alt="Financials"></a></td>' );
	else
		document.write( '<td><a href="financials.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27financials\x27,\x27\x27,\x27images/financials_over.gif\x27,1);"><img name="financials" src="images/financials.gif" width="55" height="25" border="0" alt="Financials"></a></td>' );

	if( thisSection == 7 )
       	document.write( '<td><a href="leadership.htm?jumptoframe=1"><img name="leadership" src="images/leadership_over.gif" width="59" height="25" border="0" alt="Leadership"></a></td>' );
	else
		document.write( '<td><a href="leadership.htm?jumptoframe=1" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27leadership\x27,\x27\x27,\x27images/leadership_over.gif\x27,1);"><img name="leadership" src="images/leadership.gif" width="59" height="25" border="0" alt="Leadership"></a></td>' );

	if( thisSection == 8 )
       	document.write( '<td><a href="corporate-info.htm"><img name="corporate_info" src="images/corporate_info_over.gif" width="73" height="25" border="0" alt="Corporate Info"></a></td>' );
	else
       	document.write( '<td><a href="corporate-info.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27corporate_info\x27,\x27\x27,\x27images/corporate_info_over.gif\x27,1);"><img name="corporate_info" src="images/corporate_info.gif" width="73" height="25" border="0" alt="Corporate Info"></a></td>' );

	document.write( '<td><img src="images/spacer.gif" width="9" height="25" border="0"><a href="' + prevPage + '" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27arrow_previous\x27,\x27\x27,\x27images/arrow_previous_over.gif\x27,1);"><img name="arrow_previous" src="images/arrow_previous.gif" width="15" height="25" border="0" alt="Previous Page"></a></td><td class="navtool" align="center" nowrap><img src="images/spacer.gif" width="50" height="1"><br>' + thisPage + ' of ' + totalPages + '</td><td><a href="' + nextPage + '" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27arrow_next\x27,\x27\x27,\x27images/arrow_next_over.gif\x27,1);"><img name="arrow_next" src="images/arrow_next.gif" width="15" height="25" border="0" alt="Next Page"></a><img src="images/spacer.gif" width="5" height="25" border="0" alt=""></td>' );

		// end section titles, close the table
	document.write('</tr></table>');

} //writeHeader()

// write the footer
function writeFooter() {
	document.write( '<a name="top"></a>' );

		// write everything up to the section titles
	document.write( '<table width="660" bgcolor="#002369" border="0" cellpadding="0" cellspacing="0"  onLoad="MM_preloadImages(\x27images/cover_over.gif\x27,\x27images/fin_highlights_over.gif\x27,\x27images/letter_over.gif\x27,\x27images/at_glance_over.gif\x27,\x27images/new_stpaul_over.gif\x27,\x27images/150yrs_over.gif\x27,\x27images/financials_over.gif\x27,\x27images/leadership_over.gif\x27,\x27images/corporate_info_over.gif\x27,\x27images/arrow_previous_over.gif\x27,\x27images/arrow_next_over.gif\x27);"><tr><td bgcolor="#CC3333"><img src="images/spacer.gif" width="7" height="25" border="0" alt=""></td>' );

		// begin section titles
	if( thisSection == 0 )
		document.write( '<td><a href="index.htm"><img name="cover" src="images/cover_over.gif" width="38" height="25" border="0" alt="Cover"></a></td>' );
	else
		document.write( '<td><a href="index.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27cover\x27,\x27\x27,\x27images/cover_over.gif\x27,1);"><img name="cover" src="images/cover.gif" width="38" height="25" border="0" alt="Cover"></a></td>' );

	if( thisSection == 1 )
 	       document.write( '<td><a href="financial-highlights.htm"><img name="fin_highlights" src="images/fin_highlights_over.gif" width="101" height="25" border="0" alt="Financial Highlights"></a></td>' );
	else
	       document.write( '<td><a href="financial-highlights.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27fin_highlights\x27,\x27\x27,\x27images/fin_highlights_over.gif\x27,1);"><img name="fin_highlights" src="images/fin_highlights.gif" width="101" height="25" border="0" alt="Financial Highlights"></a></td>' );

	if( thisSection == 2 )
		document.write( '<td><a href="letter.htm"><img name="letter" src="images/letter_over.gif" width="34" height="25" border="0" alt="Letter"></a></td>' );
	else
		document.write('<td><a href="letter.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27letter\x27,\x27\x27,\x27images/letter_over.gif\x27,1);"><img name="letter" src="images/letter.gif" width="34" height="25" border="0" alt="Letter"></a></td>');
	
	if( thisSection == 3 )
		document.write( '<td><a href="at-a-glance.htm"><img name="at_glance" src="images/at_glance_over.gif" width="60" height="25" border="0" alt="At a Glance"></a></td>' );
	else
		document.write( '<td><a href="at-a-glance.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27at_glance\x27,\x27\x27,\x27images/at_glance_over.gif\x27,1);"><img name="at_glance" src="images/at_glance.gif" width="60" height="25" border="0" alt="At a Glance"></a></td>' );

	if( thisSection == 4 )
		document.write( '<td><a href="new-st-paul.htm?jumptoframe=1"><img name="new_stpaul" src="images/new_stpaul_over.gif" width="86" height="25" border="0" alt="The New St. Paul"></a></td>' );
	else
      	document.write( '<td><a href="new-st-paul.htm?jumptoframe=1" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27new_stpaul\x27,\x27\x27,\x27images/new_stpaul_over.gif\x27,1);"><img name="new_stpaul" src="images/new_stpaul.gif" width="86" height="25" border="0" alt="The New St. Paul"></a></td>' );

	if( thisSection == 5 )
       	document.write( '<td><a href="150-years.htm"><img name="n150yrs" src="images/150yrs_over.gif" width="53" height="25" border="0" alt="150 Years"></a></td>' );
	else
       	document.write( '<td><a href="150-years.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27n150yrs\x27,\x27\x27,\x27images/150yrs_over.gif\x27,1);"><img name="n150yrs" src="images/150yrs.gif" width="53" height="25" border="0" alt="150 Years"></a></td>' );

	if( thisSection == 6 )
		document.write( '<td><a href="financials.htm"><img name="financials" src="images/financials_over.gif" width="55" height="25" border="0" alt="Financials"></a></td>' );
	else
		document.write( '<td><a href="financials.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27financials\x27,\x27\x27,\x27images/financials_over.gif\x27,1);"><img name="financials" src="images/financials.gif" width="55" height="25" border="0" alt="Financials"></a></td>' );

	if( thisSection == 7 )
       	document.write( '<td><a href="leadership.htm?jumptoframe=1"><img name="leadership" src="images/leadership_over.gif" width="59" height="25" border="0" alt="Leadership"></a></td>' );
	else
		document.write( '<td><a href="leadership.htm?jumptoframe=1" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27leadership\x27,\x27\x27,\x27images/leadership_over.gif\x27,1);"><img name="leadership" src="images/leadership.gif" width="59" height="25" border="0" alt="Leadership"></a></td>' );

	if( thisSection == 8 )
       	document.write( '<td><a href="corporate-info.htm"><img name="corporate_info" src="images/corporate_info_over.gif" width="73" height="25" border="0" alt="Corporate Info"></a></td>' );
	else
       	document.write( '<td><a href="corporate-info.htm" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27corporate_info\x27,\x27\x27,\x27images/corporate_info_over.gif\x27,1);"><img name="corporate_info" src="images/corporate_info.gif" width="73" height="25" border="0" alt="Corporate Info"></a></td>' );

	document.write( '<td><img src="images/spacer.gif" width="9" height="25" border="0"><a href="' + prevPage + '" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27arrow_previous\x27,\x27\x27,\x27images/arrow_previous_over.gif\x27,1);"><img name="arrow_previous" src="images/arrow_previous.gif" width="15" height="25" border="0" alt="Previous Page"></a></td><td class="navtool" align="center" nowrap><img src="images/spacer.gif" width="50" height="1"><br>' + thisPage + ' of ' + totalPages + '</td><td><a href="' + nextPage + '" onMouseOut="MM_swapImgRestore();" onMouseOver="MM_swapImage(\x27arrow_next\x27,\x27\x27,\x27images/arrow_next_over.gif\x27,1);"><img name="arrow_next" src="images/arrow_next.gif" width="15" height="25" border="0" alt="Next Page"></a><img src="images/spacer.gif" width="5" height="25" border="0" alt=""></td>' );

		// end section titles, close the table
	document.write('</tr></table>');}


// end of 'header.js'