function openprompt(){

				var temp = {
					state0: {
						html:'<div class="survey">Survey response poll</div>'+'<div class="theQestion">Are you familiar with property in the East Tennessee area?</div>',
						buttons: { Yes: true, No: false },
						focus: 0,
						submit:function(){ 
						$.prompt.goToState('state1');//go forward
							return false; 
						}
					},
					state1: {
						html:'<div class="survey">Survey response poll</div>'+'<div class="theQestion">Would you like to receive area property updates?</div>',
						buttons: { Yes: 0, 'Maybe Later': 1 },
						focus: 0,
						submit:function(v){ 
							if(v==1)
								$.prompt.close();
							else  
							if(v==0)
								$.prompt.goToState('state2');//go forward
							return false;  
						}
					},
					state2: {
						html:'<div class="survey">Survey response poll</div>'+'<div class="theQestion">Enter your name and email address.</div>'+'<form action="popup_emailer_upload.asp" method="post" name="popupForm">'+'<div class="field" style="margin-top:5px;"><label for="name" style="margin-right:5px;">Name</label><input type="text" name="popupName" id="name" value="" /></div><br />'+'<div class="field" style="margin-top:5px;"><label for="email" style="margin-right:7px;">Email</label><input type="text" name="popupEmail" id="email" value="" /></div>'+'</form>',
						buttons: { Submit: true, Cancel: false },
						submit:function(v){ 
							if(v) {
								if($('#name').val() == ""){
								alert("Please enter your name, then click Submit!");
								$("#name").focus();
								return false;
								}
								else{
								theName = $('#name').val();
								}
								
								if($('#email').val() == ""){
								alert("Please enter your email, then click Submit!");
								$("#email").focus();
								return false;
								}
								else{
								theEmail = $('#email').val();
								}
// =================================================================
//alert(theName);
//alert(theEmail);
							//var doc_body = document.getElementById("place");
	//doc_body.innerHTML = "<form action='popup_emailer_upload.asp' method='post' name='popupForm'><p>I have so much to tell you about this topic I don\'t know where to begin... and "+theName+" and "+theEmail+"</p><input class="popupSubmitButton" name="submit" type="submit" value="Submit" /></form>";
						}
							else
							return true; 
						}  // closes submit
					}
				}
				$.prompt(temp);

} // end of openprompt function

function checkPromptDisplay(){
var theCSS = $("#nameEmailPopup").css("display");
if(theCSS != "none") {
openprompt();
}}

