function onloadGeneral(){setFocusOnFirstTextField(true)}function directorSearch(B,A){buildAnonLoginParams(B);B.action=buildTLD(A)+"/loginAndSearch.do?director_search=true";B.submit()}function advancedSearch(B,A){buildAnonLoginParams(B);B.action=buildTLD(A)+"/loginAndSearch.do?advanced_search=true";B.submit()}function postToSearch(C,A){buildAnonLoginParams(C);var B=(location.port==null||location.port==""||location.port=="80"?"":":"+location.port);C.action=buildTLD(A)+"/loginAndSearch.do";C.submit()}function postToLoginAndSearch(A){buildAnonLoginParams(A);A.action="/loginAndSearch.do";A.submit()}function buildTLD(A){var B=(location.port==null||location.port==""||location.port=="80"?"":":"+location.port);return location.protocol+"//"+A+".companysearches.co.uk"+B}function buildAnonLoginParams(A){var B=document.createElement("input");B.type="hidden";B.name="user_name";B.value="CSAnonymousCC";A.appendChild(B);var B=document.createElement("input");B.type="hidden";B.name="password";B.value="sens1ble";A.appendChild(B);var B=document.createElement("input");B.type="hidden";B.name="service_id";B.value="1";A.appendChild(B);var B=document.createElement("input");B.type="hidden";B.name="service_name";B.value="companysearches";A.appendChild(B)}function displayLogoutLink(){var A;if(window.XMLHttpRequest&&!(window.ActiveXObject)){try{A=new XMLHttpRequest()}catch(C){A=false}}else{if(window.ActiveXObject){try{A=new ActiveXObject("Msxml2.XMLHTTP")}catch(C){try{A=new ActiveXObject("Microsoft.XMLHTTP")}catch(C){A=false}}}}var B=location.protocol+"//"+location.host+"/displayLogoutLink.do";A.open("GET",B);A.send(null);A.onreadystatechange=function(){if(A.readyState==4){if(A.status==200){var F=A.responseText;if(document.getElementById("loginLogoutLink")){if(F=="true"){document.getElementById("loginLogoutLink").innerHTML="logout";document.getElementById("loginLogoutLink").title="Logout";document.getElementById("loginLogoutLink").href="/logout.do";var D=document.getElementById("searchAnchor");if(D!=null){D.href="javascript:document.simpleSearch.submit();"
}var E=document.getElementById("terms_and_conditions");if(E!=null){E.checked=true}}else{document.getElementById("loginLogoutLink").title="Login";document.getElementById("loginLogoutLink").href="/displayLogin.do?service_name=companysearches"}}}}}}function setCompanySearchRadioButton(B,A){for(i=0;i<B.length;i++){if(B[i].value==A){B[i].checked=true}}var C=document.getElementById("search_box");var E=document.getElementById("reg_name");var D=document.getElementById("reg_num");if(E.checked==true){C.name="company_name"}else{if(D.checked==true){C.name="company_key"}}}function redisplayFilingHistory(B,A){var C=location.protocol+"//"+location.host+A;if(B.checked){location.href=C+"&"+B.name+"=true"}else{location.href=C+"&"+B.name+"=false"}}function clearIfNecessary(A){if(A.value==A.id){A.value=""}}function repopulateIfNecessary(A){if(A.value==""){A.value=A.id}}function clearPasswordIfNecessary(A){clearIfNecessary(A)}function repopulatePasswordIfNecessary(A){repopulateIfNecessary(A)}function maskPasswordIfNecessary(){var A=document.getElementById("Password *")}function removeDefaults(C){for(var B=0;B<C.elements.length;B++){var A=C.elements[B];if(A.type=="text"&&A.value==A.id){A.value=""}}};