var rrPage

function GlobalNoMenus(heading, path) 
{
	content = '';
	content += '<center><img src="' + path + 'images/logo.gif" border="0" width="127" height="151" alt="HHCC"></center>';
	content += '<div align="center"><h2><font face="Arial, Helvetica, sans-serif">' + heading + '</font></h2></div>';
	document.write(content);
}

function GlobalMenus(heading, path) 
{
	content = '';
	content += '<center><img src="' + path + 'images/logo.gif" alt="HHCC"></center>';
	content += '<div align="center"><h1><font face="Arial, Helvetica, sans-serif">' + heading + '</font></h1></div>';
	content += '<ul id="menu">';
	content += '<li id="nav-1"><a href="' + path + 'contents.html">Home</a></li>';
	content += '<li id="nav-2"><a href="' + path + 'findus.html">Contact Us</a></li>';
	content += '<li id="nav-3"><a href="' + path + 'competitions.html">Open Competitions</a></li>';			
	content += '<li id="nav-4"><a href="' + path + 'gallery.html">Gallery</a></li>';
	content += '<li id="nav-5"><a href="' + path + 'links.html">Links</a></li>';
	content += '<li id="nav-6"><a href="' + path + 'events.html">Events</a></li>';
	content += '<li id="nav-7"><a href="' + path + 'members.html">Members Area</a>';
	content += '<ul id="subnav-7">';
	content += '<li><a href="' + path + 'newsletters.html">Newsletters</a></li>';
	content += '<li><a href="' + path + 'bylaws.html">Bylaws</a></li>';
	content += '<li><a href="' + path + 'orientation.html">Orientation</a></li>';
	content += '<li><a href="' + path + 'member-competitions.html">Competitions</a></li>';
	content += '<li><a href="' + path + 'financials.html">Financials</a></li>';
	content += '<li><a href="' + path + 'resources.html">Resources</a></li>';
	content += '<li><a href="' + path + 'helios/events/index.php">Calendar</a></li>';
	content += '</ul>';
	content += '</li>';
	content += '</ul>';
	document.write(content);
}

function doTooltip(e, msg) 
{
	if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
	Tooltip.show(e, msg);
}

function hideTip() 
{
	if ( typeof Tooltip == "undefined" || !Tooltip.ready ) return;
	Tooltip.hide();
}

function NewWindow(mypage, myname, w, h, scroll) 
{
	var winl = 1;
	var wint = 1;
	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+','
	win = window.open(mypage, myname, winprops)
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function pop(url, h, w, l, t, des) 
{
	poph = + h + 70
	popw = + w + 30
	var winl = (screen.width - w);
	var wint = (screen.height - h);
		
	disp = window.open("","pop","height=" + poph + ",width=" + popw + ",left=" + l + ",top=" + t + "");
	content = '<HTML>';
	content += '<TITLE>Acton Bethel CRC</TITLE>';
	content += '</HEAD>';
	content += '<BODY BGCOLOR="#FFFFFF" onBlur="self.close()">';
	content += '<FONT SIZE="2" FACE="arial,helvet">';
	content += '<CENTER><img src="' + url + '" height="' + h + '" width="' + w + '"></CENTER>';
	content += '<CENTER>' + des + '</CENTER>';
	content += '<CENTER><P ALIGN="RIGHT"><A HREF="#" onClick="self.close()"><FONT SIZE="1" FACE="verdana,geneva,arial,helvet"><B>close</B></A></CENTER>';
	content += '</FONT>';
	content += '</BODY></HTML>';
	disp.document.write(content);
	disp.document.close();
}

function popimg(url, w, h, photog, title) 
{
	popw = + w + 120
	poph = + h + 150
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	if (title != "") {
		poph = + h + 180;
	}
	disp = window.open("","pop","height=" + poph + ",width=" + popw + ",left=0,top=0");
	content = '<HTML>';
	content += '</HEAD>';
	content += '<body bgcolor="#336666" text="#FFFFFF" link="#FFFFFF" vlink="#CCCCCC" alink="#006666" onBlur="self.close()">';
	content += '<FONT SIZE="2" FACE="arial,helvet">';
	content += '<CENTER>';
	content += '<table border="0" cellpadding="30" vspace="20" hspace="20" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">';
	content += '<tr><td><center>';
	content += '<table align="center" background="' + url + '" border="0" cellpadding="0" cellspacing="0">';
	content += '<tr><td>';
	content += '<img src="../images/sp.gif" width="' + w + '" height="' + h + '" border="0" align="middle">';
	content += '</td></tr>';
	content += '</table>';
	content += '</center></td></tr>';
	content += '</table>';
	if (title != "") {
		content += '<font face="Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">&quot;' + title + '&quot;</font><br><br>';
	}
	content += '<font face="Arial, Helvetica, sans-serif" size="-1" color="#CCCCCC">Photo by: </font>';
	content += '<font face="Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">' + photog + '</font><br>';
	content += '<center>';
	content += '</BODY></HTML>';
	disp.document.write(content);
	disp.document.close();
}

function gallery(path, url, w, h, photog, title) 
{
	thisTn = new Image();
	thisImg = new Image();
	img = path + '/images/' + url + '.jpg';
	tn  = path + '/thumbnails/' + url + '-tn.jpg';
	thisTn.src=tn;
	thisImg.src=img;
	thisImg.width = w;
	thisImg.height = h;
	thisTn.width = w/4.5;
	thisTn.height = h/4.5
	content = '';
	content += '<td align="center"><font size="2" face="Arial, Helvetica, sans-serif">';
	content += '<table align="center" background="' + thisTn.src + '" border="1" cellpadding="0" cellspacing="0">';
	content += '<tr><td>';
	if (title != "") {
		content += '<A HREF="javascript:popimg(\'' + img + '\', \'' + thisImg.width + '\', \'' + thisImg.height + '\', \'' + photog + '\', \'' + title + '\')";><img src="../images/sp.gif" width="' + thisTn.width + '" height="' + thisTn.height + '" border="0" align="middle" onmouseover="doTooltip(event,\'' + title + '\')" onmouseout="hideTip()"></a>';
	} 
	else {
		content += '<A HREF="javascript:popimg(\'' + img + '\', \'' + thisImg.width + '\', \'' + thisImg.height + '\', \'' + photog + '\', \'' + title + '\')";><img src="../images/sp.gif" width="' + thisTn.width + '" height="' + thisTn.height + '" border="0" align="middle"></a>';
	}
	content += '</td></tr>';
	content += '</table>';
	content += '</font></td>';
	document.write(content);
}

function showPic(url, w, h) 
{
	thisImg = new Image();
	thisImg.src = url;
	thisImg.width = w;
	thisImg.height = h;
	content = '';
	content += '<table align="center" background="' + thisImg.src + '" border="0" cellpadding="0" cellspacing="0">';
	content += '<tr><td>';
	content += '<img src="../images/sp.gif" width="' + thisImg.width + '" height="' + thisImg.height + '" border="0"><br>';
	content += '</td></tr>';
	content += '</table>';
	document.write(content);
}

function header(name, label, path)
{
	content = '';
	content += '<body class="'+ name + '">';
	content += '<script>GlobalMenus("' + label + '","' + path + '")</script>';
	content += '<div id="' + name + '">';
	document.write(content);
}

function gallery_pop(url, w, h, photog, title) {
	popw = + w + 120
	poph = + h + 150
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	if (title != "") {
		poph = + h + 180;
	}
	disp = window.open("","pop","height=" + poph + ",width=" + popw + ",left=0,top=0");
	content = '<HTML>';
	content += '</HEAD>';
	content += '<body bgcolor="#336666" text="#FFFFFF" link="#FFFFFF" vlink="#CCCCCC" alink="#006666" onBlur="self.close()">';
	content += '<FONT SIZE="2" FACE="arial,helvet">';
	content += '<CENTER>';
	content += '<table border="0" cellpadding="30" vspace="20" hspace="20" bordercolorlight="#FFFFFF" bordercolordark="#FFFFFF" bgcolor="#FFFFFF">';
	content += '<tr><td><center>';
	content += '<table align="center" background="' + url + '" border="0" cellpadding="0" cellspacing="0">';
	content += '<tr><td>';
	content += '<img src="../images/sp.gif" width="' + w + '" height="' + h + '" border="0" align="middle">';
	content += '</td></tr>';
	content += '</table>';
	content += '</center></td></tr>';
	content += '</table>';
	if (title != "") {
		content += '<font face="Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">&quot;' + title + '&quot;</font><br><br>';
	}
	content += '<font face="Arial, Helvetica, sans-serif" size="-1" color="#CCCCCC">Photo by: </font>';
	content += '<font face="Arial, Helvetica, sans-serif"><b><font color="#FFFFFF">' + photog + '</font><br>';
	content += '<center>';
	content += '</BODY></HTML>';
	disp.document.write(content);
	disp.document.close();
}

function gallery_tn(imgpath, url, w, h, photog, title) {
	thisTn = new Image();
	thisImg = new Image();
	img = imgpath + '/images/' + url + '.jpg';
	tn  = imgpath + '/thumbnails/' + url + '-tn.jpg';
	thisTn.src=tn;
	thisImg.src=img;
	thisImg.width = w;
	thisImg.height = h;
	thisTn.width = w/4.5;
	thisTn.height = h/4.5
	content = '';
	content += '<td align="center"><font size="2" face="Arial, Helvetica, sans-serif">';
	content += '<table align="center" background="' + thisTn.src + '" border="1" cellpadding="0" cellspacing="0">';
	content += '<tr><td>';
	if (title != "") {
		content += '<A HREF="javascript:gallery_pop(\'' + img + '\', \'' + thisImg.width + '\', \'' + thisImg.height + '\', \'' + photog + '\', \'' + title + '\')";><img src="../images/sp.gif" width="' + thisTn.width + '" height="' + thisTn.height + '" border="0" align="middle" onmouseover="doTooltip(event,\'' + title + '\')" onmouseout="hideTip()"></a>';
	} 
	else {
		content += '<A HREF="javascript:gallery_pop(\'' + img + '\', \'' + thisImg.width + '\', \'' + thisImg.height + '\', \'' + photog + '\', \'' + title + '\')";><img src="../images/sp.gif" width="' + thisTn.width + '" height="' + thisTn.height + '" border="0" align="middle"></a>';
	}
	content += '</td></tr>';
	content += '</table>';
	content += '</font></td>';
	document.write(content);
}

function MemberMenus(path) 
{
	content = '';
	content += '<ul id="menu">';
//	content += '<li id="nav-1"><a href="' + path + 'contents.html">Contents</a></li>';
	content += '<li id="nav-2"><a href="' + path + 'introduction.html">Introduction</a></li>';
	content += '<li id="nav-21"><a href="' + path + 'history.html">History</a></li>';
//	content += '<li id="nav-3"><a href="' + path + 'friesland.html">Friesland</a></li>';
//	content += '<li id="nav-4"><a href="' + path + 'south-africa.html">South Africa</a></li>';
	content += '<li id="nav-5"><a href="' + path + 'kuipers.html">Kuipers</a></li>';
	content += '<li id="nav-6"><a href="' + path + 'pretorius.html">Pretorius</a></li>';
	content += '<li id="nav-7"><a href="' + path + 'boshoff.html">Boshoff</a></li>';
	content += '<li id="nav-8"><a href="' + path + 'streutker.html">Streutker</a></li>';
	content += '<li id="nav-9"><a href="' + path + 'olde.html">Olde</a></li>';
	content += '<li id="nav-10"><a href="' + path + 'koekoek.html">Koekoek</a></li>';
	content += '<li id="nav-11"><a href="' + path + 'brouwer.html">Brouwer</a></li>';
	content += '</ul>';
	document.write(content);
}

function showGenLine2(c1,c2,c3,c4) 
{
	content = '';
	content += '<tr>';
	if (typeof c3 == "undefined")
	{
		if (c1 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c1 + '</td>';
		if (c2 == '')
			content += '<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			if (c1=='')
				content += '<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif"><b>' + c2 + '</b></td>';
			else
				content += '<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif">' + c2 + '</td>';
	}
	else
	{
		if (c1 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c1 + '</td>';
		if (c2 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			if (c1=='')
				content += '<td><font size="2" face="Arial, Helvetica, sans-serif"><b>' + c2 + '</b></td>';
			else
				content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c2 + '</td>';
		if (typeof c4 == "undefined")
			content += '<td width="200"><center><img src="' + c3 + '" border="0"></center></td>';
		else
			content += '<td width="' + c4 +'"><center><img src="' + c3 + '" border="0"></center></td>';
	}
	content += '</tr>';
	document.write(content);
}

function showGenLine3(c1,c2,c3,c4,c5) {
	content = '';
	content += '<tr>';
	if (typeof c4 == "undefined")
	{
		if (c1 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c1 + '</td>';
		if (c2 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c2 + '</td>';
		if (c3 == '')
			content += '<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			if ((c1=='') && (c2==''))
				content += '<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif"><b>' + c3 + '</b></td>';
			else
				content += '<td colspan="2"><font size="2" face="Arial, Helvetica, sans-serif">' + c3 + '</td>';
	}
	else
	{
		if (c1 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c1 + '</td>';
		if (c2 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c2 + '</td>';
		if (c3 == '')
			content += '<td><font size="2" face="Arial, Helvetica, sans-serif">&nbsp;</td>';
		else
			if ((c1=='') && (c2==''))
				content += '<td><font size="2" face="Arial, Helvetica, sans-serif"><b>' + c3 + '</b></td>';
			else
				content += '<td><font size="2" face="Arial, Helvetica, sans-serif">' + c3 + '</td>';
		if (typeof c5 == "undefined")
			content += '<td width="200"><center><img src="' + c4 + '" border="0"></center></td>';
		else
			content += '<td width="' + c5 +'"><center><img src="' + c4 + '" border="0"></center></td>';
	}
	content += '</tr>';
	document.write(content);
}
