<!--
function tmtC_stopErrors() {
return true;
}
//if(location.host=="localhost" || location.host=="localhost:81"|| location.protocol=="file:")
if(location.protocol=="file:")
{
window.onerror = tmtC_stopErrors;
}

function loseFocus(){}


/*************************************************************************************************************
DEFINE CLIENT BROWSER & VARIABLES
*************************************************************************************************************/
var isNS4 = (document.layers && !document.getElementById)? true : false;
var isIE4 = (document.all && !document.getElementById) ? true : false;
var isIE5 = (document.all && document.getElementById) ? true : false;
var isNS6 = (!document.all && document.getElementById) ? true : false;
var isIE = (document.all && document.getElementById) ? true : false;
var isDOM=(isIE4 || isIE5 || isNS6)
if (document.layers && navigator.appName.indexOf('Netscape') != -1)
	{
	var thisbrowser = 'Netscape';
	tdHeight=(window.innerHeight-153);
	}

if (document.getElementById && navigator.appName=="Netscape")
	{
	var thisbrowser = "NS6";
	tableHeight="";//100.1%";
	tdHeight=(window.innerHeight-153)
	document.write('<link rel="stylesheet" href="style/'+obaseHref+'NS6style.css" type="text/css">');
	}


if (navigator.appName.indexOf('Microsoft') != -1)
	{
	var thisbrowser = 'IE';
	tdHeight='100%';
	document.write('<link rel="stylesheet" href="style/'+obaseHref+'IEstyle.css" type="text/css">');
	}

var thisversion=(navigator.userAgent);

	var scriptBooks=new Array();
	var thisArea='1';
	var thisPage='1';
	var args = new Object();
    var pages=new Array();
	var myvar=new Array();
	var query = location.search.substring(1);  // Get query string.
    var pairs = query.split("&");              // Break at & ambersand.
    for(var i = 0; i < pairs.length; i++) 
		{
		var pos = pairs[i].indexOf('=');       // Look for "name=value".
			if (pos == -1) continue;               // If not found, skip.
			var argname = pairs[i].substring(0,pos);  // Extract the name.
			myvar[i] = pairs[i].substring(pos+1);
			var value = pairs[i].substring(pos+1); // Extract the value.
			pages[i]=i;
			args[argname] = unescape(value);          // Store as a property.
    		if(i==0)
				{
				thisArea=value;
				}
			else
				{
				thisPage=value;
				}
		}

var trappedArea=thisArea;
var otrapPage=thisPage;
var areanumber=1;


//	START	IF ONLY AN AREA AND NO PAGE, OR, THE DEFAULT INDEX HAS BEEN CALLED 
if(thisPage=='')var thisPage='1'	
//if(location.search=='')location.href='index.htm?index=1&page=welcome';
//index=content_management&page=jsdbase'//var areanumber=4
//	END		IF ONLY AN AREA AND NO PAGE, OR, THE DEFAULT INDEX HAS BEEN CALLED 

if(location.protocol!="file:")
{
if(isNaN(thisArea))
	{
	for(i=1;i<IndexRecordArea.length;i++)
		{
		if(thisArea==IndexRecordArea[i])
			{
			areanumber=i;
			}
		}
	}
thisArea=areanumber;
}else{areanumber=thisArea}

var jsDisplayTitle='';
var trappedPage=(thisPage);
var docLoaded=false;
var opageType='none'
var odisplay=false;
var tableHeight="100%";
var cellHeight="100%"
var myLink;
var validPage=false;
var ShowtrappedPage=trappedPage.replace(/_/g, " ");
var sitemap=0;

var message="This template was created for the ©JSdBase Web Builder CMS    \nContent Management System\n\n\n"+
"C r e d i t s:\n-----------------------------------------------------------------------------------------\n"+
"WebSite Design		                : Nigel Francois       \n"+
"Html Interface development     	: Nigel Francois       \n"+
"Javascript Database Intergration	: Nigel Francois       \n";



function clickIE()
 
{if (document.all)
{(message);return false;}}
 
function clickNS(e) {
if
(document.layers||(document.getElementById&&!document.all))
{
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.  onmousedown=clickNS;}
else
{document.onmouseup=clickNS;document.oncontextmenu  =clickIE;}
 
document.oncontextmenu=new Function("alert(message);return false")



function DOMtable()
{

	if(document.getElementById || document.all)	{
		thisDOMtable=MM_findObj('oContent');
		if(thisDOMtable)thisDOMtable.style.height=tdHeight;
		}
}

function DOMresize(e,s)
{
	if(document.getElementById || document.all)	{
		thisDOMtable=MM_findObj(e);
		if(thisDOMtable)thisDOMtable.style.height=s;
		}
}



function P7_Snap() { //v1.9 by PVII
  var x,y,ox,oy,p,tx,a,b,k,d,da,e,el,args=P7_Snap.arguments;
  var bx,byy;a=parseInt(a);
  for (k=0; k<(args.length-3); k+=4)
   if ((g=MM_findObj(args[k]))!=null) {
    el=eval(MM_findObj(args[k+1]));
    a=parseInt(args[k+2]);b=parseInt(args[k+3]);
    x=0;y=0;ox=0;oy=0;p="";tx=1;da="document.all['"+args[k]+"']";
    if(document.getElementById) {
     d="document.getElementsByName('"+args[k]+"')[0]";
     if(!eval(d)) {d=da;}
    }else if(document.all) {d=da;} 
    if (document.all || document.getElementById) {
     while (tx==1) {p+=".offsetParent";
      if(eval(d+p)) {
       x+=parseInt(eval(d+p+".offsetLeft"));y+=parseInt(eval(d+p+".offsetTop"));
      }else{tx=0;}}
     ox=parseInt(g.offsetLeft);oy=parseInt(g.offsetTop);
     var tw=x+ox+y+oy;
     if(tw==0) {var w1=parseInt(el.style.width);bx=(a<0)?-5-w1:-10;
      a=(Math.abs(a)<1000)?0:a;b=(Math.abs(b)<1000)?0:b;
      x=document.body.scrollLeft + event.clientX + bx;
      y=document.body.scrollTop + event.clientY;}
   }else if (document.layers) {x=g.x;y=g.y;}
   if(el) {e=(document.layers)?el:el.style;
   var xx=parseInt(x+ox+a),yy=parseInt(y+oy+b);
    if((navigator.appName=="Netscape" && parseInt(navigator.appVersion)>4) || 
     (navigator.appVersion.indexOf("MSIE 5")>-1 && navigator.appVersion.indexOf("Mac")>-1)){
     xx+="px";yy+="px";}
    e.left=xx;e.top=yy;}}
}



///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function rtnSrc()
{
if(document.forms[0].oSearch.value.indexOf("(")!=-1
|| document.forms[0].oSearch.value.indexOf(")")!=-1
|| document.forms[0].oSearch.value.indexOf("*")!=-1
|| document.forms[0].oSearch.value.indexOf("$")!=-1
|| document.forms[0].oSearch.value.indexOf("^")!=-1
|| document.forms[0].oSearch.value.indexOf("+")!=-1
|| document.forms[0].oSearch.value.indexOf(")")!=-1
|| document.forms[0].oSearch.value.indexOf("[")!=-1
|| document.forms[0].oSearch.value.indexOf("]")!=-1
|| document.forms[0].oSearch.value.indexOf("?")!=-1
|| document.forms[0].oSearch.value.indexOf("#")!=-1)
{
alert('#  [  ]  (  )  +  \\   $  ^  *  ?        \n      Illegal characters');
return;
}
oRtnVal=document.forms[0].oSearch.value;
if(oRtnVal==""){alert('no search string entered');document.forms[0].oSearch.value="";return;}

if(oRtnVal.indexOf(" ")!=-1){oRtnVal=oRtnVal.replace(/ /g, ",");}
oPrefix=obaseHref;
if(thisbrowser=='IE'){oPrefix=''}
location=oPrefix+'index.htm?index='+trappedArea+'&('+(oRtnVal)+')&page=Search_Results';
}


function JSDsiteMap()
{
startFrom=location.search.indexOf("&(");
endFrom=location.search.indexOf(")&");
searchArray=(location.search.substring(startFrom+2,endFrom));
thisArray=searchArray.replace(/,/g, " ")
var ThisLinkText=new Array();
var ThisLinkURL=new Array();
var oshow=false;
var l=0;
	for(i=1;i<IndexRecord.length;i++)
		{
		oIndexPage=eval('IndexPage'+i);
		for(j=1;j<oIndexPage.length;j++)
			{
			oIndexSrch=eval('SIndexPage'+i+'_'+j)
			thisSrcArray=oIndexSrch.split(",");
			oshow=false;
			for(k=0;k<thisSrcArray.length;k++)
				{
				rer=(oIndexPage[j].toUpperCase());
				re = thisSrcArray[k].toUpperCase();
			    var s = thisArray.toUpperCase();
				ofound=re.indexOf(s);
				oofound=rer.indexOf(s);
				if(ofound !=-1 || oofound !=-1 )
					{
					oshow=true
					}
				}
		//	if(oshow==true)
				{
				if(j==1){oList='<p>'}else{oList='<li>'}
				ltxt=eval('IndexPage'+i+'['+j+']');
				lURL=oList+'<span class=level2selected><a class=level2selected href="index.htm?index='+IndexRecordArea[i]+'&page='+j+'"><u>'+ltxt+'</u></a></span>';
 

				SrchTxt=oIndexSrch.split(",");
				ThisLinkText[l]=SrchTxt[0];;
				ThisLinkURL[l]=lURL;
				l++
				}
				
			}
		
		}
endList=[l];
//obaseHref='';
	for(i=1;i<ContentDatabase.length;i++)
		{
		oIndexPage=eval('SContentDatabase'+i);
		for(j=1;j<oIndexPage.length;j++)
			{
			oIndexSrch=eval('SContentDatabase'+i)
			thisSrcArray=oIndexSrch.split(",");
			oshow=false;
			}
			for(k=0;k<thisSrcArray.length;k++)
				{
				rer=(oIndexPage.toUpperCase());
				re = thisSrcArray[k].toUpperCase();
			    var s = thisArray.toUpperCase();
				ofound=re.indexOf(s);
				oofound=rer.indexOf(s);
				if(ofound !=-1 || oofound !=-1 )
					{
					oshow=true
					}
				}
	//	if(oshow==true)
				{
					ltxt=ContentDatabase[i];
					if(ltxt!='thankyou')
					{
					olink=eval('SContentDatabase'+i);
					lURL='<sPan class=level2selected><a class=level2selected href=javascript:gothisURL('+i+','+ltxt+')><u>'+ltxt+'</u></a></span>';

					SrchTxt=oIndexSrch.split(",");
					ThisLinkText[l]=SrchTxt[0];;
					
					ThisLinkURL[l]='<li class=level2selected><A class=level2selected href="'+obaseHref+'index.htm?index='+IndexRecordArea[thisArea]+'&amp;page='+ltxt+'"><u>'+ltxt+'</u></a> </l>'//lURL;
					} 
					l++
				}
		}


document.write('<table height=100% width=750 cellpadding=0 cellspacing=0 border=0><tr><td width=28><IMG title="" height=1 alt="" src="images/shim.gif" width=28></td><td WIDTH=538 valign=top><br>');

if(ThisLinkURL.length==0)
	{
	document.write('<p CLASS=tsntext>No pages found......</p>');
	}

if(ThisLinkURL.length!=0)
	{
results='page';
if(ThisLinkURL.length>1)results='pages'
searchArray=(location.search.substring(startFrom+2,endFrom));
searchArray=searchArray.replace(/,/g, " ")
searchArray='Search results for &nbsp;" <b>'+searchArray.toUpperCase()+'</b> "&nbsp; returned  &nbsp;" <b>'+ThisLinkURL.length+' " </b>&nbsp; '+results+'';
//document.write('<p CLASS=tsntext>'+searchArray+'</p>');


	for(i=0;i<ThisLinkURL.length;i++)
		{
		if(typeof(ThisLinkURL[i])!='undefined')	
			{	
			document.write('<span CLASS=tsntext>');
			document.write(ThisLinkURL[i]+'<br>');
			//document.write(/*ThisLinkText[i]+*/'</span><hr SIZE="1" NOSHADE>');
			}
		if(i==endList)document.write('<br><hr SIZE="1" NOSHADE>');	
		}
	}
document.write('<br></td><td background="siteimages/tsn_right_dash.gif" width=11><IMG title="" height=1 alt="" src="images/shim.gif" width=11></td><td width=173><IMG WIDTH=173 title="" height=1 alt="" src="images/shim.gif"></td></tr></table>');
}

function JSDsiteSearch()
{
if(sitemap==1){JSDsiteMap();return}
startFrom=location.search.indexOf("&(");
endFrom=location.search.indexOf(")&");
searchArray=(location.search.substring(startFrom+2,endFrom));
thisArray=searchArray.replace(/,/g, " ")
var ThisLinkText=new Array();
var ThisLinkURL=new Array();
var oshow=false;
var l=0;
	for(i=1;i<IndexRecord.length;i++)
		{
		oIndexPage=eval('IndexPage'+i);
		for(j=1;j<oIndexPage.length;j++)
			{
			oIndexSrch=eval('SIndexPage'+i+'_'+j)
			thisSrcArray=oIndexSrch.split(",");
			oshow=false;
			for(k=0;k<thisSrcArray.length;k++)
				{
				rer=(oIndexPage[j].toUpperCase());
				re = thisSrcArray[k].toUpperCase();
			    var s = thisArray.toUpperCase();
				ofound=re.indexOf(s);
				oofound=rer.indexOf(s);
				if(ofound !=-1 || oofound !=-1 )
					{
					oshow=true
					}
				}
			if(oshow==true)
				{
				ltxt=eval('IndexPage'+i+'['+j+']');
				lURL='<span class=level2selected><a class=level2selected href="index.htm?index='+IndexRecordArea[i]+'&page='+j+'"><u>'+ltxt+'</u></a></span>';
 

				SrchTxt=oIndexSrch.split(",");
				ThisLinkText[l]=SrchTxt[0];;
				ThisLinkURL[l]=lURL;
				l++
				}
				
			}
		
		}

//obaseHref='';
	for(i=1;i<ContentDatabase.length;i++)
		{
		oIndexPage=eval('SContentDatabase'+i);
		for(j=1;j<oIndexPage.length;j++)
			{
			oIndexSrch=eval('SContentDatabase'+i)
			thisSrcArray=oIndexSrch.split(",");
			oshow=false;
			}
			for(k=0;k<thisSrcArray.length;k++)
				{
				rer=(oIndexPage.toUpperCase());
				re = thisSrcArray[k].toUpperCase();
			    var s = thisArray.toUpperCase();
				ofound=re.indexOf(s);
				oofound=rer.indexOf(s);
				if(ofound !=-1 || oofound !=-1 )
					{
					oshow=true
					}
				}
		if(oshow==true)
				{
					ltxt=ContentDatabase[i];
					olink=eval('SContentDatabase'+i);
					lURL='<sPan class=level2selected><a class=level2selected href=javascript:gothisURL('+i+','+ltxt+')><u>'+ltxt+'</u></a></span>';

					SrchTxt=oIndexSrch.split(",");
					ThisLinkText[l]=SrchTxt[0];;
					
					ThisLinkURL[l]='<sPan class=level2selected><A class=level2selected href="'+obaseHref+'index.htm?index='+IndexRecordArea[thisArea]+'&amp;page='+ltxt+'"><u>'+ltxt+'</u></a> </spAn>'//lURL;
					l++
				}
		}


document.write('<table height=100% width=750 cellpadding=0 cellspacing=0 border=0><tr><td width=28><IMG title="" height=1 alt="" src="images/shim.gif" width=28></td><td WIDTH=538 valign=top><br>');

if(ThisLinkURL.length==0)
	{
	document.write('<p CLASS=tsntext>No pages found......</p>');
	}

if(ThisLinkURL.length!=0)
	{
results='page';
if(ThisLinkURL.length>1)results='pages'
searchArray=(location.search.substring(startFrom+2,endFrom));
searchArray=searchArray.replace(/,/g, " ")
searchArray='Search results for &nbsp;" <b>'+searchArray.toUpperCase()+'</b> "&nbsp; returned  &nbsp;" <b>'+ThisLinkURL.length+' " </b>&nbsp; '+results+'';
document.write('<p CLASS=tsntext>'+searchArray+'</p>');


	for(i=0;i<ThisLinkURL.length;i++)
		{
		document.write('<span CLASS=tsntext>');
		document.write(ThisLinkURL[i]+'<br>');
		document.write(ThisLinkText[i]+'</span><hr SIZE="1" NOSHADE>');
		}
	}
document.write('</td><td background="siteimages/tsn_right_dash.gif" width=11><IMG title="" height=1 alt="" src="images/shim.gif" width=11></td><td width=173><IMG WIDTH=173 title="" height=1 alt="" src="images/shim.gif"></td></tr></table>');
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

function MM_setTextOfLayer(objName,x,newText) {
  var obj =  MM_findObj(objName);
 
  if (obj!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}



function JSDisvalidPage()
{
if(!isNaN(thisPage) && thisArea>IndexRecord.length)
{
validPage=false;
odisplay=false;
return;
}
	if(!isNaN(thisPage)){
		if(location.protocol!="file:")
		{
		if(eval("IndexPage"+thisArea+"["+thisPage+"]"))
			{
			validPage=true;
			}
		}
	}
}




function tdColor(thisElement,thisBgcolor,fontCol)
	{

	thisElement.style.backgroundColor=thisBgcolor;
	thisElement.style.color=fontCol;
	}

/**********************************************************************************************
Standard setBackgroundColor changer
**********************************************************************************************/
function setBackgroundColor(thisMenu,bgcolor){
LayerId=MM_findObj(thisMenu);

if (thisbrowser == 'IE')
	{
	LayerId.style.backgroundColor =  bgcolor;
	}
else if (isNS4)
	{
	LayerId.bgColor = bgcolor;
	}
else if (isNS6)
	{
	LayerId.style.backgroundColor =  bgcolor;
	}
}

/*************************************************************************************************************
SET PAGE TITLE
*************************************************************************************************************/
function JSDpageProperties()
{
jsDisplayTitle='  ';
if(location.href.lastIndexOf('Search_Results')!=-1 || location.href.lastIndexOf('Site_Maps')!=-1 )
{
startFrom=location.search.indexOf("&(");
endFrom=location.search.indexOf(")&");
searchArray=(location.search.substring(startFrom+2,endFrom));
searchArray=searchArray.replace(/,/g, " ")

if(location.href.lastIndexOf('Search_Results')!=-1) searchArray='Search results';
if(location.href.lastIndexOf('Site_Maps')!=-1)searchArray='Site Map';

////////////////////// for '+searchArray.toUpperCase();
jsDisplayTitle=searchArray;
//document.write(''+
//'<META ID=AuthorMeta NAME="Author" CONTENT="Nigel Francois">\n'+
//'<TITLE>'+jsDisplayTitle+'</TITLE>\n');
//return;
}
JSDisvalidPage();
if(isNaN(trappedPage ))// && location.protocol!="file:"))
{
for(i=1;i<IndexRecord.length;i++)
	{
	oIndexPage=eval("IndexPage"+i);
	for(j=1;j<oIndexPage.length;j++)
		{
		if(eval("IndexPage"+i+"_"+j)==thisPage)
			{
			jsDisplayTitle=eval("IndexPage"+thisArea+"["+j+"]");
			odisplay=true;
			opageType='internal';
			}
		}
	}
for (i=1;i<ContentDatabase.length;i++)
	{
	if(trappedPage.indexOf(ContentDatabase[i])!=-1)
		{
		jsDisplayTitle=(eval('ContentDatabase'+i)); 
		odisplay=true;
		opageType='orphan';
		}
	}

}
else
	{
	if(validPage==true)
		{
		if(eval("IndexPage"+thisArea) && eval("IndexPage"+thisArea+"["+thisPage+"]"))
			{
			jsDisplayTitle=eval("IndexPage"+thisArea+"["+thisPage+"]");
			odisplay=true;
			opageType='internal';
			}
		}
		else
			{ 
			for (i=1;i<ContentDatabase.length;i++)
				{
				if(trappedPage==ContentDatabase[i])
					{
					jsDisplayTitle=(eval('ContentDatabase'+i)); 
					odisplay=true;
					opageType='orphan';
					}
				}
			}
}
document.write(''+
'<META ID=AuthorMeta NAME="Author" CONTENT="Nigel Francois">\n'+
'<TITLE>'+jsDisplayTitle+'</TITLE>\n');
}

/*************************************************************************************************************
WRITE PAGE TITLE
*************************************************************************************************************/
function JSDpageTitle()
{
document.write(jsDisplayTitle);//+' - '+trappedArea)
}

/*************************************************************************************************************
LOAD THE DEFAULT SELECTED AREA
*************************************************************************************************************/
function JSDloadArea()
{
if(!isNaN(thisPage) && thisArea>(IndexRecord.length-1))
{
//alert(thisArea+'\n'+IndexRecord.length);
validPage=false;
return;
}


if(!isNaN(thisPage && thisArea<=(IndexRecord.length-1))){
	document.write('<scr'+'ipt language="javascript" src="content/JSdBaseAreas/JSdBaseArea'+thisArea+'.htm"></sc'+'ript>')
	}else{validPage==false;return}

}


/*************************************************************************************************************
QUERY THE CONTENT INDEXER DATABASE
*************************************************************************************************************/
function JSDQueryContent()
{
if(!isNaN(thisPage) && thisArea>IndexRecord.length)
{
odisplay=false;
return;
}

if(eval("IndexRecord["+thisArea+"]" && (!isNaN(thisPage))))
	{
		if(location.protocol!="file:")
		{
		oarRecord=eval("arRecord"+thisArea);
		}else{oarRecord=''}
		if(thisPage<=(oarRecord.length-1))
			{
			odisplay=true;
			opageType='internal';
			}
	}


else if(eval("IndexRecord["+thisArea+"]" && (isNaN(thisPage))))
	{
	for(i=1;i<PageDataBase.length;i++)
		{
		if(thisPage==PageDataBase[i])
			{
			odisplay=true;
			opageType='noorphan';
			}
		}
	}

else
	{
	for (i=1;i<ContentDatabase.length;i++)
		{
		if(trappedPage.indexOf(ContentDatabase[i])!=-1)
			{
			odisplay=true;
			opageType='orphan';
			}
		}
	}
}


/*************************************************************************************************************
DISPLAY THE MAIN CONTENT
*************************************************************************************************************/
function JSDgetContent()
{
if(location.href.lastIndexOf('Search_Results')!=-1)
{
document.write('<scr'+'ipt language="javascript" src="JSDsrc/Search_Results.html"></sc'+'ript>');
return;
}

if(location.href.lastIndexOf('Site_Maps')!=-1)
{
document.write('<scr'+'ipt language="javascript" src="JSDsrc/Site_Maps.html"></sc'+'ript>');
return;
}



trappedPage=URLencode(trappedPage);

if(odisplay==true)
	{
	if(opageType=='internal')
		{
		scriptFile=URLencode(oarRecord[thisPage][2])
		document.write(scriptFile)
		}
	if(opageType=='noorphan')
		{
		xdisplay='no';
		for(i=1;i<IndexRecordArea.length;i++)
			{
			if(trappedArea==IndexRecordArea[i])
				{
				xdisplay='yes'
				}
			}
		if(xdisplay=='yes'){
//JSDBASE_DEV************************************************************************************************
//		document.write('<scr'+'ipt language="javascript" src="content/'+trappedArea+'/'+trappedPage+'.htm"></sc'+'ript>');
		document.write('<scr'+'ipt language="javascript" src="content/JSdFiles/'+trappedPage+'.htm"></sc'+'ript>');
//JSDBASE_DEV************************************************************************************************
			}
		if(xdisplay=='no')noContent();
		}
	if(opageType=='orphan')
		{
		document.write('<scr'+'ipt language="javascript" src="content/'+'JSdBaseOrphans/'+trappedPage+'.html"></sc'+'ript>');
		}
	}else{noContent();}
}


function URLencode(UrlVal)
{
UrlVal=UrlVal.replace(/%/g, "%25");
UrlVal=UrlVal.replace(/£/g, "%c2%a3");
return(UrlVal);
}

/*************************************************************************************************************
ERROR HANDLER FOR MISSING COMTENT
*************************************************************************************************************/
function noContent()
{
if(location.href.lastIndexOf('jsdForm')!=-1)return;
if(location.protocol=="file:"){
noneContent="<table cellspacing=0 cellpadding=0 width=100%><tr><td CLASS='sysMsg'>";
noneContent+="<b>550 Content Error :-</b> The preview function does not allow navigation</td></tr>";
noneContent+="<tr><td bgcolor=black height=1><img src='images/shim.gif'></td></tr><tr><td CLASS='sysMsg'>Cick on the browser toolbar (Back, Forward, Stop, Refresh, Home) to return to JSdBase";
noneContent+="</td></tr></table>";
document.write(noneContent);
return
}

ShowtrappedPage=trappedPage.replace(/_/g, " ");
noneContent="<table cellspacing=0 cellpadding=0 width=100%><tr><td CLASS='sysMsg'>";
noneContent+="<b>404 Content Error</b></td><tr><td bgcolor=black height=1><img src='images/shim.gif'></td></tr><tr><td CLASS='sysMsg'> ";
noneContent+="Content has not been prepared for :<b>"+location.search+"</b></td></tr>";
noneContent+="<tr><td height=40 CLASS='sysMsg'>Sending error to Web Master</td></tr></table>";
noneContent+="<form name=\"formnocontent\" METHOD=\"post\" ACTION=\"email.php\">";
noneContent+="<input type=\"hidden\" name=\"location\" value=\""+location.search+"\"> ";
noneContent+="<input type=\"hidden\" name=\"Area\" value=\""+trappedArea+"\"> ";
noneContent+="</form>";
document.write(noneContent);
/*if(location.host=="localhost" || location.host=="localhost:81"|| location.protocol=="file:")
{}else{setTimeout("document.forms[\"formnocontent\"].submit()",1000);}*/
}

/*************************************************************************************************************
CONTROL OF CONTENT & IMAGE POPUP WINDOWS FOR IE & NS6
*************************************************************************************************************/
var onewwindow=false;
var oImgWindow=false;
//if(isNS6) var ImgWindow=self;
function MM_openBrWindow(theURL,winName,features) { //v2.0


var BaseendPos = location.href.lastIndexOf('/index.htm');
basehref=(location.href.substring(0,BaseendPos+1))

if(location.href.lastIndexOf('jsdTPL')!=-1)
{
var startPos = location.href.lastIndexOf('jsdTPL');
basehref=(location.href.substring(0,startPos))
}




if(odisplay==false)return;

	if(parent.newwindow)
		{
		if(onewwindow==true)parent.newwindow.close();
		}
//newwindow= window.open('',winName,features);
newwindow= window.open('','winName','top=0,left=0,status=yes,menubar=yes,scrollbars=yes,resizable=yes,width=600,height=400');

newwindow.document.open();
newwindow.document.write('<html>');
newwindow.document.write('<base href="'+basehref+'index.htm">');
newwindow.document.write('<link rel="stylesheet" href="style/style.css" type="text/css"><style>.divScript{position:absolute;height:1px;width:1px;left:0;top:0;visibility:hidden}</style>');
newwindow.document.write('<title>'+window.document.title+'</title><BODY onload=nolinks() onresize=nolinks() oncontextMenu="return false" class=bodytxt  onunload="(parent.opener.onewwindow=false)">');
newwindow.document.write('<table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">');
newwindow.document.write('<tr bgcolor="#FFFFFF"> ');
newwindow.document.write('<td width="212" ><IMG SRC="siteimages/logo_1.gif"  HEIGHT="82" border="0"></td>');
newwindow.document.write('<td width="76" ><IMG SRC="siteimages/logo_2.gif" name="oAni"  HEIGHT="82" border="0" id="oAni"></td>');
newwindow.document.write('<td width="30" ><IMG SRC="siteimages/logo_3.gif" width="30"  HEIGHT="82" border="0"></td>');
newwindow.document.write('<td><img src="siteimages/shim.gif" width="2" height="2" border="0" ></td> ');
newwindow.document.write('</table>');
if(location.protocol!="file:")newwindow.document.write(content);
if(location.protocol=="file:" && thisbrowser=="IE")newwindow.document.write(document.all.oContent.innerHTML);
newwindow.document.write('<scr'+'ipt>function nolinks(){for(i=0;i<document.links.length;i++){document.links[i].href="javascript:;";document.links[i].target="_top";}}nolinks();<\/scr'+'ipt>');
newwindow.document.write('</body></html>');
onewwindow=true;
if(thisbrowser=="IE")
	{
	if(isIE5)newwindow.document.close();
	if(isIE4)newwindow.window.location.reload();
	}
else
	{
	newwindow.document.close();
	}
newwindow.focus();
}



function loseWindow()
{
if(parent.newwindow)
	{
	if(isNS4 && navigator.userAgent.indexOf("Win98")==-1){parent.newwindow.close();return}
	if(thisbrowser=="IE"){if(onewwindow==true)parent.newwindow.close();return};
	if(isNS6){parent.newwindow.close();return}
	}
}



function windowContent(thisContent)
{
if(isNS6)
{
ImgWindow= window.open(thisContent,'winName','top=0,left=0, menubar=yes, scrollbars=yes, status=yes,resizable=yes,width=160,height=170');
ImgWindow.document.open();
ImgWindow.document.write('<img height=100%  src="'+thisContent+'" title="'+thisContent+'">');
ImgWindow.document.close();
ImgWindow.focus();
return false;
}

ImgWindow= window.open('','winName','top=0,left=0, menubar=yes, scrollbars=yes, status=yes,resizable=yes,width=160,height=170');
ImgWindow.document.open();
//ImgWindow.document.write('<html><style>button{background-color:white}</style><Title>'+thisContent+'</title><sc'+'ript>window.onload=function(){if((document.images[0].width)<=screen.availWidth && (document.images[0].height)<=(screen.availHeight-56)){window.resizeTo((document.images[0].width+47),(document.images[0].height+110))}if((document.images[0].width)<=200 || (document.images[0].height)<=200){window.resizeTo((document.images[0].width+150),(document.images[0].height+150))}}<\/sc'+'ript>');
ImgWindow.document.write('<html><style>button{background-color:white}</style><Title>'+thisContent+'</title>');
ImgWindow.document.write('<body  background="siteimages/loadingImg.gif" scroll=auto marginheight=0 marginwidth=0 topmargin=0 leftmargin=0>')
ImgWindow.document.write('<table bgcolor="white" cellpadding="0" cellspacing="5" width="100%" height="100.5%" border=1>');

//ImgWindow.document.write('<tr><td nowrap style="border:inset" bgcolor="silver">');
//ImgWindow.document.write('<button onclick="window.print()">&nbsp;Print&nbsp;</button>');
//if(thisbrowser=="IE")ImgWindow.document.write('<button onclick="document.images[0].style.width=\'\' ;document.images[0].style.height=\'\' ">Default</button>&nbsp;&nbsp;<button onclick="document.images[0].style.width=\'100%\' ;document.images[0].style.height=\'100%\' ">Stretch</button>&nbsp;&nbsp;');
oW="";
oW="width='100%'";
//if(isNS6)oW="width='100%'";
//ImgWindow.document.write('<button onclick="self.close()">&nbsp;Close&nbsp;</button></td></tr>');
ImgWindow.document.write('<tr><td bgcolor="white" style="border:none" align="left" valign="middle" height="100%">');
ImgWindow.document.write('<img height=100% '+oW+' src="'+thisContent+'" title="'+thisContent+'"');
ImgWindow.document.write('></td></tr></table></body></html>');
ImgWindow.document.close();
ImgWindow.focus();
}


function Rtnfalse()
{
ImgWindow.focus();
return false;
}
/*************************************************************************************************************
LINKS HANDLER & PROPOSED PLUGIN DETECTION
*************************************************************************************************************/
function targetLinks()
{
for(i=1;i<document.links.length;i++)
	{
	thisLink=document.links[i];
	if(thisLink.href.indexOf("index.htm")!=-1) 
		{
		var StartPos = thisLink.href.lastIndexOf("index.htm");
		var EndPos = thisLink.href.lastIndexOf(")");
		Xlink=(thisLink.href.substring(StartPos,thisLink.href.length));
		thisLink.href=obaseHref+Xlink
		}

	if(thisLink.href.indexOf("gothisURL")!=-1) 
		{
		var startPos = location.href.lastIndexOf('jsdTPL');
		basehref=(location.href.substring(0,startPos))
		var StartPos = thisLink.href.lastIndexOf("(");
		var EndPos = thisLink.href.lastIndexOf(")");
		Xlink=(thisLink.href.substring(StartPos+1,EndPos));
		thiaArray=Xlink.split(",");
		thisLink.href=obaseHref+'index.htm?index='+thiaArray[0]+'&page='+thiaArray[1]+'';
		}


	if(thisbrowser == 'IE')
			{
			if(thisLink.href.indexOf("gothisURL")!=-1 || thisLink.href.indexOf("index.htm?index=")!=-1 || thisLink.hostname==location.host || thisLink.host==";")
				{
				thisLink.target="_top";
				}else{
					//thisLink.target="_blank";
					}
			if(thisLink.href.indexOf("/docs/")!=-1)thisLink.target="_blank";
			if(thisLink.href.indexOf("/images/")!=-1)
			{
			thisLink.onmousedown=function(){windowContent(this.href)}; //Rtnfalse;
			thisLink.onclick=function(){return false}; //Rtnfalse;
			//function(){alert()};
			//thisLink.target="_blank";
			}
			if(thisLink.href.indexOf("/pdfs/")!=-1)thisLink.target="_blank";
			if(thisLink.href.indexOf("/swfs/")!=-1)thisLink.target="_blank";
			}


		if(isNS4)
			{
//alert(thisLink.hostname+'\n'+location.hostname+'\n'+thisLink.href)
			if(thisLink.href.indexOf("gothisURL")!=-1 || thisLink.href.indexOf("index.htm?index=")!=-1)
				{
				thisLink.target="_top";
				}
		
			if(thisLink.href.indexOf("/images/")!=-1)
			{
			thisLink.onclick=function(){imgVal(this.href);return false}; //Rtnfalse;
			//thisLink.onclick=function(){return false}; //Rtnfalse;
			//thisLink.onclick=Rtnfalse;
			//thisLink.href='javascript:imgVal(\''+escape(thisLink.href)+'\')';
			//thisLink.href='javascript:imgVal(\''+(thisLink.href)+'\')';
			//function(){alert()};
			//thisLink.target="_blank";
			}

//	if(thisLink.href.indexOf("/images/")!=-1)thisLink.target="_blank";
			if(thisLink.href.indexOf("/pdfs/")!=-1)thisLink.target="_blank";
			if(thisLink.href.indexOf("/swfs/")!=-1)thisLink.target="_blank";
			}


		if(isNS6)
			{
			if(thisLink.href.indexOf("gothisURL")!=-1 || thisLink.href.indexOf("index.htm?index=")!=-1)
				{
				thisLink.target="_top";
				}
			if(thisLink.href.indexOf("/images/")!=-1)
			{
			thisLink.onclick=function(){windowContent(this.href);;return false}; //Rtnfalse;
			//thisLink.onclick=function(){return false}; //Rtnfalse;
			//thisLink.href='javascript:windowContent(\''+unescape(thisLink.href)+'\')';
			}
	
	//	if(thisLink.href.indexOf("/images/")!=-1)thisLink.target="_blank";
			if(thisLink.href.indexOf("/pdfs/")!=-1)thisLink.target="_blank";
			if(thisLink.href.indexOf("/swfs/")!=-1)thisLink.target="_blank";
			}

	}
}

function imgVal(thisImg)
{
if(parent.oImgWindow==true){
//ImgWindow.document.open();
//ImgWindow.document.close();
parent.ImgWindow.close();

}

thisImg1=thisImg;
//thisImg1=(unescape(thisImg));
var StartPos = thisImg1.lastIndexOf("images");
var EndPos = thisImg1.lastIndexOf(")");
thisContent=(thisImg1);//.substring(StartPos,EndPos-1));
ImgWindow= window.open('','winName','top=0,left=0,statusbar=yes,menubar=yes, status=yes, scrollbars=yes,resizable=yes,width=200,height=200');
ImgWindow.focus();
ImgWindow.document.open();
ImgWindow.document.write('<html><style>button{background-color:white}</style><Title>'+thisContent+'</title><sc'+'ript>function getImgHeight(){window.resizeTo((document.images[0].width+23),(document.images[0].height+11))}<\/sc'+'ript>');
ImgWindow.document.write('<body background="siteimages/loadingImg.gif" onunload="(parent.opener.oImgWindow=false)" onload="(parent.opener.oImgWindow=true);self.focus();getImgHeight(\''+thisContent+'\')" marginheight=4 marginwidth=4>')
ImgWindow.focus();
ImgWindow.document.write('<table align="left" cellpadding="0" cellspacing="0" border=0>');
ImgWindow.document.write('<tr><td bgcolor="white" style="border:none" align="left" valign="top">');
ImgWindow.document.write('<img border=0 src="'+thisContent+'" width="100%" height="104%" ');
ImgWindow.document.write('></a></td></tr></table></body></html>');
ImgWindow.document.close();
oImgWindow=true;
//ImgWindow.focus();
}
/*************************************************************************************************************
DEFAULT STATUSBAR TEXT
*************************************************************************************************************/
function JSDstatusBar()
{
self.status="JSdBase CMS web builder";
self.defaultStatus ="JSdBase CMS web builder";
return true;
}
JSDstatusBar();


function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}


MM_reloadPage(true);


function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


function MM_findObj(n, d) { //v4.0
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}



function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function P7_autoLayers() { //v1.1 PVII
 var g,b,k,f,args=P7_autoLayers.arguments;
 if(!document.p7setc) {p7c=new Array();document.p7setc=true;}
 for(k=0; k<p7c.length; k++) {
  if((g=MM_findObj(p7c[k]))!=null) {
   b=(document.layers)?g:g.style;b.visibility="hidden";}}
 for(k=0; k<args.length; k++) {
  if((g=MM_findObj(args[k])) != null) {
   b=(document.layers)?g:g.style;b.visibility="visible";f=false;
   for(j=0;j<p7c.length;j++) {
    if(args[k]==p7c[j]) {f=true;}}
  if(!f) {p7c[p7c.length++]=args[k];}}}
}

var formRtnVal=true;
function submitForm(form)
{
var ErrMsg="";
var errs=false;
validTxt="";
for(i=0 ; i<form.elements.length-1 ; i++)
	{
	thisElement=form.elements[i];
	if(thisElement.name.indexOf("_TR_")!=-1)validTxt+="'"+thisElement.name+"','','R',";
	if(thisElement.name.indexOf("_NR_")!=-1)validTxt+="'"+thisElement.name+"','','RisNum',";
	if(thisElement.name.indexOf("_ER_")!=-1)validTxt+="'"+thisElement.name+"','','RisEmail',";
	}
validTxt=validTxt.substring(0,validTxt.length-1)
formRtnVal=eval("MM_validateForm("+validTxt+")");
if(typeof(formRtnVal)=='undefined')
	{
	form.method=form.get_JS_Method.value;
	form.action=form.get_JS_Action.value;
	form.submit();
	}
//MM_validateForm('first_name','','R','surname','','R','email_address','','RisEmail','postcode','','R');
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) 
		{ 
		nm=val.name; 
		n_m=nm;
		n_m=n_m.replace(/_TR_/g, ""); 
		n_m=n_m.replace(/_NR_/g, ""); 
		n_m=n_m.replace(/_ER_/g, ""); 
		n_m=n_m.replace(/_/g, " "); 
		if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+n_m+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+n_m+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+n_m+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+n_m+' is required.\n'; }
  } 
  
  document.MM_returnValue = (errors == '');
  if (errors)
	{ 
	alert('The following error(s) occurred:\n'+errors);
	return document.MM_returnValue
	}
}

//-->