 			function openprompt(){
			
				var temp = {
					state0: {
                        html:'<p><img src="/tips/tips.png" width="375" /><br />To download the Free Tips available from this site, please enter your name and email address</p><div class="field"><label style="width:175px;" for="user_name">Name:<span style="font-size:98%;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></label><input type="text" name="user_name" id="user_name"  /><br /><label style="width:175px;" for="email_address">Email:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label> <input type="text" name="email_address" id="email_address" value="" /></div>',
						buttons: { Cancel: false, Finish: 1  },
						focus: 1,
						submit:function(v,m,f){ 
							if(!v) {
								setCookie('declined');
								$.prompt.close();
							} else {
								// $.prompt.goToState('state1');//go forward
								// return false; 
								setCookie('been there');
								return true; //we're done
							}
						}
					}
				}
/*					state1: {
						html:'<p><img src="/tips/tips.png" width="375" /><br />Now enter your email address <br /><!--<span class="gray">(don\'t worry, this is the LAST piece <br />of information we\'ll ask you for)</span>--></p><div class="field"><label for="email_address">Email Address:</label> <input type="text" name="email_address" id="email_address" value="" /></div>',
						buttons: { Back: -1, Cancel: 0, Finish: 1 },
						focus: 2,
						submit:function(v,m,f){ 
							if(v==0) {
								setCookie();
								$.prompt.close();
							} else if(v==1)	{							
								return true; //we're done
							} else if(v=-1) {
								$.prompt.goToState('state2');//go back
								return false; 
							}
						}
					}
				}*/
				
				$.prompt(temp,{
					callback: function(v,m,f){
						// var str = '<a href="15_Tips.pdf">Click Here</a> to download the PDF with your Free Tips! <br />';
						/*$.each(f,function(i,obj){
							str += i + " - <em>" + obj + "</em><br />";
						});	
						$.prompt(str);*/
                            var str = '';
                     	    $.each(f,function(i,obj){
					    	        str += i + "=" + obj + "&";
				           });	
					       window.location='?'+str+'submitted=1';
                           //$.prompt(str);
					}
				});
			}

		/*====================================================================*/
		function download(){
			
				var temp = {
					state0: {
                        html:'<p><a href="/tips/15EasyAndPracticalOrganizingTipsEvenYouCanImplement.pdf" target="_blank">Click Here</a> to download the PDF with your Free Tips! <br />',
						buttons: { Finish: true },
						focus: 1,
						submit:function(v,m,f){ 
							if(!v)
								$.prompt.close()
							else 
								return true;//go forward
						}
					}
				}
				$.prompt(temp,{
					callback: function(v,m,f){
                            var str = 'Thank you for downloading our Free Tips';
                           $.prompt(str);
					}
				});
			}


		/*====================================================================*/
		function deleteCookie() {
			// alert('deleting "tip_check" cookie');
			$.cookie('tip_check', null, { expires: -1, path: '/', domain: 'sortedorganizing.com', secure: false });
		}
		
		/*====================================================================*/
		function setCookie(val) {
			// alert('Writing "tip_check = '+val+'" cookie');
			$.cookie('tip_check', val, { expires: 90, path: '/', domain: 'sortedorganizing.com', secure: false });
		}
