// Adur Canoe Club website// JavaScript written by Alex Brown// October 08//Printer Friendly optionfunction isPrintFriendly(){	// this function returns TRUE if the page is printer friendly	// a printer friendly page has printfriendly=1 in its URL	var szAddress = window.location.href;	if( szAddress.indexOf("pfd=1") > 0 ) return true;	return false;}function addFriendlyOption(){	var szPrintFriend = "";	if( isPrintFriendly() == false )	{		szPrintFriend+= '<a href="'		if( window.location.href.indexOf("?") >= 0 ) {            szPrintFriend+=	window.location.href+"&pfd=1";		} else {			szPrintFriend+=	window.location.href+"?pfd=1";		}		szPrintFriend+= '" target="_blank">PRINT FRIENDLY</a>';	}	return szPrintFriend;}//used for randomising arrays	function randOrd(){ return (Math.round(Math.random())-0.5); }function WritePage( szPageTitle, szPageName ){	var szButton1 = "<img src=\"../graphics/blt.png\" border=\"0\">";	var szButton2 = "<img src=\"../graphics/bit2.png\" border=\"0\">";	var szButton3 = "<img src=\"../graphics/bit3.png\" border=\"0\">";	var szSECTION = "<img src=\"../graphics/section.png\" border=\"0\"><br>";	var szDocument = "<!-- HTML Automatically generated: Adur Canoe Club: Alexander Brown 2008-->";	var szNumber="";	szDocument += "<html><head><meta http-equiv=Content-Type content=\"text/html; charset=windows-1252\">";	if( szPageTitle !="" )	{		szDocument += "<title>Adur Canoe Club - " + szPageTitle + "</title>";	}	else	{		szDocument += "<title>Adur Canoe Club - " + szPageName + "</title>";	}	szDocument += "<link rel=STYLESHEET href=\"../acc.css\" Type=\"text/css\">";	szDocument += "</head>";	//print frinedly options	if( isPrintFriendly() )	{		szDocument += "<body topmargin=\"10\" bottommargin=\"10\" leftmargin=\"0\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" bgcolor=\"#5382a4\">";        document.write(szDocument);        return; 	} 	else	{		szDocument += "<body topmargin=\"0\" bottommargin=\"0\" leftmargin=\"0\" text=\"#000000\" link=\"#000000\" vlink=\"#000000\" bgcolor=\"#5382a4\"  background=\"../images/background.jpg\">";	}	//write header		szDocument+="<table height=116px width=780px cellspacing=0 border=0 cellpadding=0>";		szDocument+="<tr>";		szDocument+="<td align=left width=215px background=\"../images/menu-top-left.png\">";		szDocument+="<br><br><br>";		szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;";		szDocument+="<span style=\"font-size:13pt; font-family:Arial;\">";		szDocument+="<b>"		if( szPageTitle !="" )		{			szDocument+=szPageTitle;		}		else		{			szDocument+=szPageName;		}		szDocument+="</b>";		szDocument+="</span>";		szDocument+="</td>";		szDocument+="<td align=center width=545px background=\"../images/banner-top-main.png\">";	// banner images - randomly change	var images = new Array(				"../images/banner-top-image01.png",				"../images/banner-top-image02.png",				"../images/banner-top-image03.png",				"../images/banner-top-image04.png",				"../images/banner-top-image05.png",				"../images/banner-top-image06.png",				"../images/banner-top-image07.png",				"../images/banner-top-image08.png",				"../images/banner-top-image09.png",				"../images/banner-top-image10.png",				"../images/banner-top-image11.png",				"../images/banner-top-image12.png",				"../images/banner-top-image13.png",				"../images/banner-top-image14.png",				"../images/banner-top-image15.png"				 );				    images.sort( randOrd );				    szDocument+='<img src="'+images[0]+'" alt="Adur Canoe Club" />';    szDocument+='<img src="'+images[1]+'" alt="Adur Canoe Club" />';    szDocument+="<img src=\"../images/banner-top-middle.png\">";    szDocument+='<img src="'+images[2]+'" alt="Adur Canoe Club" />';    szDocument+='<img src="'+images[3]+'" alt="Adur Canoe Club" />';		szDocument+="<td width=20px background=\"../images/banner-top-right.png\">";		szDocument+="</td>";		szDocument+="</tr>";		szDocument+="</table>";	//Write menu		szDocument+="<table width=780px cellspacing=0 border=0 cellpadding=0>";		szDocument+="<tr>";		szDocument+="<td valign=top width=215px background=\"../images/menu-middle-left.png\">";		szDocument+="<div aling=\"left\">";	//menu contents	szDocument+=szSECTION;	if( szPageName == "Contents" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../contents/index.php\"><big>Contents</big></a><br></b>"		szDocument+=szSECTION;	if( szPageName == "News" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../news/news.htm\"><big>News</big></a><br></b>"		if( szPageName == "Slalom" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../news/slalom-news.htm\">Slalom news</a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Sessions" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../sessions/index.php\"><big>Sessions</big></a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Events" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../events/index.php\"><big>Events</big></a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Information" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../information/index.htm\"><big>Information</big></a><br></b>"	if( szPageName == "Location" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../information/location.htm\">Location</a><br></b>"	if( szPageName == "Outdoor Sessions" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../information/outdoor-sessions.htm\">Outdoor Sessions</a><br></b>"	if( szPageName == "Kayaking" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../information/kayaking.htm\">Kayaking</a><br></b>"	if( szPageName == "Open Canoeing" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../information/open-canoe.htm\">Open Canoeing</a><br></b>"	if( szPageName == "Awards" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../information/awards.htm\">Awards</a><br></b>"	if( szPageName == "Fees" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../information/fees.htm\">Fees</a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Contact" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../contact/index.htm\"><big>Contact</big></a><br></b>"	if( szPageName == "Committee" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../contact/committee.htm\">Committee</a><br></b>"	if( szPageName == "Members" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../contact/members.htm\">Members</a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Gallery" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../gallery/\"><big>Gallery</big></a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Documentation" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../documentation/index.htm\"><big>Documentation</big></a><br></b>"	if( szPageName == "Meeting Minutes" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/minutes.php\">Meeting Minutes</a><br></b>"	if( szPageName == "Constitution" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/constitution.htm\">Constitution</a><br></b>"	if( szPageName == "Rules" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/rules.htm\">Rules</a><br></b>"	if( szPageName == "Pool Rules" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/pool-rules.htm\">Pool Rules</a><br></b>"	if( szPageName == "Child Protection Policy" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/child-protection.htm\">Child Protection</a><br></b>"	if( szPageName == "Accident Procedure" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/accident-procedure.htm\">Accident Procedure</a><br></b>"	if( szPageName == "Guidelines" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/guidelines.htm\">Guidelines</a><br></b>"	if( szPageName == "Incident Reports" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../documentation/incident-reports.htm\">Incident Reports</a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Downloads" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../downloads/index.htm\"><big>Downloads</big></a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Links" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../links/\"><big>Links</big></a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Credits" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../credits/\"><big>Credits</big></a><br></b>"	szDocument+=szSECTION;	if( szPageName == "Secure" ) { szDocument+="<b>"  }	szDocument+="&nbsp;&nbsp;&nbsp;&nbsp;<a href=\"../secure/index.php\"><big>Committee Area</big></a><br></b>"	if( szPageName == "Secure" ) { szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../secure/club_notices.php\">Club Notice Editor</a><br>"  }	if( szPageName == "Secure" ) { szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../secure/committee_notices.php\">Committee Notice Editor</a><br>"  }	if( szPageName == "Secure" ) { szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../secure/sessions-edit.php\">Session Editor</a><br>"  }	if( szPageName == "Secure" ) { szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../secure/event-summary.php\">Event Manager</a><br>"  }	if( szPageName == "Secure" ) { szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../secure/minutes.php\">Minutes</A><BR>"  }	if( szPageName == "Secure" ) { szDocument+="&nbsp;&nbsp;&nbsp;&nbsp; &mdash; <a href=\"../secure/private-documents.php\">Private Documents</a><br>"  }	//End of menu contents.	szDocument+=szSECTION;		szDocument+="</div>";		szDocument+="</td>";//Print    document.write(szDocument)}//javascript to print footer (written by Alexander Brown 2008):function WriteFooter(){	var szDocument = "<!-- HTML Automatically generated: Adur Canoe Club: Alexander Brown 2008-->"	if( isPrintFriendly() == false )    {		//Close open table:		szDocument+="</td>";		szDocument+="</tr>";		szDocument+="</table>";		//Write footer:		szDocument+="<table width=780px height=60px cellspacing=0 border=0 cellpadding=0>";		szDocument+="<tr valign=bottom>";		szDocument+="<td width=215px background=\"../images/menu-left-bottom.png\">";		szDocument+="</td>";		szDocument+="<td align=right width=545px background=\"../images/banner-bottom-main.png\">";		szDocument+="<small>&nbsp;Website designed by Alexander Brown and Dan Hamblin, maintained by Jenny Westwell</small><!--<img src=\"../graphics/staticprogramming-small.png\">--> <BR><BR>";		szDocument+="</td>";		szDocument+="<td width=20px background=\"../images/banner-bottom-right.png\">";		szDocument+="</td>";		szDocument+="</tr>";		szDocument+="</table>";	}	document.write(szDocument)}/*		szDocument+=""*/