<!--//--><![CDATA[//><!-- 
function callTargetBlank() {
	var elements = getElementsByClassName('newWindow')
  	for (i = 0; i < elements.length; i++) {
      elements[i].setAttribute('target', '_blank');
  }
}
//--><!]]>

function getElementsByClassName(classname, node)  {
    if(!node) node = document.getElementsByTagName("body")[0];
    var a = [];
    var re = new RegExp('\\b' + classname + '\\b');
    var els = node.getElementsByTagName("*");
    for(var i=0,j=els.length; i<j; i++)
        if(re.test(els[i].className))a.push(els[i]);
    return a;
}

function MM_preloadImages() {
  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_swapImgRestore() {
  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 MM_swapImage() {
  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];}
}

if (navigator.appName == 'Netscape') {
  var browser = 'NS';
  var version = (navigator.appVersion);
}

if (navigator.appName == 'Microsoft Internet Explorer') {
  var browser = 'IE';
  var version = (navigator.appVersion);
}

NS4 = (document.layers) ? 1 : 0;

NS6 = ((browser == 'NS') && (document.getElementById)) ? 1 : 0;

var agent = navigator.userAgent.toLowerCase();

opera = (agent.indexOf("opera")!=-1) ? true : false

macs = (agent.indexOf("mac")!=-1) ? true : false

function showHideLayersNS(layerName,actions){
	if(NS4){
		document.layers[layerName].visibility = actions;
	}
	else {
		//document.getElementById(layerName).style.visibility = actions;
		if(document.getElementById(layerName)) document.getElementById(layerName).style.visibility = actions;
		}
	}	
	
function popupWindow(url,name,width,height) {
		newwindow = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0,left=162,top=200");
		newwindow.window.focus();
	}
	
function popupWindow2(url,name,width,height) {
		newwindow2 = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0,left=162,top=200");
		newwindow2.window.focus();
	}

function popupWindow3(url,name,width,height) {
		newwindow3 = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0,left=162,top=200");
		newwindow3.window.focus();
	}	
	
function popupWindowNoScroll(url,name,width,height) {
		newwindow4 = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left=100,top=100");
		newwindow4.focus();
	}	
	
function popupWindowScroll(url,name,width,height) {
		newwindow = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable=1,location=0,scrollbars=1,copyhistory=0,left=162,top=200");
		newwindow.window.focus();
	}
function popupWindowNoScrollPos(url,name,width,height,left,top) {
		newwindow = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable=0,location=0,scrollbars=0,copyhistory=0,left="+left+",top="+top+"");
		newwindow.window.focus();
	}	
	
function popupWindowScrollPos(url,name,width,height,left,top,resize) {
		newwindow = window.open(url,name, "width="+width+",height="+height+",toolbar=0,directories=0,menubar=0,status=0,resizable="+resize+",location=0,scrollbars=1,copyhistory=0,left="+left+",top="+top+"");
		newwindow.window.focus();
	}
	
function generalPopup(url,name,width,height,left,top,resize,tool,menu,directories,status,location,scrollbars,history){
		generalwindow = window.open(url,name, "width="+width+",height="+height+",toolbar="+tool+",directories="+directories+",menubar="+menu+",status="+status+",resizable="+resize+",location="+location+",scrollbars="+scrollbars+",copyhistory="+history+",left="+left+",top="+top+"");
		generalwindow.window.focus();
	}
	
function closeThisOpenThat(redirectUrl){		
		parent.opener.location = redirectUrl;
		self.close();		
	}
	
function MM_jumpMenu(targ,selObj,restore){
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}	

function MM_jumpMenuInNew(selObj,restore){
  var url = 'http://'+selObj.options[selObj.selectedIndex].value;
  PCD = window.open(url,'');
  PCD.window.focus();
  if (restore) selObj.selectedIndex=0;  
}

function MM_reloadPage(init) {
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);

var cookiesaloud
function checkcookies() {
 if (document.cookie.length > 0) { 
  cookiesaloud = 1
 }
 else {  
  cookiesaloud = 0
 }
}
//checkcookies();

function openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function changeClass(cellid,strNewClass){	
	if(!macs){
		document.getElementById(cellid).className=strNewClass;
		}
	}
	
function setState(cellref){
		if(cellref!=""){
			if(macs||browser=="NS"){document.images['btn'+cellref].src="images/nav/btn-" + cellref + "-1.gif";}
			else{if(document.getElementById('btn'+cellref)){document.getElementById('btn'+cellref).src = "images/nav/btn-" + cellref + "-1.gif";}}
			}
		}
		
function hideSortByDDs(){
	if(browser=="NS"){		
		showHideLayersNS("sortByDiv","hidden");
	}
	if(browser!="NS"){
		if(document.getElementById('sortByDiv')) MM_showHideLayers("sortByDiv","","hide")		
		}	
	}
	
function showSortByDDs(){
	if(browser=="NS"){				
		showHideLayersNS("sortByDiv","visible");
	}
	if(browser!="NS"){
		if(document.getElementById('sortByDiv')) MM_showHideLayers("sortByDiv","","show")		
		}	
	}
	
function sendContactEMail(){
	var strDom = "sbvictor.co.uk"
	var strBox = "steve.godwin"
	document.location.href = "mailto:"+strBox+"@"+strDom
	}

	
var blnShouldSubmit = true;
	
function check(dataitem,cellid,CallfromFn){
	if (dataitem.value==""){			
		if(navigator.appName != 'Netscape'){
			changeClass(cellid,'textinputalert');
			}			
		if(CallfromFn==1){
			msgAlert = msgAlert += "- " + dataitem.name + "\n\n";
			return blnShouldSubmit = false;
		}			 		
	}
	else
		if(navigator.appName != 'Netscape'){
			changeClass(cellid,'textinput');
			}
		if(blnShouldSubmit==true){
			return blnShouldSubmit = true;
			}
		else{return blnShouldSubmit = false}
	}