var hour = 28;var min = 51;var sec = 30;sec += 2; function offshoreSearch(form){ var offshore = form.elements['offshore'].options[form.elements['offshore'].selectedIndex].text; var uk = form.elements['uk'].value; var top = screen.height/6; var left = screen.width/4; if(offshore=="Select" && uk.length==0){ alert('Please choose UK company name or country from the menu.'); return false; }else if(offshore!="Select"){ window.open("/other-namesearch.php?country="+offshore,"offshoreNameSearch","width=500,height=450,location=no,menubar==no,resizable=yes,toobal=no,left="+left+",top="+top); }else{ form.submit(); } } function companyNameEdit(app_id){ window.open("/actions/choose_name.php?app_id="+app_id,"_self"); } function companyNatureEdit(app_id){ window.open("/actions/business_nature.php?app_id="+app_id,"_self"); } function addDirector(app_id){ window.open("/actions/add_director.php?app_id="+app_id,"_self"); } function editDirector(app_id,officer_id){ window.open("/actions/edit_director.php?app_id="+app_id+"&officer_id="+officer_id,"_self"); } function editSecretary(app_id,officer_id){ window.open("/actions/edit_secretary.php?app_id="+app_id+"&officer_id="+officer_id,"_self"); } function editShareH(app_id,officer_id){ window.open("/actions/edit_shareh.php?app_id="+app_id+"&officer_id="+officer_id,"_self"); } function editCAddress(app_id,officer_id){ window.open("/actions/edit_caddress.php?app_id="+app_id+"&officer_id="+officer_id,"_self"); } function addSecretary(app_id){ window.open("/actions/add_secretary.php?app_id="+app_id,"_self"); } function addShareH(app_id){ window.open("/actions/add_shareh.php?app_id="+app_id,"_self"); } function addCAddress(app_id){ window.open("/actions/add_caddress.php?app_id="+app_id,"_self"); } function addFile(app_id){ window.open("/actions/add_file.php?app_id="+app_id,"_self"); } function removeOfficer(app_id,officer_id){ var ans = confirm("Do you want to remove it?"); if(ans==true) window.open("/actions/remove_officer.php?app_id="+app_id+"&officer_id="+officer_id,"_self"); } function removeFile(app_id,officer_id){ var ans = confirm("Do you want to remove this file?"); if(ans==true) window.open("/actions/remove_file.php?app_id="+app_id+"&officer_id="+officer_id,"_self"); } //application submission function showButton(){ var agreeBox = document.getElementById("agreeBox"); var sButton = document.getElementById("sbutton"); if(agreeBox.checked==true){ sButton.style.display = "block"; } else sButton.style.display = "none"; } //for the cart , shopping basket one function calcDelivery(){ var temp = document.getElementById("totalPrice"); var temp1 = document.getElementById("deliveryM"); temp.innerHTML = ""+(total+(temp1.value*1)).toFixed(2); } function addBookeeping(){ var temp = document.getElementById("hours"); if(!isNumber(temp.value)){ alert('Please enter a number'); return false; } if(temp.value<10){ alert('Minimum Hours is 10.'); return false; } window.location.assign("http://"+location.host+"/actions/engine.php?action=add&product_id=73&quantity="+temp.value); } function isNumber(value){ for(var i=0;i"9"){ return false; } } return true; } function cNameSearch(){ var cname = document.getElementById("cname"); window.location.assign("http://"+location.host+"/name-search.php?name="+cname.value); } function remove_app(app_id){ var ans = confirm("Do you want to remove this application?"); if(ans==true) //alert("/actions/remove_app.php?app_id="+app_id); window.open("/actions/remove_app.php?app_id="+app_id,"_self"); } function checkLength(that){ //alert(that.value); if(that.value.length>3) that.value = that.value.substring(0,3); } function updateName(name){ var box = document.getElementById('namebox'); box.innerHTML = name; } function updateCName(name){ var box = document.getElementById('cnamebox'); box.innerHTML = name; } var state = 0; function showSend(){ var sendButton = document.getElementById('sendButton'); if(!state){ sendButton.style.display = "block"; state = 1; }else if(state){ sendButton.style.display = "none"; state = 0; } return true; } function checkChecked(){ if(state){ return true; }else{ alert('Please accept the Terms and Conditions before sending your application'); return false; } } function openURL() { // grab index number of the selected option selInd = document.theForm.aaa.selectedIndex; // get value of the selected option goURL = document.theForm.aaa.options[selInd].value; // redirect browser to the grabbed value (hopefully a URL) top.location.href = goURL; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i 2) { if ((img = MM_findObj(args[2])) != null && !img.MM_init) { img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src; if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array(); nbArr[nbArr.length] = img; for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = args[i+1]; nbArr[nbArr.length] = img; } } } else if (event == "over") { document.MM_nbOver = nbArr = new Array(); for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up); nbArr[nbArr.length] = img; } } else if (event == "out" ) { for (i=0; i < document.MM_nbOver.length; i++) { img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; } } else if (event == "down") { nbArr = document[grpName]; if (nbArr) for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; } document[grpName] = nbArr = new Array(); for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) { if (!img.MM_up) img.MM_up = img.src; img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up; nbArr[nbArr.length] = img; } } } var newwindow; function poptastic(url) { newwindow=window.open(url,'name','height=480,width=495'); if (window.focus) {newwindow.focus()} }