// HeaderFooter 

function writeHeader(HTMLstr)
{
var HTMLstr = "";
var args = location.search.substr(4).split("?");
var BASE_URL = '';

if (location.host == 'cdse') {
	BASE_URL = 'http://cdse/';
} else if (location.host == 'clients.cubeworks.co.uk') {
	BASE_URL = 'http://clients.cubeworks.co.uk/cdse/';
} else if (location.host == 'www.cdse.org.uk') {
	BASE_URL = 'http://www.cdse.org.uk/';
} else {
	BASE_URL = '';
}


HTMLstr += "<div id='header'>";
HTMLstr += "<a name='topofpage'></a><br style='font-size:10pt'>";
HTMLstr += "<table width='760' class=header height='80'>";
HTMLstr += " <tr style='font-size:10pt'>";
HTMLstr += " <td class='headerRow' height='0' align='right' width='*'></td>";
HTMLstr += "   <td class='heading' height='0' valign='top' align='right' width='*'>";
HTMLstr += "   <img border='0' src='" + BASE_URL + "images/blank.gif' width='1' height='0' align='-5'><br>" + args + "</td></tr>";
HTMLstr += "</table>";
HTMLstr += "<table width='760' border='0' cellspacing='0' cellpadding='0' style='border-collapse: collapse' bordercolor='' height='16'>";
HTMLstr += " <tr><td height='3'></td></tr>";
HTMLstr += "</table> "; 
HTMLstr += "</div>";
document.writeln(HTMLstr);
}

function writeFooter(HTMLstr)
{
var HTMLstr = "";
var BASE_URL = "";
HTMLstr += "<div id='footer'>";
HTMLstr += "<table class=footer border='0' width='760' height='35' cellspacing='0' cellpadding='0' id='table1'>";
HTMLstr += "	<tr>";
HTMLstr += "		<td>&nbsp;</td>";
HTMLstr += "		<td class='footerRow' height='18' valign='middle' align='left' width='48'><a href='" + BASE_URL + "index.htm' class='footer'>Home</a></td>";
		
HTMLstr += "		<td td class='footerRow' height='18' valign='middle' align='center' width='8'>|</td>";
HTMLstr += "    <td class='footerRow' height='18' valign='middle' align='center' width='40'>";
HTMLstr += "    <font face='Verdana' size='1'> <a href='#topofpage' class='footer'>Top</a></font></td>";
HTMLstr += "    <td class='footerRow' height='18' valign='middle' align='center' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='middle' align='center' width='114'> ";
HTMLstr += "    <font face='Verdana' size='1'> <a href='" + BASE_URL + "info/related-sites.htm?400Related Sites' class='footer'>Related Sites</a></font></td> ";
HTMLstr += "    <td class='footerRow' height='18' valign='middle' align='center' width='8'>|</td> ";
HTMLstr += "    <td class='footerRow' height='18' valign='middle' align='center' width='94'> ";
HTMLstr += "    <font face='Verdana' size='1'> <a href='" + BASE_URL + "info/contact-us.htm?400Contact Us' class='footer'>Contact Us</a></font></td> ";
HTMLstr += "    <td class='footerRow' height='18' valign='middle' align='center' width='8'>|</td>";
HTMLstr += "  <td class='footerRow' height='18' valign='middle' align='center' width='76'> ";
HTMLstr += "   <font face='Verdana' size='1'> <a href='" + BASE_URL + "info/site-map.htm?400Site Map' class='footer'>Site Map</a></font></td> ";
HTMLstr += "		<td><a href='http://www.webartdesign.co.uk'>";
HTMLstr += "		<img border='0' src='" + BASE_URL + "images/blank.gif' alt='Site created by Web Art Design' title='Site created by Web Art Design' width='144' height='27' valign='top' align='right'></a></td>";
HTMLstr += "	</tr>";
HTMLstr += " </table><br>";
HTMLstr += "</div>";
document.writeln(HTMLstr);
}

function writeFooterCubeworks(HTMLstr)
{
var HTMLstr = "";
HTMLstr += "<div id='footer'>";
HTMLstr += "<table border='2' class='footer' width='100%'>";
HTMLstr += " <tr>";

HTMLstr += "   <td class='footerRow' height='18' valign='top' align='Left' width='461' colspan='13'>&nbsp;";
HTMLstr += "   </td>";
HTMLstr += "   <td class=footerRow height='36' valign='top' align='right' width='*' rowspan='2'>";

HTMLstr += " </tr>";
HTMLstr += " <tr>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='left' width='53'>";
HTMLstr += "   <a href='" + BASE_URL + "../index.htm' class='footer'>&nbsp;Home</a></td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='right' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='center' width='40'>";
HTMLstr += "   <font face='Verdana' size='1'> <a href='#topofpage' class='footer'>Top</a></font></td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='right' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='center' width='51'>";
HTMLstr += "   <font face='Verdana' size='1'> <a href='" + BASE_URL + "related-sites.htm' class='footer'>Links</a></font></td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='right' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='center' width='68'>";
HTMLstr += "   <font face='Verdana' size='1'> <a href='" + BASE_URL + "contact-us.htm' class='footer'>Contact</a></font></td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='right' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='center' width='77'>";
HTMLstr += "   <font face='Verdana' size='1'> <a href='#' class='footer' onkeypress=setActiveStyleSheet('second'); return false; onclick=setActiveStyleSheet('second'); return false;>Enlarged</a></font></td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='right' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='center' width='79'>";
HTMLstr += "   <font face='Verdana' size='1'> <a href='#' class='footer' onkeypress=setActiveStyleSheet('first'); return false; onclick=setActiveStyleSheet('first'); return false;>Standard</a></font></td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='right' width='8'>|</td>";
HTMLstr += "   <td class='footerRow' height='18' valign='top' align='center' width='75'>";
HTMLstr += "   <font face='Verdana' size='1'> <a href='" + BASE_URL + "sitemap.htm' class='footer'>Site Map</a></font></td>";
HTMLstr += " </tr>";
HTMLstr += "</table>";
HTMLstr += "</div>";
document.writeln(HTMLstr);
}
