<!--

function emailAddress(a,symbol) {
	for (i = 0; i < a.length; i++) {
		document.write(a[i]);
		if (i == 0) {
			document.write(symbol);
		} else if (i+1 < a.length) {
			document.write('.');
		}
	}
}

function emailLink(a) {
	document.write("<nobr><a href=\"mailto:");
	emailAddress(a,'@');
	document.write("\">");
	emailAddress(a,'@');
	document.write("</a></nobr>");
}

// function to prevent submitting form data twice
var submitcount=0;
function checkSubmit(spanName,string) {
	if (submitcount == 0) {
		submitcount++;
		// show text
		if(spanName)
			document.getElementById(spanName).innerHTML = string;
		
		return true;
	} else {
		return false;
	}
}



function new_cap()
	{
		// loads new Cap image
		if(document.getElementById)
		{
			// extract image name from image source (i.e. cut off ?randomness)
			thesrc = document.getElementById("cap").src;
			thesrc = thesrc.substring(0,thesrc.lastIndexOf(".")+4);
			// add ?(random) to prevent browser/isp caching
			document.getElementById("cap").src = thesrc+"?"+Math.round(Math.random()*100000);
		} else {
			alert("Sorry, cannot autoreload Cap image\nSubmit the form and a new image will be loaded");
		}
	}



//-->