function fieldsApp2(a){if(a.value=="Yes"){document.getElementById("partner_info").style.display=""}else{document.getElementById("partner_info").style.display="none"}}function show_address_detail(){if(req.readyState==4){var a=req.responseXML;var b=req.responseText;var c=a.getElementsByTagName("document")[0].childNodes.length;if(req.status==200){var d=a.getElementsByTagName("name_or_number")[0].firstChild.nodeValue;var e=a.getElementsByTagName("houseNumber")[0].firstChild.nodeValue;var f=a.getElementsByTagName("thoroughfare_name")[0].firstChild.nodeValue;var g=a.getElementsByTagName("thoroughfare_descriptor")[0].firstChild.nodeValue;var h=a.getElementsByTagName("dependent_locality")[0].firstChild.nodeValue;var i=a.getElementsByTagName("post_town")[0].firstChild.nodeValue;var j=a.getElementsByTagName("postcode")[0].firstChild.nodeValue;var k=a.getElementsByTagName("county")[0].firstChild.nodeValue;if(e!="NNNN")document.getElementById("x_C1HouseNumber").value=e;if(d!="NNNN")document.getElementById("x_C1HouseFlatName").value=d;if(f!="NNNN")document.getElementById("x_C1Street").value=f;if(g!="NNNN")document.getElementById("x_C1Street").value=document.getElementById("x_C1Street").value+" "+g;if(h!="NNNN")document.getElementById("x_C1Area").value=h;if(i!="NNNN")document.getElementById("x_C1Town").value=i;if(k!="NNNN")document.getElementById("x_C1County").value=k;else if(i!="NNNN")document.getElementById("x_C1County").value=i;if(j!="NNNN")document.getElementById("x_C1Postcode").value=j;document.getElementById("div_seprateaddress").style.display="block";document.getElementById("div_fulladdress").style.display="none";document.getElementById("div_loader").style.display="none";document.getElementById("addressfind").value=1}else{document.getElementById("div_loader").style.display="block";document.getElementById("div_seprateaddress").style.display="none";document.getElementById("div_fulladdress").style.display="none";document.getElementById("addressfind").value=""}}else{document.getElementById("div_seprateaddress").style.display="none";document.getElementById("div_fulladdress").style.display="none";document.getElementById("div_loader").style.display="block";document.getElementById("addressfind").value=""}}function showseprateadd(a){document.getElementById("addressid").value=a;var b="http://www.einsured.co.uk/getdata3.php?id="+a;req=false;if(window.XMLHttpRequest){try{req=new XMLHttpRequest}catch(c){req=false}}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){req=false}}}if(req){req.onreadystatechange=show_address_detail;req.open("GET",b,true);req.send(null)}}function show_address_list(){if(req.readyState==4){var a=req.responseXML;var b=req.responseText;var c=a.getElementsByTagName("document")[0].childNodes.length;if(req.status==200){if(a.getElementsByTagName("document")[0].childNodes.length==0){document.getElementById("fulladdress").length=0;document.getElementById("fulladdress").options[0]=new Option("No Address","")}else{document.getElementById("fulladdress").length=0;document.getElementById("fulladdress").options[0]=new Option("Select Address","");for(k=0;k<c;k++){addressid=a.getElementsByTagName("id")[k].firstChild.nodeValue;addressvalue=a.getElementsByTagName("description")[k].firstChild.nodeValue;document.getElementById("fulladdress").options[k+1]=new Option(addressvalue,addressid)}}document.getElementById("div_fulladdress").style.display="block";document.getElementById("div_seprateaddress").style.display="none";document.getElementById("div_loader").style.display="none";document.getElementById("addressfind").value=""}else{document.getElementById("div_fulladdress").style.display="none";document.getElementById("div_seprateaddress").style.display="none";document.getElementById("div_loader").style.display="block";document.getElementById("addressfind").value=""}}else{document.getElementById("div_fulladdress").style.display="none";document.getElementById("div_seprateaddress").style.display="none";document.getElementById("div_loader").style.display="block";document.getElementById("addressfind").value=""}}function showaddress(){var a=document.getElementById("x_C1Postcode").value;var b="http://www.einsured.co.uk/addresslist.php?postcode="+a+"&building=";req=false;if(window.XMLHttpRequest){try{req=new XMLHttpRequest}catch(c){req=false}}else if(window.ActiveXObject){try{req=new ActiveXObject("Msxml2.XMLHTTP")}catch(c){try{req=new ActiveXObject("Microsoft.XMLHTTP")}catch(c){req=false}}}if(req){req.onreadystatechange=show_address_list;req.open("GET",b,true);req.send(null)}}
