403Webshell
Server IP : 10.200.247.200  /  Your IP : 216.73.217.19
Web Server : Apache
System : Linux synergy-usa-sites 6.8.0-138-generic #138-Ubuntu SMP PREEMPT_DYNAMIC Fri Jul 31 22:41:49 UTC 2026 x86_64
User : jeremy ( 1001)
PHP Version : 8.4.25
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/development/dev.americansocietyforassetprotection.com/member/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/development/dev.americansocietyforassetprotection.com/member/questionnaire2.php
<?php 
	session_start();
	$SESSION_PAGE = "questionnaire";
	$_SESSION['last_page'] = $SESSION_PAGE;
	$body_id = 'quest';  
	$title = 'Confidential Questionnaire'; 
	require_once('binx/includes/odds/header.php');
	require_once('binx/php/functions.php');
	require_once('binx/php/global_arrays.php');
	
	$PRESONAL_INFO_QRY = $db->query("SELECT * FROM Members WHERE username = '$USERNAME' AND username != ''");
	$PIR = $PRESONAL_INFO_QRY[0];
	
	$BENEFICIARY_QRY = $db->query("SELECT * FROM Recipients WHERE username = '$USERNAME' AND ( relationship = 'Daughter' OR relationship = 'Father' OR relationship = 'Son' OR relationship = 'Mother' OR relationship = 'Foster Child' OR relationship = 'Foster Parent' OR relationship = 'Step Mother' OR relationship = 'Step Father' OR relationship = 'Step Son' OR relationship = 'Step Daughter' ) AND username != ''");
	
	$ASSETS_QRY = $db->query("SELECT * FROM Assets WHERE username = '$USERNAME' AND username != ''");
	$ASSETS = $ASSETS_QRY[0];
?>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.0/jquery.min.js"></script> 
<script language="javascript" type="text/javascript" src="../inc/script.js"></script>
<script>

	function numbers_only(evt) 
	{
		var charCode = (evt.which) ? evt.which : event.keyCode;
		//alert(charCode);
		if (evt.shiftKey)
		{
			return false;	
		}
		if(charCode == 16)
		{
			return false;	
		}
		if (charCode > 9 && (charCode < 48 || charCode > 57) && charCode != 46 && charCode != 37 && charCode != 39)
		{
			if(charCode <= 105 && charCode >= 96 && charCode != 16)
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return true;
		}
	}
	function submit_questionnaire()
	{
		if($('#id-client-your-signature-').val() == "")
		{
			alert("Please sign the questionnaire.");
		}
		else
		{
			if($('#id-spouse-first-name-').val() != "")
			{
				if($('#id-client-spouse-signature-').val() == "")
				{
					alert("The spouse must sign the questionnaire.");
				}
				else
				{
					save_document();
					var str = "";
					var elem = document.getElementById('dform').elements;
			
					var q1 = $("input:radio[name='client_q1']:checked").val();				str += "&client_q1="+q1;
					var q1a = $("input:radio[name='client_q1a']:checked").val();			str += "&client_q1a="+q1a;	
					var q2 = $("input:radio[name='client_q2']:checked").val();				str += "&client_q2="+q2;	
					var q3 = $("input:radio[name='client_q3']:checked").val();				str += "&client_q3="+q3;
					var q4 = $("input:radio[name='client_q4']:checked").val();				str += "&client_q4="+q4;
					var q4a = $("input:radio[name='client_q4a']:checked").val();			str += "&client_q4a="+q4a;	
					var q5 = $("input:radio[name='client_q5']:checked").val();				str += "&client_q5="+q5;
					var q5a = $("input:radio[name='client_q6']:checked").val();				str += "&client_q6="+q5a;
					var q5aa = $("input:radio[name='client_q6a']:checked").val();			str += "&client_q6a="+q5aa;
			
					for(var i = 0; i < elem.length; i++)
					{
						if(elem[i].type != "radio")
						{
							str += "&"+elem[i].name;
							str += "="+elem[i].value;
						}
					} 
					$('html,body').animate({
					opacity: 0.8
					}, 1000);
					//alert(str);
					$('.ui-save-block').fadeIn(500);
					$('html.body.ui-save-block').css('opacity', '1');	
					$('.ui-save-block').find('h1').text("SENDING...");
					$.ajax({
					cache: false,
					type: "POST",
					data: str,
					url: "../confidential_questionnaire_save_n_send.php",
						success: function(msg)
						{
							//window.location = "confidential_questionnaire.php";
							$("#questionnaire").html(msg);
							$('html,body').animate({
							scrollTop: 0
							}, 1000, function(){
								$("#questionnaire").hide().fadeIn(800);
								$('html,body').animate({
								opacity: 1
								}, 1000);
								$('.ui-save-block').fadeOut(500);					
							});
			
						}
					});
				}
			}
			else
			{		
				save_document();
				var str = "";
				var elem = document.getElementById('dform').elements;
		
				var q1 = $("input:radio[name='client_q1']:checked").val();				str += "&client_q1="+q1;
				var q1a = $("input:radio[name='client_q1a']:checked").val();			str += "&client_q1a="+q1a;	
				var q2 = $("input:radio[name='client_q2']:checked").val();				str += "&client_q2="+q2;	
				var q3 = $("input:radio[name='client_q3']:checked").val();				str += "&client_q3="+q3;
				var q4 = $("input:radio[name='client_q4']:checked").val();				str += "&client_q4="+q4;
				var q4a = $("input:radio[name='client_q4a']:checked").val();			str += "&client_q4a="+q4a;	
				var q5 = $("input:radio[name='client_q5']:checked").val();				str += "&client_q5="+q5;
				var q5a = $("input:radio[name='client_q6']:checked").val();				str += "&client_q6="+q5a;
				var q5aa = $("input:radio[name='client_q6a']:checked").val();			str += "&client_q6a="+q5aa;
		
				for(var i = 0; i < elem.length; i++)
				{
					if(elem[i].type != "radio")
					{
						str += "&"+elem[i].name;
						str += "="+elem[i].value;
					}
				} 
				$('html,body').animate({
				opacity: 0.8
				}, 1000);
				//alert(str);
				$('.ui-save-block').fadeIn(500);
				$('html.body.ui-save-block').css('opacity', '1');	
				$('.ui-save-block').find('h1').text("SENDING...");
				$.ajax({
				cache: false,
				type: "POST",
				data: str,
				url: "../confidential_questionnaire_save_n_send.php",
					success: function(msg)
					{
						//window.location = "confidential_questionnaire.php";
						$("#questionnaire").html(msg);
						$('html,body').animate({
						scrollTop: 0
						}, 1000, function(){
							$("#questionnaire").hide().fadeIn(800);
							$('html,body').animate({
							opacity: 1
							}, 1000);
							$('.ui-save-block').fadeOut(500);					
						});
		
					}
				});
			}
		}
	} 
	function clearborder() 
	{
		document.getElementById('applicant').className='border_white';
		document.getElementById('assets').className='border_white';
		document.getElementById('calculate').className='border_white';
		document.getElementById('signature').className='border_white';
	}
	function redborder(id) 
	{
		clearborder();
		document.getElementById(id).className='border_error';
	}

	$(document).ready(function(e) {
		calc_networth();
		calc_insurance();
	});
	
	function check_field(name)
	{
		var output = "";;
		output = $('#id-'+name).val();
		var s_name = name;
		if(s_name.indexOf("phone") != -1)
		{
			output = output.replace("-", "");
			output = output.replace("(", "");
			output = output.replace(")", "");
			output = output.replace(".", "");
			output = output.replace("+", "");
			output = output.replace("*", "");
		}
		if(output != ''){$('#id-'+name).removeClass('empty-data'); }
		else{ $('#id-'+name).addClass('empty-data'); }
		return output;
	}
	function success_result()
	{
		//alert("Saved");
	}
	function failed_result()
	{
		//alert("Failed");
	}
	function save_personal_info()
	{
		var str = "dummy=dummy";
		var cfn = check_field('client-first-name-');				str += "&cfn="+cfn;
		var cmn = $('#id-client-middle-name-').val();				str += "&cmn="+cmn;
		var cln = check_field('client-last-name-');					str += "&cln="+cln;
		var cocc = check_field('client-occupation-');				str += "&cocc="+cocc;
		var cby = check_field('client-birth-year-');				str += "&cby="+cby;

		var sfn = $('#id-spouse-first-name-').val();				str += "&sfn="+sfn;
		var smn = $('#id-spouse-middle-name-').val();				str += "&smn="+smn;
		var sln = $('#id-spouse-last-name-').val();					str += "&sln="+sln;
		var socc = $('#id-spouse-occupation-').val();				str += "&socc="+socc;
		var sby = $('#id-spouse-birth-year-').val();				str += "&sby="+sby;
		
		var smdn = $('#id-spouse-maiden-name-').val();				str += "&smdn="+smdn;
		var ipm = $('#id-prior-marraige').val();					str += "&ipm="+ipm;
		var ipmhm = $('#id-spouse-how-many-').val();				str += "&ipmhm="+ipmhm;
		
		var cpp = check_field('client-primary-phone-');				str += "&cpp="+cpp;
		var cmp = $('#id-client-mobile-phone-').val();				str += "&cmp="+cmp;
		var cop = $('#id-client-office-phone-').val();				str += "&cop="+cop;
		var cfxn = $('#id-client-fax-number-').val();				str += "&cfxn="+cfxn;
		
		var csa = check_field('client-street-address-');			str += "&csa="+csa;
		var cct = check_field('client-city-');						str += "&cct="+cct;
		var ccy = $('#id-client-county-').val();					str += "&ccy="+ccy;
		var ccs = check_field('client-state-');						str += "&ccs="+ccs;
		var ccz = check_field('client-zip-');						str += "&ccz="+ccz;
		var cce = check_field('client-email-');						str += "&cce="+cce;

		var adt = $('#id-additional-details').val();				str += "&adt="+adt;
		
		var cys = check_field('client-your-signature-');			str += "&cys="+cys;
		var css = check_field('client-spouse-signature-');			str += "&css="+css;

		$.ajax
		({
			cache: false,
			type: "POST",
			dataType: "json",
			data: str,
			url: "binx/ajax/update-personal-user-info.php",
			success: function(msg)
			{
				//alert(msg.message);
				if(msg.message == "Success")
				{
					success_result();
				}
				else
				{
					failed_result();
				}
			},error: function()
			{
				alert('Error save_personal_info');
			}
		});	
	}
	function save_asset_questions()
	{
		var str = "username="+$('#id-client-email-').val();
		var q1 = $("input:radio[name='client_q1']:checked").val();				str += "&q1="+q1;
		var q1a = $("input:radio[name='client_q1a']:checked").val();			str += "&q1a="+q1a;	
		var q2 = $("input:radio[name='client_q2']:checked").val();				str += "&q2="+q2;	
		var q2_explain = $("#id-client-please-explain-q2--").val();				str += "&q2_explain="+q2_explain;
		
		var q3 = $("input:radio[name='client_q3']:checked").val();				str += "&q3="+q3;
		var q3_explain = $("#id-client-please-explain-q3--").val();				str += "&q3_explain="+q3_explain;
		
		var q4 = $("input:radio[name='client_q4']:checked").val();				str += "&q4="+q4;
		var q4a = $("input:radio[name='client_q4a']:checked").val();			str += "&q4a="+q4a;
		var q4_explain = $("#id-client-please-explain-q4--").val();				str += "&q4_explain="+q4_explain;
			
		var q5 = $("input:radio[name='client_q5']:checked").val();				str += "&q5="+q5;
		var q5_explain = $("#id-client-please-explain-q5--").val();				str += "&q5_explain="+q5_explain;
		var q5a = $("input:radio[name='client_q6']:checked").val();				str += "&q5a="+q5a;
		var q5aa = $("input:radio[name='client_q6a']:checked").val();			str += "&q5aa="+q5aa;
		var q5aa_explain = $("#id-client-please-explain-q6a--").val();			str += "&q5aa_explain="+q5aa_explain;
		var q5aa_when = $("#id-client-please-explain-q6b--").val();				str += "&q5aa_when="+q5aa_when;
			
		var q6a = $("#id-client-0-1").val();				str += "&q6a="+q6a;
		var q6b = $("#id-client-0-2").val();				str += "&q6b="+q6b;
		var q6c = $("#id-client-0-3").val();				str += "&q6c="+q6c;
		var q6d = $("#id-client-0-4").val();				str += "&q6d="+q6d;
		var q6e = $("#id-client-0-5").val();				str += "&q6e="+q6e;
		var q6f = $("#id-client-0-6").val();				str += "&q6f="+q6f;
		var q6g = $("#id-client-0-7").val();				str += "&q6g="+q6g;
		var q6h = $("#id-client-0-8").val();				str += "&q6h="+q6h;	
	
		$.ajax
		({
			cache: false,
			type: "POST",
			dataType: "json",
			data: str,
			url: "binx/ajax/update-asset-question.php",
			success: function(msg)
			{
				//alert(msg.message);
				if(msg.message == "Success")
				{
					success_result();
				}
				else
				{
					failed_result();
				}
			},error: function()
			{
				alert('Error save_asset_questions');
			}
		});	
	
	}
	function save_children()
	{
		var str = "username="+$('#id-client-email-').val();
		for(var i = 1; i < 6; i++)
		{
			var bfn = $('#id-beneficiary-name-'+i).val(); 				str += "&bfn"+i+"="+bfn;
			var brl = $('#id-beneficiary-relationship-'+i).val(); 		str += "&brl"+i+"="+brl;
			var bot = $('#id-beneficiary-other-'+i).val(); 				str += "&bot"+i+"="+bot;
			var bag = $('#id-beneficiary-age-'+i).val(); 				str += "&bag"+i+"="+bag;
			var bcm = $('#id-beneficiary-comments-'+i).val(); 			str += "&bcm"+i+"="+bcm;
		}
		$.ajax
		({
			cache: false,
			type: "POST",
			dataType: "json",
			data: str,
			url: "binx/ajax/update-blueprint-beneficiary.php",
			success: function(msg)
			{
				//alert(msg.message);
				if(msg.message == "Success")
				{
					success_result();
				}
				else
				{
					failed_result();
				}
			},error: function()
			{
				alert('Error save_children');
			}
		});	
	}
	function save_blueprint_assets()
	{
		var str = "username="+$('#id-client-email-').val();
		
		for(var i = 1; i < 19; i++)
		{
			var can = $('#id-client-asset-value--'+i).closest('tr').find('td:first').find('p').text(); 			
			can = can.replace(":", "");
			str += "&can"+i+"="+can;
			var cav = $('#id-client-asset-value--'+i).val(); 			str += "&cav"+i+"="+cav;
			var cat = $('#id-client-asset-title--'+i).val(); 			str += "&cat"+i+"="+cat;
		}
		$.ajax
		({
			cache: false,
			type: "POST",
			dataType: "json",
			data: str,
			url: "binx/ajax/update-blueprint-assets.php",
			success: function(msg)
			{
				//alert(msg.message);
				if(msg.message == "Success")
				{
					success_result();
				}
				else
				{
					failed_result();
				}
			},error: function()
			{
				alert('Error save_blueprint_assets');
			}
		});
	}
	function save_blueprint_liabilities()
	{
		var str = "username="+$('#id-client-email-').val();
		
		for(var i = 1; i < 10; i++)
		{
			var cln = $('#id-client-liabilities-value--'+i).closest('tr').find('td:first').find('p').text(); 			
			cln = cln.replace(":", "");
			str += "&cln"+i+"="+cln;
			var clv = $('#id-client-liabilities-value--'+i).val(); 			str += "&clv"+i+"="+clv;
		}
		$.ajax
		({
			cache: false,
			type: "POST",
			dataType: "json",
			data: str,
			url: "binx/ajax/update-blueprint-liabilities.php",
			success: function(msg)
			{
				//alert(msg.message);
				if(msg.message == "Success")
				{
					success_result();
				}
				else
				{
					failed_result();
				}
			},error: function()
			{
				alert('Error save_blueprint_liabilities');
			}
		});
	}
	function save_document()
	{
		save_blueprint_liabilities();
		save_blueprint_assets();
		save_personal_info();
		save_children();
		save_asset_questions();
	}
	function save_user_document()
	{
		$('html,body').animate({
		opacity: 0.8
		}, 1000);
		//alert(str);
		$('.ui-save-block').fadeIn(500);
		$('html.body.ui-save-block').css('opacity', '0.5');	
		$('.ui-save-block').find('h1').text("SAVING...");
				
				save_blueprint_liabilities();
				save_blueprint_assets();
				save_personal_info();
				save_children();
				save_asset_questions();
				$('html,body').animate({
				opacity: 1
				}, 1000);
				$('.ui-save-block').fadeOut(500);					
	}
-->
</script>
<style type="text/css">
	.ui-form-element{
		margin-bottom:3px;	
	}
	.ui-questionnaire-section-form{
		background-color:#FFF;
		border:1px solid #bca6a0;		
		padding:8px;
		margin-bottom:8px;
	}
	.ui-questionnaire-section-subform{
		background:#f3f1e8;
		border:1px solid #f2e5e2;	
		padding:8px;
		margin-bottom:8px;
	}
	.content{
		margin-left:16px;	
	}
	.content_, div, h1, h2, h3{
		font-family:"Trajan", Times, serif;
		font-weight:normal;
		color:#410900;
	}
	.empty-data{
		border:1px solid #a69c97 !important;
		box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.10);
		-moz-box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.10);
		-webkit-box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.10);	
	}
	p{
		font-size:16px !important;
		font-family:"Times New Roman", Times, serif;	
	}
	input, select{
		background-color:#FFF;
		padding:2px;
		border:1px solid #b7ada8 !important;	
	}
	.ui-radio{
		margin-right:-1px;	
		cursor:pointer;
	}
	td{
		vertical-align:top;	
	}
	#id-tub-selects p{
	 position:relative; 
	 top:-14px;
	 margin-bottom:-14px;
	}
	th{
		font-family:"Trajan", Times, serif;
		font-weight:normal;
		color:#410900;
		border:1px solid #b7ada8 !important;	
		background: rgb(243,241,232); /* Old browsers */
		background: -moz-linear-gradient(top,  rgba(243,241,232,1) 0%, rgba(231,228,214,1) 100%); /* FF3.6+ */
		background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(243,241,232,1)), color-stop(100%,rgba(231,228,214,1))); /* Chrome,Safari4+ */
		background: -webkit-linear-gradient(top,  rgba(243,241,232,1) 0%,rgba(231,228,214,1) 100%); /* Chrome10+,Safari5.1+ */
		background: -o-linear-gradient(top,  rgba(243,241,232,1) 0%,rgba(231,228,214,1) 100%); /* Opera 11.10+ */
		background: -ms-linear-gradient(top,  rgba(243,241,232,1) 0%,rgba(231,228,214,1) 100%); /* IE10+ */
		background: linear-gradient(to bottom,  rgba(243,241,232,1) 0%,rgba(231,228,214,1) 100%); /* W3C */
		filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#f3f1e8', endColorstr='#e7e4d6',GradientType=0 ); /* IE6-9 */
		padding:6px 12px 6px 12px;
		margin-right:-1px;
	}
	#questionnaire{
		padding:24px;
		border:1px solid #000;
		display:inline-block;
		background-image:url(../images/questionnaire_feedback_bg.jpg);
		color:#ffffff !important;
		text-shadow:1px 1px 2px #0c2872;
		box-shadow:inset 0px 6px 8px rgba(0, 0, 0, 0.32);
		-moz-box-shadow:inset 0px 6px 8px rgba(0, 0, 0, 0.32);
		-webkit-box-shadow:inset 0px 6px 8px rgba(0, 0, 0, 0.32);
	}
	#questionnaire a{
		color:#ffffff !important;
		text-shadow:-1px 1px 2px #0c2872;
	}
	.ui-save-block{
		position:fixed; 
		width:100%;
		height:100%;
		top:0px; 
		left:0px; 
		z-index:100001; 
		display:none; 
		text-align:center; 
		vertical-align:middle; 
		padding:250px; 
		color:#410900 !important; 
		font-size:24px;
		text-shadow:-1px 1px 12px #ffffff;
		opacity:1;
		font-family:"Trebuchet MS", Arial, Helvetica, sans-serif;
	}
</style>
<div class="ui-save-block"><h1 style="color:#410900 !important; z-index:100003; font-family:Trebuchet MS, Arial, Helvetica, sans-serif; ">SENDING...</h1></div>
<div class="content" style="font-size:12px !important;">
<div class="content_" style="margin:10px; position:relative; left:10px;">
<center>
    <div id="questionnaire" style="display:none;">
    </div>
</center>
<form name="dform" id="dform" method="post" action="confidential_questionnaire.php" accept-charset="UTF-8">
                    <center>
                        <div align="left" style="margin-top:8px; width:818px; font-size:12px;">
                            <p>
                            This is the questionnaire the attorney needs to begin the process of creating your customized asset protection blueprint. Your information will be kept confidential and is protected by attorney client privilege. Your blueprint will be completed by one of the finest and most experienced asset protection attorneys in the country. The blueprint will clearly illustrate the legal entities you need to best protect your assets and is customized and tailored based on your profession, assets, goals, and the state in which you live.
                            </p>
                        </div>
                    </center>
                    <center>
                        <div align="left" style="width:600px;">
                            <?php print $output;?>
                        </div>
                    </center>
                    <br />

                    <div class="ui-questionnaire-section-form">
                        <div class="ui-questionnaire-header-title" style="width:100%; text-align:center; vertical-align:top;">
                            <h1 style="font-size:16px;">
                                Personal Information
                            </h1>
                            <hr style="width:80%;" />
                        </div>
                        <br />
                        
                        <div class="ui-questionnaire-section-subform">
                            <h3 style="font-size:14px;">
                            	Yourself
                            </h3>
                            <hr />
                            <?= element_input("client", "first-name", "", "medium", 64, $PIR['first_name'], 0, 1) ?>
                            <?= element_input("client", "middle-name", "", "medium", 64, $PIR['middle_name'], 0, 0) ?>
                            <?= element_input("client", "last-name", "", "medium", 64, $PIR['last_name'], 0, 1) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_input("client", "occupation", "", "large", 128, $PIR['occupation'], 0, 1) ?>
                            <div class="ui-form-element" style="display:inline-block;">
                                <label class="ui-label">
                                    Year of Birth
                                    <br />
                                    <?= element_select_array("client", "birth-year", "", "medium", 0, $PIR['birth_year'], $YEAR_ARR, 0) ?>
                                </label>
                            </div>
                    	</div>
                        
                        <div style="clear:both"></div>
                        
                        <div class="ui-questionnaire-section-subform">
                            <h3 style="font-size:14px;">
                            	Your Spouse
                            </h3>
                            <hr />
                            <?= element_input("spouse", "first-name", "", "medium", 64, $PIR['spouse_first_name'], 0, 1) ?>
                            <?= element_input("spouse", "middle-name", "", "medium", 64, $PIR['spouse_middle_name'], 0, 0) ?>
                            <?= element_input("spouse", "last-name", "", "medium", 64, $PIR['spouse_last_name'], 0, 1) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_input("spouse", "occupation", "", "large", 128, $PIR['spouse_occupation'], 0, 1) ?>
                            <div class="ui-form-element" style="display:inline-block;">
                                <label class="ui-label">
                                    Year of Birth
                                    <br />
                                    <?= element_select_array("spouse", "birth-year", "", "medium", 0, $PIR['spouse_birth_year'], $YEAR_ARR, 0) ?>
                                </label>
                            </div>
                        </div>
                        
                        <div style="clear:both"></div>

						<div style="padding:8px;">
                            <?= element_input("spouse", "maiden-name", "", "medium", 64, $PIR['maiden_name'], 0, 1) ?>
                            <div class="ui-form-element" style="display:inline-block;">
                                <label class="ui-label">
                                    Any Prior Marriages?
                                    <br />
                                    <script language="javascript">
									function toggle_prior_marriages()
									{
										var temp = $('#id-prior-marriage').val();
										if( temp == "yes" )
										{
											$('#id-prior-marriage-how-many').fadeIn(200);
										}
										else
										{
											$('#id-prior-marriage-how-many').fadeOut(200);
										}
									}
									</script>
                                    <?php $TPM_PM = $PIR['prior_marraige']; ?>
                                    <select class="ui-select" id="id-prior-marriage" name="prior_marraige" onchange="toggle_prior_marriages()" style="width:100px;">
                                    	<option value="x" >Select</option>
                                        <option value="yes" >Yes</option>
                                        <option value="no" >No</option>
                                    </select>
                                </label>
                            </div>
                            <div style="display:inline-block;">
                                <div id="id-prior-marriage-how-many" style="display:none;">
                                    <?= element_input("spouse", "how-many", "", "small", 4, $PIR['prior_marraige_num'], 1, 0) ?>
                                </div>
                            </div>
                            
                            <div style="clear:both"></div>
                            <br />
                            <br />
							<div style="clear:both"></div>
                            
                            <?= element_input("client", "primary-phone", "", "medium", 10, preg_replace("/[^A-Za-z0-9]/","",$PIR['evening_phone']), 1, 1) ?>
                            <?= element_input("client", "mobile-phone", "", "medium", 10, preg_replace("/[^A-Za-z0-9]/","",$PIR['mobile_phone']), 1, 0) ?>
                            <?= element_input("client", "office-phone", "", "medium", 10, preg_replace("/[^A-Za-z0-9]/","",$PIR['office_phone']), 1, 0) ?>
                            <?= element_input("client", "fax-number", "", "medium", 10, preg_replace("/[^A-Za-z0-9]/","",$PIR['fax_number']), 1, 0) ?>
                            
                            <div style="clear:both"></div>
                            <br />    
                            <div style="clear:both"></div>
                            
                            <?= element_input("client", "street-address", "", "large", 128, $PIR['street_address'], 0, 1) ?>
                            <?= element_input("client", "city", "", "medium", 128, $PIR['city'], 0, 1) ?>
                            <?= element_input("client", "county", "", "medium", 128, $PIR['county'], 0, 0) ?>
                            <?= element_select_array("client", "state", "", "medium", 0, $PIR['state'], $STATE_ARR, 1) ?>
                            <?= element_input("client", "zip", "", "small", 5, $PIR['zip'], 1, 1) ?>
    
                            <div style="clear:both"></div>
                            
                            <?= element_input("client", "email", "", "large", 128, $PIR['email'], 0, 1) ?>
                        </div>
                        
                        <div style="clear:both"></div>
                        <br />
                    </div>

                    <div class="ui-questionnaire-section-form">
                        <div class="ui-questionnaire-header-title" style="width:100%; text-align:center; vertical-align:top;">
                            <h1 style="font-size:16px;">
                                Children / Beneficiaries
                            </h1>
                            <hr style="width:80%;" />
                        </div>
                        <br />
                        
                        <div class="ui-questionnaire-section-subform">

						<?php			
				$MY_BEN_QRY = $db->query("SELECT fullname, relationship, relationship_other, age, comments FROM BlueprintBeneficiaries WHERE username = '$USERNAME' AND bene_id = '1' AND username != ''");
				$BEN = $MY_BEN_QRY[0];
						?>
                            <?= element_inputx("beneficiary", "name", "1", "large", 128, $BEN['fullname'], 0, 0) ?>
                            <?= element_select_arrayx("beneficiary", "relationship", "1", "medium", 0, $BEN['relationship'], $RELATION_ARR, 0) ?>
                            <?= element_inputx("beneficiary", "other", "1", "small", 64, $BEN['relationship_other'], 0, 0) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_inputx("beneficiary", "age", "1", "small", 64, $BEN['age'], 0, 0) ?>
                            <?= element_inputx("beneficiary", "comments", "1", "large", 128, $BEN['comments'], 0, 0) ?>

							<?php			
				$MY_BEN_QRY = $db->query("SELECT fullname, relationship, relationship_other, age, comments FROM BlueprintBeneficiaries WHERE username = '$USERNAME' AND bene_id = '2' AND username != ''");
				$BEN = $MY_BEN_QRY[0];
						?>
                            <?= element_inputx("beneficiary", "name", "2", "large", 128, $BEN['fullname'], 0, 0) ?>
                            <?= element_select_arrayx("beneficiary", "relationship", "2", "medium", 0, $BEN['relationship'], $RELATION_ARR, 0) ?>
                            <?= element_inputx("beneficiary", "other", "2", "small", 64, $BEN['relationship_other'], 0, 0) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_inputx("beneficiary", "age", "2", "small", 64, $BEN['age'], 0, 0) ?>
                            <?= element_inputx("beneficiary", "comments", "2", "large", 128, $BEN['comments'], 0, 0) ?>
                            
                            <?php			
				$MY_BEN_QRY = $db->query("SELECT fullname, relationship, relationship_other, age, comments FROM BlueprintBeneficiaries WHERE username = '$USERNAME' AND bene_id = '3' AND username != ''");
				$BEN = $MY_BEN_QRY[0];
						?>
                            <?= element_inputx("beneficiary", "name", "3", "large", 128, $BEN['fullname'], 0, 0) ?>
                            <?= element_select_arrayx("beneficiary", "relationship", "3", "medium", 0, $BEN['relationship'], $RELATION_ARR, 0) ?>
                            <?= element_inputx("beneficiary", "other", "3", "small", 64, $BEN['relationship_other'], 0, 0) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_inputx("beneficiary", "age", "3", "small", 64, $BEN['age'], 0, 0) ?>
                            <?= element_inputx("beneficiary", "comments", "3", "large", 128, $BEN['comments'], 0, 0) ?>
                            
                            <?php			
				$MY_BEN_QRY = $db->query("SELECT fullname, relationship, relationship_other, age, comments FROM BlueprintBeneficiaries WHERE username = '$USERNAME' AND bene_id = '4' AND username != ''");
				$BEN = $MY_BEN_QRY[0];
						?>
                            <?= element_inputx("beneficiary", "name", "4", "large", 128, $BEN['fullname'], 0, 0) ?>
                            <?= element_select_arrayx("beneficiary", "relationship", "4", "medium", 0, $BEN['relationship'], $RELATION_ARR, 0) ?>
                            <?= element_inputx("beneficiary", "other", "4", "small", 64, $BEN['relationship_other'], 0, 0) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_inputx("beneficiary", "age", "4", "small", 64, $BEN['age'], 0, 0) ?>
                            <?= element_inputx("beneficiary", "comments", "4", "large", 128, $BEN['comments'], 0, 0) ?>
                            
                            <?php			
				$MY_BEN_QRY = $db->query("SELECT fullname, relationship, relationship_other, age, comments FROM BlueprintBeneficiaries WHERE username = '$USERNAME' AND bene_id = '5' AND username != ''");
				$BEN = $MY_BEN_QRY[0];
						?>
                            <?= element_inputx("beneficiary", "name", "5", "large", 128, $BEN['fullname'], 0, 0) ?>
                            <?= element_select_arrayx("beneficiary", "relationship", "5", "medium", 0, $BEN['relationship'], $RELATION_ARR, 0) ?>
                            <?= element_inputx("beneficiary", "other", "5", "small", 64, $BEN['relationship_other'], 0, 0) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_inputx("beneficiary", "age", "5", "small", 64, $BEN['age'], 0, 0) ?>
                            <?= element_inputx("beneficiary", "comments", "5", "large", 128, $BEN['comments'], 0, 0) ?>
                            
                            <?php			
				$MY_BEN_QRY = $db->query("SELECT fullname, relationship, relationship_other, age, comments FROM BlueprintBeneficiaries WHERE username = '$USERNAME' AND bene_id = '6' AND username != ''");
				$BEN = $MY_BEN_QRY[0];
						?>
                            <?= element_inputx("beneficiary", "name", "6", "large", 128, $BEN['fullname'], 0, 0) ?>
                            <?= element_select_arrayx("beneficiary", "relationship", "6", "medium", 0, $BEN['relationship'], $RELATION_ARR, 0) ?>
                            <?= element_inputx("beneficiary", "other", "6", "small", 64, $BEN['relationship_other'], 0, 0) ?>
                            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                            <?= element_inputx("beneficiary", "age", "6", "small", 64, $BEN['age'], 0, 0) ?>
                            <?= element_inputx("beneficiary", "comments", "6", "large", 128, $BEN['comments'], 0, 0) ?>


                            <div style="clear:both"></div>
                    	</div>
                        <div style="clear:both"></div>
                    </div>

                    <div class="ui-questionnaire-section-form" style="font-size:12px;">
                        <div class="ui-questionnaire-header-title" style="width:100%; text-align:center; vertical-align:top;">
                            <h1 style="font-size:16px;">
                                Assets / Liabilities Section
                            </h1>
                            <hr style="width:80%;" />
                        </div>
                        <br />
                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <script language="javascript">
							function toggle_q1()
							{ 
								var temp = $("input:radio[name='client_q1']:checked").val();
								if( temp != 1 ){ $('#id-q1a').slideUp(300); $("input:radio[name='client_q1a']").prop('checked', false); }else{  $('#id-q1a').slideDown(300); }
							}
							</script>
                            <p style="display:inline-block">
                            	1. Do you currently have a Revocable Living Trust?
                            </p>
                            &nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q1-y" name="client_q1" value="1" onchange="toggle_q1()" <?=( ($PIR['q1'] == "1") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q1-y" onclick="toggle_q1()" >
                                YES
                                </label>
                            </div>
                            &nbsp;&nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q1-n" name="client_q1" value="0" onchange="toggle_q1()"<?=( ($PIR['q1'] == "0") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q1-n" onclick="toggle_q1()">
                                NO
                                </label>
                            </div>
							<!-- ---------------------------------------------------------------------- -->
                        	<div class="ui-questionnaire-section-subform" id="id-q1a" style="display:<?=( ($PIR['q1'] == 1) ? "block" : "none" )?>; background-color:#f6f4ed;">
                                <p style="display:inline-block">
                                    If Yes, does it require any changes?
                                </p>
                                &nbsp;
                                <div class="ui-form-element" style="display:inline-block;">
                                    <input class="ui-radio" type="radio" id="id-client-q1a-y" name="client_q1a" value="1" <?=( ($PIR['q1a'] == "1") ? "checked='checked'" : "" )?> />
                                    <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q1a-y">
                                    YES
                                    </label>
                                </div>
                                &nbsp;&nbsp;
                                <div class="ui-form-element" style="display:inline-block;">
                                    <input class="ui-radio" type="radio" id="id-client-q1a-n" name="client_q1a" value="0" <?=( ($PIR['q1a'] == "0") ? "checked='checked'" : "" )?> />
                                    <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q1a-n">
                                    NO
                                    </label>
                                </div>
                            </div>
                            <!-- ---------------------------------------------------------------------- -->
                        </div>

                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <script language="javascript">
							function toggle_q2()
							{ 
								var temp = $("input:radio[name='client_q2']:checked").val();
								if( temp != 1 ){ $('#id-q2a').slideUp(300); $("#id-client-please-explain-q2--").val(""); }else{  $('#id-q2a').slideDown(300); }
							}
							</script>
                            <p style="display:inline-block">
                            	2. Do you want some portion of your estate to be used for charitable purposes?
                            </p>
                            &nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q2-y" name="client_q2" value="1" onchange="toggle_q2()" <?=( ($PIR['q2'] == "1") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q2-y" onclick="toggle_q2()">
                                YES
                                </label>
                            </div>
                            &nbsp;&nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q2-n" name="client_q2" value="0" onchange="toggle_q2()" <?=( ($PIR['q2'] == "0") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q2-n" onclick="toggle_q2()">
                                NO
                                </label>
                            </div>
							<!-- ---------------------------------------------------------------------- -->
                        	<div class="ui-questionnaire-section-subform" id="id-q2a" style="display:<?=( ($PIR['q2'] == 1) ? "block" : "none" )?>; background-color:#f6f4ed;">
                                <p style="display:inline-block">
                                    Please explain:
                                </p>
                                &nbsp;
                                <?= element_input("client-please-explain-q2", "", "", "xlarge", 128, $PIR['q2_explain'], 0, 0) ?>
                            </div>
                        </div>

                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <script language="javascript">
							function toggle_q3()
							{ 
								var temp = $("input:radio[name='client_q3']:checked").val();
								if( temp != 1 ){ $('#id-q3a').slideUp(300); $("#id-client-please-explain-q3--").val(""); }else{  $('#id-q3a').slideDown(300); }
							}
							</script>
                            <p style="display:inline-block">
                            	3. Are you expecting an inheritance?
                            </p>
                            &nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q3-y" name="client_q3" value="1" onchange="toggle_q3()" <?=( ($PIR['q3'] == "1") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q3-y" onclick="toggle_q3()">
                                YES
                                </label>
                            </div>
                            &nbsp;&nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q3-n" name="client_q3" value="0" onchange="toggle_q3()" <?=( ($PIR['q3'] == "0") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q3-n" onclick="toggle_q3()">
                                NO
                                </label>
                            </div>
							<!-- ---------------------------------------------------------------------- -->
                        	<div class="ui-questionnaire-section-subform" id="id-q3a" style="display:<?=( ($PIR['q3'] == 1) ? "block" : "none" )?>; background-color:#f6f4ed;">
                                <p style="display:inline-block">
                                    Please explain:
                                </p>
                                &nbsp;
                                <?= element_input("client-please-explain-q3", "", "", "xlarge", 128, $PIR['q3_explain'], 0, 0) ?>
                            </div>
                        </div>

                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <script language="javascript">
							function toggle_q4()
							{ 
								var temp = $("input:radio[name='client_q4']:checked").val();
								if( temp != 1 ){ $('#id-q4a').slideUp(300); 
								$("input:radio[name='client_q4a']").prop('checked', false);
								$("#id-client-please-explain-q4--").val(""); 
								}else{  $('#id-q4a').slideDown(300); }
							}
							function toggle_q4a()
							{ 
								var temp = $("input:radio[name='client_q4a']:checked").val();
								if( temp != 1 ){ $('#id-q4aa').slideUp(300); $("#id-client-please-explain-q4--").val(""); }else{  $('#id-q4aa').slideDown(300); }
							}
							</script>
                            <p style="display:inline-block">
                            	4. Have you ever been a defendant in a lawsuit?
                            </p>
                            &nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q4-y" name="client_q4" value="1" onchange="toggle_q4()" <?=( ($PIR['q4'] == "1") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q4-y" onclick="toggle_q4()">
                                YES
                                </label>
                            </div>
                            &nbsp;&nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q4-n" name="client_q4" value="0" onchange="toggle_q4()" <?=( ($PIR['q4'] == "0") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q4-n" onclick="toggle_q4()">
                                NO
                                </label>
                            </div>
                        	<div class="ui-questionnaire-section-subform" id="id-q4a" style="display:<?=( ($PIR['q4'] == 1) ? "block" : "none" )?>; background-color:#f6f4ed;">
                                <p style="display:inline-block">
                                    Are you involved - directly or indirectly - in any current or potential litigation?
                                </p>
                                &nbsp;
                                <div class="ui-form-element" style="display:inline-block;">
                                    <input class="ui-radio" type="radio" id="id-client-q4a-y" name="client_q4a" value="1" onchange="toggle_q4a()" <?=( ($PIR['q4a'] == "1") ? "checked='checked'" : "" )?> />
                                    <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q4a-y" onclick="toggle_q4a()">
                                    YES
                                    </label>
                                </div>
                                &nbsp;&nbsp;
                                <div class="ui-form-element" style="display:inline-block;">
                                    <input class="ui-radio" type="radio" id="id-client-q4a-n" name="client_q4a" value="0" onchange="toggle_q4a()" <?=( ($PIR['q4'] == "0") ? "checked='checked'" : "" )?> />
                                    <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q4a-n" onclick="toggle_q4a()">
                                    NO
                                    </label>
                                </div>
                                <!-- ---------------------------------------------------------------------- -->
                                <div class="ui-questionnaire-section-subform" id="id-q4aa" style="display:<?=( ($PIR['q4a'] == 1) ? "block" : "none" )?>; background-color:#faf9f5;">
                                    <p style="display:inline-block">
                                        Please explain:
                                    </p>
                                    &nbsp;
                                    <?= element_input("client-please-explain-q4", "", "", "xlarge", 128, $PIR['q4a_explain'], 0, 0) ?>
                                </div>
                            </div>
                        </div>

                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <script language="javascript">
							function toggle_q5()
							{ 
								var temp = $("input:radio[name='client_q5']:checked").val();
								if( temp != 0 ){ $('#id-q5a').slideUp(300); }else{  $('#id-q5a').slideDown(300); }
							}
							</script>
                            <p style="display:inline-block">
                            	5. Are you a U.S. Citizen?
                            </p>
                            &nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q5-y" name="client_q5" value="1" onchange="toggle_q5()" <?=( ($PIR['q5'] == "1") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q5-y" onclick="toggle_q5()">
                                YES
                                </label>
                            </div>
                            &nbsp;&nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q5-n" name="client_q5" value="0" onchange="toggle_q5()" <?=( ($PIR['q5'] == "0") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q5-n" onclick="toggle_q5()">
                                NO
                                </label>
                            </div>
                        	<div class="ui-questionnaire-section-subform" id="id-q5a" style="display:<?=( ($PIR['q5'] == 0) ? "block" : "none" )?>; background-color:#f6f4ed;">
                                <p style="display:inline-block">
                                    If not, please explain more about your citizenship:
                                </p>
                                &nbsp;
                                <?= element_input("client-please-explain-q5", "", "", "xlarge", 128, $PIR['q5_explain'], 0, 0) ?>
                            </div>
                        </div>
                        
                        
                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <script language="javascript">
							function toggle_q6()
							{ 
								var temp = $("input:radio[name='client_q6']:checked").val();
								if( temp != 0 ){ $('#id-q6a').slideUp(300); }else{  $('#id-q6a').slideDown(300); }
							}
							function toggle_q6a()
							{ 
								var temp = $("input:radio[name='client_q6a']:checked").val();
								if( temp != 1 ){ $('#id-q6ab').hide(); $('#id-q6aa').show(); }else{  $('#id-q6ab').show(); $('#id-q6aa').hide(); }
							}
							</script>
                            <p style="display:inline-block">
                            	6. Is your spouse a U.S. citizen?
                            </p>
                            &nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q6-y" name="client_q6" value="1" onchange="toggle_q6()" <?=( ($PIR['q5a'] == "1") ? "checked='checked'" : "" )?> />
                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q6-y" onclick="toggle_q6()">
                                YES
                                </label>
                            </div>
                            &nbsp;&nbsp;
                            <div class="ui-form-element" style="display:inline-block;">
                            	<input class="ui-radio" type="radio" id="id-client-q6-n" name="client_q6" value="0" onchange="toggle_q6()" <?=( ($PIR['q5a'] == "0") ? "checked='checked'" : "" )?> />

                                <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q6-n" onclick="toggle_q6()">
                                NO
                                </label>
                            </div>
							<!-- ---------------------------------------------------------------------- -->
                        	<div class="ui-questionnaire-section-subform" id="id-q6a" style="display:<?=( ($PIR['q5a'] == "0") ? "block" : "none" )?>; background-color:#f6f4ed;">
                                <p style="display:inline-block">
                                    Does your spouse plan on becoming a U.S. citizen?
                                </p>
                                &nbsp;
                                <div class="ui-form-element" style="display:inline-block;">
                                    <input class="ui-radio" type="radio" id="id-client-q6a-y" name="client_q6a" value="1" onchange="toggle_q6a()" <?=( ($PIR['q5aa'] == "1") ? "checked='checked'" : "" )?> />
                                    <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px;" for="id-client-q6a-y" onclick="toggle_q6a()">
                                    YES
                                    </label>
                                </div>
                                &nbsp;&nbsp;
                                <div class="ui-form-element" style="display:inline-block;">
                                    <input class="ui-radio" type="radio" id="id-client-q6a-n" name="client_q6a" value="0" onchange="toggle_q6a()" <?=( ($PIR['q5aa'] == "0") ? "checked='checked'" : "" )?> />
                                    <label class="ui-radio ui-label" style="display:inline-block; position:relative; top:-1px; left:-3px" for="id-client-q6a-n" onclick="toggle_q6a()">
                                    NO
                                    </label>
                                </div>
                                <!-- ---------------------------------------------------------------------- -->
                                <div class="ui-questionnaire-section-subform" id="id-q6aa" style="display:<?=( ($PIR['q5aa'] == 0) ? "block" : "none" )?>; background-color:#faf9f5;">
                                    <p style="display:inline-block">
                                        If not, please explain:
                                    </p>
                                    &nbsp;
                                    <?= element_input("client-please-explain-q6a", "", "", "xlarge", 128, $PIR['q5aa_explain'], 0, 0) ?>
                                </div>
                                <!-- ---------------------------------------------------------------------- -->
                                <!-- ---------------------------------------------------------------------- -->
                                <div class="ui-questionnaire-section-subform" id="id-q6ab" style="display:<?=( ($PIR['q5aa'] == 1) ? "block" : "none" )?>; background-color:#faf9f5;">
                                    <p style="display:inline-block">
                                        If yes, when?
                                    </p>
                                    &nbsp;
                                    <?= element_input("client-please-explain-q6b", "", "", "xlarge", 128, $PIR['q5aa_when'], 0, 0) ?>
                                </div>
                                <!-- ---------------------------------------------------------------------- -->
                                
                            </div>
                            <!-- ---------------------------------------------------------------------- -->
                        </div>

						<?php
							$RANK_ARR = array("1"=>"1", "2"=>"2", "3"=>"3", "4"=>"4", "5"=>"5", "6"=>"6", "7"=>"7", "8"=>"8");
						?>
                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <p>
                                7. Please rank the importance to you of the following topics (1 being the most important, 8 the least):
                            </p>
                            <table border="0" cellpadding="0" id="id-tub-selects">
                                <tr>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "1", "medium", 0, ( (!empty($PIR['q6a'])) ? ($PIR['q6a']*1) : "1" ), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p style="position:relative; top:-15px;">Asset Protection from lawsuits, claims, etc</p>
                                    </td>
                                    <td width="48px">&nbsp;</td>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "2", "medium", 0, ((!empty($PIR['q6b'])) ? $PIR['q6b'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p style="position:relative; top:-15px;">Charitable Planning</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "3", "medium", 0, ((!empty($PIR['q6c'])) ? $PIR['q6c'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p style="position:relative; top:-15px;">Estate Planning</p>
                                    </td>
                                    <td width="48px">&nbsp;</td>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "4", "medium", 0, ((!empty($PIR['q6d'])) ? $PIR['q6d'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p style="position:relative; top:-15px;">Estate Taxes</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "5", "medium", 0, ((!empty($PIR['q6e'])) ? $PIR['q6e'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p>Probate Avoidance</p>
                                    </td>
                                    <td width="48px">&nbsp;</td>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "6", "medium", 0, ((!empty($PIR['q6f'])) ? $PIR['q6f'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p>Income Taxes</p>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "7", "medium", 0, ((!empty($PIR['q6g'])) ? $PIR['q6g'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p>Business Planning</p>
                                    </td>
                                    <td width="48px">&nbsp;</td>
                                    <td>
                                        <?= element_select_arrayx("client", "0", "8", "medium", 0, ((!empty($PIR['q6h'])) ? $PIR['q6h'] : "0"), $RANK_ARR, 0) ?>
                                    </td>
                                    <td>
                                        <p>
                                            Other
                                            <div style="position:relative; top:-37px; left:40px;">
                                                <?= element_inputx("client", "", "asset-other", "medium", 128, $PIR['q6h_explain'], 0, 0) ?>
                                            </div>
                                        </p>
                                    </td>
                                </tr>
                            </table>
                        </div>

                        <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <p>
                                8. List the values of all assets to be protected (estimate):
                            </p>
                            <div class="ui-questionnaire-section-subform" style="background-color:#faf9f5;">
                                <table border="0" cellpadding="0" id="id-tub-selects" width="100%">
                                <tr>
                                    <td>
                                        <table width="100%" border="0">
                                            <tr>
                                                <th width="175px">
                                                    Assets
                                                </th>
                                                <th width="108px">
                                                    Value in $(USD)
                                                </th>
                                                <th>
                                                    How Titled / Type of Entity
                                                </th>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Cash:</p>
                                                </td>
                                          		<td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '1' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "1", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "1", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Money Market Account:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '2' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "2", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "2", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Savings Accounts:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '3' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "3", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "3", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Stocks:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '4' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "4", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "4", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Mutal Funds:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '5' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "5", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "5", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Bonds:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '6' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "6", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "6", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Precious Metals:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '7' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "7", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "7", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Homes:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '8' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "8", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "8", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Investment Real Estate:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '9' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "9", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "9", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Investment Real Estate II:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '10' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "10", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "10", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Business interests:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '11' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "11", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "11", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Business interests II:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '12' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "12", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "12", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Automobiles:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '13' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "13", "medium", 16,  (($MY_MMA['value'])?$MY_MMA['value']:""), 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "13", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Automobiles II:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '14' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "14", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "14", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>IRA Assets:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '15' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "15", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "15", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Other Retirement Assets:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '16' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "16", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "16", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Other Assets:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '17' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "17", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "17", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td style="padding-left:16px;">
                                                    <p>Other Assets II:</p>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                    <?php
				$MY_MMA_QRY = $db->query("SELECT value, short_description FROM BlueprintAssets WHERE username = '$USERNAME' AND asset_id = '18' AND username != ''");
				$MY_MMA = $MY_MMA_QRY[0];
													?>
               	$<?= element_inputx("client-asset-value", "", "18", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                    </div>
                                                </td>
                                                <td>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px;">
				<?= element_inputx("client-asset-title", "", "18", "xlarge", 128,  $MY_MMA['short_description'], 0, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                            <tr>  
                                                <td style="border-top:1px solid #999; padding-left:128px; padding-top:12px;" colspan="3">
                                                    <p style="display:inline-block;">Total Assets:</p>
                                                    <div style="position:relative; top:-12px; margin-bottom:-12px; display:inline-block;">
                                                        $<?= element_input("client-asset-value", "", "total", "medium", 16, "", 1, 0) ?>
                                                    </div>
                                                </td>
                                            </tr>
                                        </table>
                                        <script language="javascript">
                                        function calc_assets()
                                        {
                                            var elem_count = 19;
                                            var temp_val = 0;
                                            for( var i = 1; i < elem_count; i++ )
                                            {
                                                var tv = $('#id-client-asset-value--'+i).val() + "";
                                                if( tv == null || tv == "" || tv == "undefined")
                                                {
                                                    temp_val += 0;
                                                }
                                                else
                                                {
                                                    temp_val += parseInt(tv);
                                                }
                                            }
                                            $('#id-client-asset-value--total').val(temp_val);
                                            calc_networth();
                                        }
                                        function calc_liabilities()
                                        {
                                            var elem_count = 7;
                                            var temp_val = 0;
                                            for( var i = 1; i < elem_count; i++ )
                                            {
                                                var tv = $('#id-client-liabilities-value--'+i).val() + "";
                                                if( tv == null || tv == "" || tv == "undefined")
                                                {
                                                    temp_val += 0;
                                                }
                                                else
                                                {
                                                    temp_val += parseInt(tv);
                                                }
                                            }
                                            $('#id-client-liabilities-value--total').val(temp_val);
                                            calc_networth();
                                        }
                                        function calc_insurance()
                                        {
											var xv = $('#id-client-liabilities-value--7').val();
											var yv = $('#id-client-liabilities-value--8').val();
											var zv = $('#id-client-liabilities-value--9').val();
  											var temp_val = 0;
											temp_val = (xv*1)+(yv*1)+(zv*1);
                                            $('#id-client-insurance-value--total').val(temp_val);
                                        }
                                        function calc_networth()
                                        {
                                            var aelem_count = 19;
                                            var atemp_val = 0;
                                            for( var ai = 1; ai < aelem_count; ai++ )
                                            {
                                                var atv = $('#id-client-asset-value--'+ai).val() + "";
                                                if( atv == null || atv == "" || atv == "undefined")
                                                {
                                                    atemp_val += 0;
                                                }
                                                else
                                                {
                                                    atemp_val += parseInt(atv);
                                                }
                                            }
                                            var lelem_count = 7;
                                            var ltemp_val = 0;
                                            for( var li = 1; li < lelem_count; li++ )
                                            {
                                                var ltv = $('#id-client-liabilities-value--'+li).val() + "";
                                                if( ltv == null || ltv == "" || ltv == "undefined")
                                                {
                                                    ltemp_val += 0;
                                                }
                                                else
                                                {
                                                    ltemp_val += parseInt(ltv);
                                                }
                                            }
                                            var temp_total = ( atemp_val - ltemp_val ) + "";
                                            var total_num = temp_total.replace(/(\s)/g, '');
                                            temp_total = total_num.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
                                            $('#id-net-worth').html("$"+temp_total+".00");
											$('#id-client-liabilities-value--total').val(ltemp_val);
											$('#id-client-asset-value--total').val(atemp_val);
                                        }
                                        </script>
                                        <hr />
                                    </td>
                                </tr>
                                <tr>
                                    <td valign="top" style="vertical-align:top;">
                                        <div class="ui-questionnaire-section-subform" style="background-color:#fcfbf9; display:inline-block; width:47%;">
                                            <table width="100%" border="0">
                                                <tr>
                                                    <th width="150px">
                                                        Liabilities
                                                    </th>
                                                    <th width="100px">
                                                        Value in $(USD)
                                                    </th>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Home Mortgages:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '1' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "1", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Other R/F Mortgages:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '2' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "2", "medium", 16,  $MY_MMA['value'], 1, 0) ?>

                                                        </div>
                                                    </td>

                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Other:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '3' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "3", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Other:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '4' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "4", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Other:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '5' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "5", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Other:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_assets();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '6' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "6", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="border-top:1px solid #999; padding-left:104px; padding-top:12px;" colspan="2">
                                                        <p style="display:inline-block;">Total Liabilities:</p>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px; display:inline-block;">
                                                            $<?= element_input("client-liabilities-value", "", "total", "medium", 16, "", 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="ui-questionnaire-section-subform" style="background-color:#fcfbf9; display:inline-block; width:48%; position:relative; top:-53px;">
                                            <table width="100%" border="0">
                                                <tr>
                                                    <th width="150px">
                                                        Insurance
                                                    </th>
                                                    <th width="100px">
                                                        Value in $(USD)
                                                    </th>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Insurance on You:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_insurance();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '7' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "7", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Insurance on Spouse:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_insurance();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '8' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "8", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="padding-left:16px;">
                                                        <p>Last Survivor Insurance:</p>
                                                    </td>
                                                    <td>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px;" onkeyup="calc_insurance();">
                                                        <?php
                    $MY_MMA_QRY = $db->query("SELECT value, liability_name FROM BlueprintLiabilities WHERE username = '$USERNAME' AND liability_id = '9' AND username != ''");
                    $MY_MMA = $MY_MMA_QRY[0];
                                                        ?>
                    $<?= element_inputx("client-liabilities-value", "", "9", "medium", 16,  $MY_MMA['value'], 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td style="border-top:1px solid #999; padding-left:104px; padding-top:12px;" colspan="2">
                                                        <p style="display:inline-block;">Total Insurance:</p>
                                                        <div style="position:relative; top:-12px; margin-bottom:-12px; display:inline-block;">
                                                            $<?= element_input("client-insurance-value", "", "total", "medium", 16, "", 1, 0) ?>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </table>
                                        </div>
                                        <div class="ui-questionnaire-section-subform" 
                                        style="vertical-align:middle; background-color:#F3F1E8; display:inline-block; width:48%; position:relative;">
                                            <center>
                                                YOUR NET WORTH:
                                                <h1>
                                                	<strong>
                                                        <div id="id-net-worth" style="display:inline-block; font-weight:bold; font-size:22px;">
                                                           $0.00 
                                                        </div>
                                                    </strong>
                                                    <div style="display:inline-block; position:relative; left:32px;">
                                                    </div>
                                                </h1>
                                            </center>
                                        </div>
                                    </td>
                                </tr>
                                </table>
                       		</div>
                    	</div> 
        			</div>
                    <!-- ================================================================================================================
                    ================================================================================================================= -->
                    <div class="ui-questionnaire-section-form">
                        <div class="ui-questionnaire-header-title" style="width:100%; text-align:center; vertical-align:top;">
                            <h1 style="font-size:16px;">
                                Additional Details, Goals, and Concerns
                            </h1>
                            <hr style="width:80%;" />
                        </div>
                        <br />
                        <center>
                            <div class="ui-questionnaire-section-subform" style="padding-top:0px; padding-bottom:0px;">
                            <textarea id="id-additional-details" name="additional" style="width:740px; margin:5px 20px" rows="7"><?=$PIR['additional_details']?></textarea>
                                <p align="justify" style="width:94%;">
                                We certify that to the best of our knowledge, the forgoing is true, correct, and complete. You may rely on this information in providing advice and preparing documents for our estate and business plans. By my/our signature(s) below. I/We hereby provide Attorneys with our informed consent to share my/our information with representatives from American Society for Asset Protection, and acknowledge that I/we understand that this consent represents a waiver of any Attorney/Client privilege otherwise available. By signing below you authorize us to deal with your other advisors, and your other advisors to so deal with us.
                                </p>
                                <hr />
                                <div align="left">
                                	<label class="ui-label">Date:<br />
                                    <h3 style="float:left; position:relative; left:5px; font-size:16px;"><?php echo date('l jS \of F Y');?></h3>
                                    </label>
                                    <div style="float:right">
                                        <?= element_input("client", "your-signature", "", "large", 100, $PIR['signature_1'], 0, 1) ?>
                                        <div style="clear:both"></div>
                                        <?= element_input("client", "spouse-signature", "", "large", 100, $PIR['signature_2'], 0, 1) ?>
                                    </div>
                                    <br />
                                    <div style="clear:both"></div>
                                    <br />
                                </div>
                            </div>
                        </center>
                    </div>
                    <br />
                    <hr />
                    	<center>
                        <!--
                        <input type="button" name="button" class="ui-save-button" value="VIEW PDF" onclick="submit_questionnaire();" style="opacity:0.80" />
                        
                        <input type="button" name="button" class="ui-save-button" value="SAVE" onclick="save_document();" style="opacity:0.80" />-->
                        <style type="text/css">
						.ui-savex-button{
							background: #2855c1; /* Old browsers */
							background: -moz-linear-gradient(top, #2855c1 0%, #112f85 100%); /* FF3.6+ */
							background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#2855c1), color-stop(100%,#112f85)); /* Chrome,Safari4+ */
							background: -webkit-linear-gradient(top, #2855c1 0%,#112f85 100%); /* Chrome10+,Safari5.1+ */
							background: -o-linear-gradient(top, #2855c1 0%,#112f85 100%); /* Opera 11.10+ */
							background: -ms-linear-gradient(top, #2855c1 0%,#112f85 100%); /* IE10+ */
							background: linear-gradient(to bottom, #2855c1 0%,#112f85 100%); /* W3C */
							filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#2855c1', endColorstr='#112f85',GradientType=0 ); /* IE6-9 */
							border:1px solid #071847;
							border-radius:3px;
							color:#FFF !important;
						}
						.ui-savex-button:hover{
							box-shadow:inset 0px 2px 20px rgba(169, 194, 255, 0.49);
							-moz-box-shadow:inset 0px 2px 20px rgba(169, 194, 255, 0.49);
							-webkit-box-shadow:inset 0px 2px 20px rgba(169, 194, 255, 0.49);
							border:1px solid #ffffff;
						}
						
						</style>
                    	<input type="button" class="ui-savex-button" name="save" value="SAVE" onclick="save_user_document();" style="padding:12px 21px 12px 21px; cursor:pointer;" />
                        <input type="button" class="ui-savex-button" name="submit" value="SAVE & SEND" onclick="submit_questionnaire();" style="padding:12px 21px 12px 21px; cursor:pointer;" />
                        </center>
                    <hr />
                    <br />
</form>
</div>
</div>
                <div class="sidebar">
                    <div class="sidebar_">
                    
                    </div>
                </div>
			<div style="clear:both"></div>
            <div style="width:100%;">
            <center> 
            <div style="display:inline-block;">
            
<?php require_once('../footer.php'); ?>
			
			</div>
			</center>
            </div>


Youez - 2016 - github.com/yon3zu
LinuXploit