<!-- All Insurance Agency -->
function openaia(){
	infowindow=dhtmlmodal.open('aiaInfo', 'iframe', 'aia.html', 'All Insurance Agency | Phone Number: (406) 862-8585', 'width=625px,height=515px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!--Angela Gerrett -->

function openag(){
	infowindow=dhtmlmodal.open('agInfo', 'iframe', 'ag.html', 'Angela Gerrett LCPC | Phone Number: (406)885-4696', 'width=625px,height=535px,left=100px,top=25px,,resize=0,scrolling=1')
}


<!-- Ben Franklin -->

function openbf(){
	infowindow=dhtmlmodal.open('bfInfo', 'iframe', 'bf.html', 'Ben Franklin | Phone Number: (406) 862-0865', 'width=625px,height=535px,left=100px,top=25px,,resize=0,scrolling=1')
}
<!-- Brought to Life Beads -->
function openbtlb(){
	infowindow=dhtmlmodal.open('btlbInfo', 'iframe', 'btlb.html', 'Brought to Life Beads | Phone Number: (406) 862-0865', 'width=625px,height=350px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Camas Salon -->
function opencs(){
	infowindow=dhtmlmodal.open('csInfo', 'iframe', 'cs.html', 'Camas Salon | Phone Number: (406) 862-HAIR (4247)', 'width=625px,height=400px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Cafe Max -->
function opencmsc(){
	infowindow=dhtmlmodal.open('cmscInfo', 'iframe', 'cmsc.html', 'Cafe Max Soup Co. | Website: cafemaxsoupmt.com', 'width=625px,height=450px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Cellular World -->
function opencw(){
	infowindow=dhtmlmodal.open('cwInfo', 'iframe', 'cw.html', 'Cellular World | Phone Number: (406) 863-9000', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')
}
<!-- Club Bed Resort -->
function opencb(){
	infowindow=dhtmlmodal.open('cbInfo', 'iframe', 'cb.html', 'Club Bed Resort | Phone Number: (406) 862-9020', 'width=625px,height=450px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Creative Signs & Designs -->
function opencsd(){
	infowindow=dhtmlmodal.open('csd', 'iframe', 'csd.html', 'Creative Signs & Designs | Phone Number: (406) 862-4977', 'width=625px,height=450px,left=100px,top=25px,,resize=0,scrolling=1')
}





<!-- Connie Gress Tax Service -->
function opencgts(){
	infowindow=dhtmlmodal.open('cgtsInfo', 'iframe', 'cgts.html', 'Connie Gress Tax Service | Phone Number: (406) 862-3282', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')


}
<!-- Design Expressions -->
function opende(){
	infowindow=dhtmlmodal.open('deInfo', 'iframe', 'de.html', 'Design Expressions |', 'width=625px,height=350px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!--DOS & Comapny -->

function opendso(){
	infowindow=dhtmlmodal.open('dsoInfo', 'iframe', 'dso.html', 'DSO &amp; Company | Phone Number: (406)250-6499', 'width=625px,height=535px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Creative Signs & Designs -->
function openffkg(){
	infowindow=dhtmlmodal.open('ffkg', 'iframe', 'ffkg.html', 'Flying Fish Kids Gym | Phone Number: (406) 862-3865', 'width=625px,height=450px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Frazier Appraisal -->
function openfa(){
	infowindow=dhtmlmodal.open('faInfo', 'iframe', 'fa.html', 'Frazier Appraisal Services, Inc. | Phone Number: (406) 862-3600', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Ganache -->
function openg(){
	infowindow=dhtmlmodal.open('gInfo', 'iframe', 'g.html', 'Ganache | Phone Number: (406) 314-5116', 'width=625px,height=400px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Garth Chiropractic -->
function opengc(){
	infowindow=dhtmlmodal.open('gcInfo', 'iframe', 'gc.html', 'Garth Chiropractic | Phone Number: (406) 862-9100', 'width=625px,height=375px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}

<!-- Glacier View Baptist Church -->
function opengvc(){
	infowindow=dhtmlmodal.open('gvcInfo', 'iframe', 'gvc.html', 'Glacier View Baptist Church', 'width=625px,height=375px,left=100px,top=25px,,resize=0,scrolling=1')

}

<!-- GNC -->
function opengnc(){
	infowindow=dhtmlmodal.open('gncInfo', 'iframe', 'gnc.html', 'GNC | Phone Number: (406) 862-8337', 'width=625px,height=500px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}

<!-- Healthy Life Nutrition -->
function openhln(){
	infowindow=dhtmlmodal.open('ghlnInfo', 'iframe', 'hln.html', 'Healthy Life Nutrition | Phone Number: ---', 'width=625px,height=500px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}

<!--JB NYC Fashion -->

function openjb(){
	infowindow=dhtmlmodal.open('jbInfo', 'iframe', 'jb.html', 'J&B NYC Fashion | Phone Number: (406)862-5355', 'width=625px,height=535px,left=100px,top=25px,,resize=0,scrolling=1')
}

<!-- Joli Hailey -->
function openjh(){
	infowindow=dhtmlmodal.open('jhInfo', 'iframe', 'jh.html', 'Joli Hailey | Phone Number: (406) ', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Luizannes -->
function openl(){
	infowindow=dhtmlmodal.open('lhInfo', 'iframe', 'l.html', 'Luizannes, Inc. | Phone Number: (406) 862-5317', 'width=625px,height=500px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Microsolutions -->
function openms(){
	infowindow=dhtmlmodal.open('msInfo', 'iframe', 'ms.html', 'Micro Solutions Computers | Phone Number: (406) 862-0399', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Mountain Mall Cinemas -->
function openmc(){
	infowindow=dhtmlmodal.open('mcInfo', 'iframe', 'mc.html', 'Mountain Mall Cinemas | Phone Number: (406) 862-3130', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Mountain Pacific General -->
function openmpg(){
	infowindow=dhtmlmodal.open('mpgInfo', 'iframe', 'mpg.html', 'Mountain Pacific General | Phone Number: (406) 862-9061', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- My Party Treasures -->
function openmpt(){
	infowindow=dhtmlmodal.open('mptInfo', 'iframe', 'mpt.html', 'My Party Treasures | Phone Number: (406) 755-8391', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}

<!-- My Secret Treasures -->
function openmst(){
	infowindow=dhtmlmodal.open('mstInfo', 'iframe', 'mst.html', 'My Secret Treasures | Phone Number: (406) 755-8391', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- National Parks Realty -->
function opennpr(){
	infowindow=dhtmlmodal.open('nprInfo', 'iframe', 'npr.html', 'National Parks Realty | Phone Number: (406) 599-8160', 'width=625px,height=375px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- National Park Reservations -->
function opennpres(){
	infowindow=dhtmlmodal.open('npresInfo', 'iframe', 'npres.html', 'National Park Reservations | Phone Number: (406) 862-8190', 'width=625px,height=420px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Next Level Fitness -->
function opennl(){
	infowindow=dhtmlmodal.open('nlInfo', 'iframe', 'nl.html', 'Next Level Fitness | Phone Number: (406) 862-8955', 'width=625px,height=350px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Peddlars Post -->
function openpp(){
	infowindow=dhtmlmodal.open('ppInfo', 'iframe', 'pp.html', 'Peddlers Post | Phone Number: --', 'width=625px,height=350px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Pela Beauty Academy -->
function openpba(){
	infowindow=dhtmlmodal.open('pbaInfo', 'iframe', 'pba.html', 'Pela Beauty Academy | Phone Number: (406) 862-5600', 'width=625px,height=500px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Rocky Mountain Images -->
function openrmi(){
	infowindow=dhtmlmodal.open('rmiInfo', 'iframe', 'rmi.html', 'Rocky Mountain Images | Phone Number: (406) 862-4035', 'width=625px,height=520px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Sherwood Sports Bar and Grille -->
function opensbg(){
	infowindow=dhtmlmodal.open('sbgInfo', 'iframe', 'sbg.html', 'Sherwood Sports Bar and Grille | Phone Number: (406) 862-3400', 'width=625px,height=400px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Sportsman Ski Haus -->
function openssh(){
	infowindow=dhtmlmodal.open('sshInfo', 'iframe', 'ssh.html', 'Sportsman Ski Haus | Phone Number: (406) 862-3400', 'width=625px,height=525px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Super 1 Foods -->
function opens1f(){
	infowindow=dhtmlmodal.open('s1fInfo', 'iframe', 's1f.html', 'Super 1 Foods | Phone Number: (406) 862-2222', 'width=625px,height=500px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Taco Del Sol -->
function opentds(){
	infowindow=dhtmlmodal.open('tdsInfo', 'iframe', 'tds.html', 'Taco Del Sol | Phone Number: (406) 862-8811', 'width=625px,height=450px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- The Scrub Club -->
function opentsc(){
	infowindow=dhtmlmodal.open('tscInfo', 'iframe', 'tsc.html', 'The Scrub Club | Phone Number: (406) 862-9121', 'width=625px,height=315px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- The UPS Store -->
function opentus(){
	infowindow=dhtmlmodal.open('tusInfo', 'iframe', 'tus.html', 'The UPS Store | Phone Number: (406) 862-8300', 'width=625px,height=450px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Whitefish Dance and Acrobat Studio -->
function openwds(){
	infowindow=dhtmlmodal.open('wdsInfo', 'iframe', 'wds.html', 'Whitefish Dance and Acrobat Studio | Phone Number: (406) 862-3453', 'width=625px,height=400px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- Wireless Connection -->
function openwc(){
	infowindow=dhtmlmodal.open('wcInfo', 'iframe', 'wc.html', 'Wireless Connection | Phone Number: (406) 862-3791', 'width=625px,height=525px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
<!-- The Living Word Christian Book Store -->
function opentlwcbs(){
	infowindow=dhtmlmodal.open('tlwcbsInfo', 'iframe', 'tlwcbs.html', 'The Living Word Christian Book Store | Phone Number: (406) 863-2665', 'width=625px,height=400px,left=100px,top=25px,,resize=0,scrolling=1')

infowindow.onclose=function(){ //Define custom code to run when window is closed
	var theform=this.contentDoc.forms[0] //Access first form inside iframe just for your reference
	var theemail=this.contentDoc.getElementById("emailfield") //Access form field with id="emailfield" inside iframe
	if (theemail.value.indexOf("@")==-1){ //crude check for invalid email
		alert("Please enter a valid email address")
		return false //cancel closing of modal window
	}
	else{ //else if this is a valid email
		document.getElementById("youremail").innerHTML=theemail.value //Assign the email to a span on the page
		return true //allow closing of window
	}
}
}
