var pathPrefix="";




function SetPathPrefix( prefix )




{




	pathPrefix = prefix;




}





function ShowTitleLogo()
{
	document.writeln( '<img src="'+pathPrefix+'images/HeadLogo.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>');
	document.write('<a href="');
	document.write( pathPrefix+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');
//	document.write('<br></a>');
}
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('">');
}

//var minimized = 0;

function ShowSideNav( pgName, wid )






{






	wid = 130;






//	if( minimized ) {






//		document.write( '<img src="Images/FlagIcon.gif">' );






//	}






	var ver = navigator.appVersion.substring( 0,1 );
//	document.writeln( ver );
	if( (navigator.appName == 'Netscape' && ver >= 6) || (navigator.appName == 'Microsoft Internet Explorer' && ver >= 4) )
		newBrowser = 1;
	else
		newBrowser = 0;

	//document.writeln( "Browser="+navigator.appName+" Version="+navigator.appVersion );
	
	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( "Books", "Books.html", 0 );
	ShowNavLink( "Tapes", "Tapes.html", 0 );

	ShowNavLink( "Calendar", "calendar.php", 0 );
	ShowNavLink( "About Us", "Info.html", 0 );
	ShowNavLink( "Services", "Services.html", 0 );
	ShowNavLink( "Links", "LinksPg.html", 0 );
	
	ShowNavLink( "EStore", "Products.php", 0 );

//	ShowNavLink( "", "", 0 );
	
//	ShowNavLink( "Downloads/Forms", "Downloads.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> | <a href="' );
	document.write( pathPrefix );
	document.write( 'Info.html" title="About Us">About Us</a>' );
	document.write( ' | <a href=mailto:webmaster@reflectingpond.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 The Reflecting Pond&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( '</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>' );






}

