function DESemail(emailname,emailserver) {
	document.write("<a href='mailto:" + emailname + "@" + emailserver +"'>");
	document.write(emailname + "@" + emailserver); 
	document.write("</a>"); 
}

// Accessible Pop Ups
function DESopen(url,width,height,toolbar,scroll) {
	window.open(url, "", "scrollbars="+scroll+",toolbar="+toolbar+",height="+ height +",width="+width);
	return false;
}

function validaterequired() {
	// is the email address empty?
	if (document.survey.realemail.value.length == 0){
		alert("Please enter your email address");
		return false; // Don't submit form
	}
	// is the email address missing the obvious?
	if (document.survey.realemail.value.indexOf('@') == -1){
		alert("Please enter a valid email address");
		return false;
	}
	// is the name field empty?
	if (document.survey.realname.value.length == 0){
		alert("Please enter your name");
		return false; // Don't submit form
	}
	// if all is good, submit the form
	return true;
}



function togglediv(field)
{
if ( document.getElementById(field).style.display == 'none')
	{
	//change visibility to block, or 'visible'
	document.getElementById(field).style.display = 'block'; 
	}
	else
	{
	//change visibility 'invisible'
	document.getElementById(field).style.display = 'none'; 
	}
}

function showdiv(field)
{
	//change visibility to block, or 'visible'
	document.getElementById(field).style.display = 'block'; 
}

function hidediv(field)
{
	//change visibility to block, or 'visible'
	document.getElementById(field).style.display = 'none'; 
}


function DESopenxads(zone) {
	//document.write ("<!--//<![CDATA[");
   var m3_u = (location.protocol=='https:'?'https://d1.openx.org/ajs.php':'http://d1.openx.org/ajs.php');
   var m3_r = Math.floor(Math.random()*99999999999);
   if (!document.MAX_used) document.MAX_used = ',';
   document.write ("<scr"+"ipt type='text/javascript' src='"+m3_u);
   document.write ("?zoneid=" + zone + "&amp;target=_blank&amp;block=1&amp;blockcampaign=1");
   document.write ('&amp;cb=' + m3_r);
   if (document.MAX_used != ',') document.write ("&amp;exclude=" + document.MAX_used);
   document.write (document.charset ? '&amp;charset='+document.charset : (document.characterSet ? '&amp;charset='+document.characterSet : ''));
   document.write ("&amp;loc=" + escape(window.location));
   if (document.referrer) document.write ("&amp;referer=" + escape(document.referrer));
   if (document.context) document.write ("&context=" + escape(document.context));
   if (document.mmm_fo) document.write ("&amp;mmm_fo=1");
   document.write ("'><\/scr"+"ipt>");
  // document.write ("//]]>-->");
}
