function NoSpam(emn,dmn,dme,nme,cls) {
if (nme == null || nme == '') {
	nme = emn + '@' + dmn + '.' + dme;
	}
email = '<a href="mailto:' + emn + '@' + dmn + '.' + dme + '"';
if (cls != null) {
	email = email + ' class="' + cls + '"'
}
email = email + '>' + nme + '</a>';
document.write (email);
}

function NoSpam2(emn,dmn,nme,cls) {
if (nme == null || nme == '') {
	nme = emn + '@' + dmn;
	}
email = '<a href="mailto:' + emn + '@' + dmn + '"';
if (cls != null) {
	email = email + ' class="' + cls + '"'
}
email = email + '>' + nme + '</a>';
document.write (email);
}

function nsi() {
email = '<a href="mailto:' + 'info' + '@' + 'tharstern.com' + '"';
email = email + '>' + 'info' + '@' + 'tharstern.com' + '</a>';
document.write (email);
}

var ns4 = (document.layers) ? true : false;
var ie4 = (document.all && !document.getElementById) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (!document.all && document.getElementById) ? true : false;
function show(obj) {
 	if (ie4 || ie5) {
 		document.all[obj].style.display = 'block';
 	} else if (ns4) {
 		document.layers[obj].display = 'block';
 	} else {
 		document.getElementById(obj).style.display = 'block';
 	}
 }
function hide(obj) {
 	if (ie4 || ie5) {
 		document.all[obj].style.display = 'none';
 	} else if (ns4) {
 		document.layers[obj].display = 'none';
 	} else {
 		document.getElementById(obj).style.display = 'none';
 	}
 }
function delegates(i) {
	hide('del2'); hide('del3'); hide('del4'); 
	if (i == '1') {
		TotalCost = price1
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 	if (i == '2') {
		show('del2');
		TotalCost = (Number(price1) + Number(price2))
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 	if (i == '3') {
		show('del2'); show('del3');
		TotalCost = (Number(price1) + Number(price2) + Number(price2))
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 	if (i == '4') {
		show('del2'); show('del3'); show('del4');
		TotalCost = (Number(price1) + Number(price2) + Number(price2) + Number(price2))
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 }
function delegates2for1(i) {
	hide('del2'); hide('del3'); hide('del4'); 
	if (i == '1') {
		TotalCost = Number(price1)
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 	if (i == '2') {
		show('del2');
		TotalCost = Number(price1)
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 	if (i == '3') {
		show('del2'); show('del3');
		TotalCost = (Number(price1) + Number(price2))
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 	if (i == '4') {
		show('del2'); show('del3'); show('del4');
		TotalCost = (Number(price1) + Number(price2))
		writeLayer('totalcost', 'Total cost: &pound;' + TotalCost + ' + VAT');
		document.siForm.totalcost.value = TotalCost
	}
 }
 
function writeLayer(layerID, txt) {
	if(document.getElementById){
		document.getElementById(layerID).innerHTML=txt;
	}
	else if(document.all){
		document.all[layerID].innerHTML=txt;
	}
	else if(document.layers) {
		with(document.layers[layerID].document) {
			open();
			write(txt);
			close();
		}
	}
}