// Standard Dreamweaver window opening function
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
// Search query validation
function validateSearch(theform) {
	if (theform.query.value=='') { 
		alert('Please type your query in the box provided.');
		return false;
	} else {
		return true;
	}
}
// Expand and collapse named div
function expandcollapse(postid) { 
	whichpost = document.getElementById(postid); 
	if (whichpost.className == "shown") { 
		whichpost.className = "hidden"; 
	} else { 
		whichpost.className = "shown"; 
	} 
}
// Write out email address to avoid robot harvesting
var sDomain = 'clubshare'; 
var sSuffix = 'co.uk'; 
function writeEmailAddress(sUser) { 
	document.write('<a href="' + 'mai' + 'lto:' + sUser + '@' + sDomain + '.' + sSuffix + '">' + sUser + '@' + sDomain + '.' + sSuffix + '</a>'); 
} 

// Copy contents of field to clipboard
function copyToCB(oField) {
	oField.focus();
	oField.select();
	if (document.all){
		theRange=oField.createTextRange();
		theRange.execCommand("Copy");
	}
}
