var pathPrefix="";




function SetPathPrefix( prefix )




{




	pathPrefix = prefix;




}





function ShowTitleLogo()




{




	document.writeln( '<img src="'+pathPrefix+'Images/TitleLogo.GIF">' );




}





function ShowLogoHeader( pgName )




{





	document.writeln( '<table width="726" height="146" usegridx usegridy showgridx showgridy gridx="200" gridy="200" border="0" cellpadding="0" cellspacing="0" bgcolor="#d7d5d7">');





	document.writeln('<tr height="145">');




	document.write('<td width="400" height="145" valign="top" align="left" xpos="0"><img src="' );





	document.write( pathPrefix );




	document.writeln( 'Images/HeaderImage1.jpg" width="400" height="145" border="0"></td>');





	document.write('<td width="200" height="145" valign="top" align="left" xpos="400"><img src="' );





	document.write( pathPrefix );




	document.write( 'Images/Header');




	document.write(pgName);




	document.write('.jpg" width="200" height="145" border="0"></td>');




	document.write('<td width="126" height="145" valign="top" align="left" xpos="600"><img src="' );





	document.write( pathPrefix );





	document.write( 'Images/HeaderImage3.jpg" width="124" height="145" border="0"></td>');





	document.writeln('</tr></table>');




}





var foundPage=0;
var curPage="";
var newBrowser = 1;
function ShowNavLink( pName, pLink, level )
{
	if( newBrowser )
		document.write('<tr class="navbox"><td>');
	else
		document.write('<tr><td>');
		myPrefix = pathPrefix;
		
	document.write('<a href="');
	document.write( myPrefix+pLink );
	document.write('">');
	document.write('&nbsp;');
	for( var i=0;i<level;i++ )
		document.write( '&nbsp;&nbsp;');
	document.write( pName );
	if( foundPage == 0 ) {
		var idx = pLink.indexOf( ".", 0 );
		var stIdx = pLink.indexOf( "/", 0 );
		stIdx++;
		var baseName;
		if( idx == -1 )
			baseName = pLink;
		else
			baseName = pLink.substring( stIdx, idx );
		if( curPage  == baseName ) {
			document.write('&nbsp;&gt;&gt;');
			foundPage = 1;
		}
	}
	document.write('</a></td></tr>\n');
}
function ShowNavBox( high, wid )
{
	document.write('<tr height="');
	document.write(high);
	document.write('">');
	document.write('<td class="navbox" width="');
	document.write(wid);
	document.write('" height="');
	document.write(high);
	document.write('" align="left" xpos="0" content valign="top" csheight="');
	document.write('">');
}

function ShowSideNav( pgName, wid )




{




	var ver = navigator.appVersion.substring( 0,1 );
	if( (navigator.appName == 'Netscape' && ver >= 6) || (navigator.appName == 'Microsoft Internet Explorer' && ver >= 4) )
		newBrowser = 1;
	else
		newBrowser = 0;
	
	foundPage = 0;
	curPage = pgName;
	document.write('<table width="');
	document.write(wid);
	document.write('" gridx="5" gridy="5" border="0" cellpadding="0" cellspacing="0" align="left">');

	ShowNavLink( "HOME", "index.html", 0 );
	ShowNavLink( "Links", "Links.html", 0 );
	ShowNavLink( "Contact Us", "ContactUs.html", 0 );
	ShowNavLink( "Forum", "phpBB2/index.php", 0 );
	ShowNavLink( "Speak Out!", "SpeakOut.php", 0 );
	ShowNavLink( "Media Letter", "Media.html", 0 );
	ShowNavLink( "County Letter", "County.html", 0 );
	ShowNavLink( "Maps", "Maps.html", 0 );
	ShowNavLink( "Pictures", "Pictures.html", 0 );
	ShowNavLink( "MntForest Case", "MFHA.html", 0 );
	
	document.write( '</table>\n' );
}





function ShowFooter()
{
	document.writeln( '<table class="copywrite" cellpadding="0" align="center" cellspacing="2" width="560">' );
	document.write( '<tr><td align="center" valign="bottom"><a href="' );
	document.write( pathPrefix );
	document.write( 'index.html" title="Home Page">Home</a> | ' );
	document.write( pathPrefix );
	document.write( ' <a href="' );
	document.write( pathPrefix );
	document.write( 'ContactUs.html" title="Contacts">Contact Us</a>' );
	document.write( ' | <a href="mailto:webmaster@aeisecure.com">Webmaster</a>' );
	document.write( '</td></tr><tr><td align="center" valign="bottom" class="copywrite">' );
	document.write( '<div align="center">	<p class="copywrite">&nbsp;&copy;' );
	document.write( ' 2002 Affordable Electronics Inc.&nbsp;' );
	document.write( 'All rights reserved&nbsp;&nbsp;&nbsp;' ); //<a href="' );
//	document.write( pathPrefix );
//	document.write( 'TermsOfUse.html">Terms of Use</a></p>' );
	document.write( '</p>' );
	document.write( '</div></td></tr></table>' );
}






//******************** Cookies ********************************





var cookies = new Object();





function AddCookie( cName, cVal, cExp, cPath )




{




	var cStr = cName+'='+cVal;




	if( cExp > '' )




		cStr += '; expires='+cExp;




	if( cPath > '' )




		cStr += '; path='+cPath;




	document.cookie = cStr;




}









function DeleteCookie( cName, cPath )




{




	var exp = new Date();




	exp.setYear( 1970 );
	var cStr = '; expires='+exp;

	if( cPath > '' )
		cStr += '; path='+cPath;
	
	document.cookie = cName+'=deleted'+cStr;




	document.cookie = cName+cStr;




}





function ExtractCookies()




{




	var name, value;




	var beginning, middle, end;





	for( name in cookies ) {




		// if there are currently entries in cookies, get rid of them




		cookies = new Object();




		break;




	}




	beginning = 0;		// start at beginning of cookie string




	while( beginning < document.cookie.length ) {




		// find the next equal sign




		middle = document.cookie.indexOf( '=', beginning );




		// find next semicolon




		end = document.cookie.indexOf( ';', beginning );




		if( end == -1 )	// if no semicolon, then this is last cookie




			end = document.cookie.length;




		// if no value, then blank its value




		if( (middle > end) || (middle == -1) ) {




			name = document.cookie.substring( beginning, end );




			value = "";




		}




		else {




			// extract the name and value




			name = document.cookie.substring( beginning, middle );




			value = document.cookie.substring( middle+1, end );




		}




		cookies[name] = unescape( value );




		beginning = end+2;		// prepare for next cookie in string




	}




}





function ShowCookies()




{




//	document.writeln( "Cookies String="+document.cookie+"<br>" );




	var name;




	for( name in cookies )




		document.writeln( name+"="+cookies[name]+'<br>' );




}

