
<!--
// Functions to replace mailto tags in a page - also removes the footer
var open_box=false;
var mcount=0;
var QRcodes=new Array();


function remove_the_mailtos(){

if (parent.frames.length != 0) {
	 // loaded in frames
		
	// 21/10 DL commented alert box as per RM's request
	//delete the footer
	document.getElementById('footer').style.display='none';
	

	//add in stylesheet
	var headID = document.getElementsByTagName("head")[0];
	var cssNode = document.createElement('link');
	cssNode.type = 'text/css';
	cssNode.rel = 'stylesheet';
	cssNode.href = 'http://www.exeter.ac.uk/codebox/kiosk/danKiosk.css';
	cssNode.media = 'screen';
	headID.appendChild(cssNode);
	
	var atags=document.getElementsByTagName('a');
	for (n=0;n<atags.length;n++){
		if ( atags[n].href.search(/ailto:/i) >0 ) removeMailtag(atags[n]);
	}
	

}
}


function popQR(num){
	if (open_box) closeQR(open_box);
	open_box=num;
	document.getElementById('zqrblock'+num).setAttribute("class", "zqrcode_show");
	document.getElementById('zqrh'+num).style.display="";
	
}

function closeQR(num){
	document.getElementById('zqrblock'+num).setAttribute("class", "zqrcode_hide");
	document.getElementById('zqrh'+num).style.display="none";
	open_box=false;
}


function removeMailtag(tag){

	QRcodes[mcount]='http://chart.apis.google.com/chart?cht=qr&chs=75x75&chl=SMTP:'+tag.href.replace(/mailto:/i,"")+':%13:%13';
	var email=tag.innerHTML;
	
	tag.innerHTML+="<div id='zqrblock"+mcount+"' class='zqrcode_block' style='min-width: "+(email.length*0.9) +"em' ><div id='zqrh"+mcount+"' style='display:none'>\
	 <a href='javascript:void(closeQR("+mcount+"))'><img src='http://www.exeter.ac.uk/codebox/kiosk/icon-close.png' width='23' height='23' alt='Close QR Code' class='qr_close'  style='float:right;border:none;margin:0px;padding:0px' /></a>\
	 <div class='qr_email_address'>"+email+"</div>\
	 <img id='zqr"+mcount+"' src='"+QRcodes[mcount]+"'  />\
	 <p class='qr_text' style='width: "+(email.length*1.1) +"em' >You cannot email from this machine, but if you have a smart phone, you can use this QR code to capture the email address</p>\
	 </div></div>";
	
	tag.href="javascript:void(popQR("+mcount+"))";
mcount++;	
}



  //-->

