﻿/*
In the <head> include:
<script type="text/javascript" src="change to PATH TO THIS SCRIPT/email.js"></script>

The function showEmail has three parameters.
	Sample IWD email: name@iwd.iowa.gov
	p1 is everything before the @. (name)
	p2 is everything between the @ and the last period.(iwd.iowa)
	p3 is everything after the last period.(gov)
	
	p2 and p3 are not required if they are the following:
	p2 is iwd.iowa
	p3 is gov
	
	In that case include "" for p2 and p3 Example:
	showEmail("lynn.waite","","") is the same as showEmail("lynn.waite","iowa","gov")
	DO NOT INCLUDE THE @ OR THE FINAL PERIOD.
*/



function showEmail(part1,part2,part3){
	if (part2==""){
		part2="iwd.iowa";
	}
	if(part3==""){
		part3="gov";
	}
	document.write(' <a class="emaiLink" href=\" mailto:' +part1+'@' +part2+'.'+part3+' \" >' );
	document.write(part1+'@' +part2+'.'+part3+' <\/a>' );
}