var error;function checkFields(){var str=document.getElementById('e-mail').value;var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if(str.indexOf(at)==-1){document.getElementById("error").innerHTML="<br/>&rarr; Sorry, please fill your e-mail address";return false}if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){document.getElementById("error").innerHTML="<br/>&rarr; invalid E-mail ID";return false}if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){document.getElementById("error").innerHTML="<br/>&rarr; invalid E-mail ID";return false}if(str.indexOf(at,(lat+1))!=-1){document.getElementById("error").innerHTML="<br/>&rarr; invalid E-mail ID";return false}if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){document.getElementById("error").innerHTML="<br/>&rarr; invalid E-mail ID";return false}if(str.indexOf(dot,(lat+2))==-1){document.getElementById("error").innerHTML="<br/>&rarr; invalid E-mail ID";return false}if(str.indexOf(" ")!=-1){document.getElementById("error").innerHTML="<br/>&rarr; invalid E-mail ID";return false}document.getElementById("error").innerHTML="";var value=document.getElementById('subject').value;if(value==""){document.getElementById('error').innerHTML="<br/>&rarr; Sorry, please fill in your subject";return false}else{document.getElementById('error').innerHTML=""}document.getElementById("error").innerHTML="";var value=document.getElementById('message').value;if(value==""){document.getElementById('error').innerHTML="<br/>&rarr; Sorry, the message can not be empty";return false}else{document.getElementById('error').innerHTML=""}var value=document.getElementById('veri').value;if(value==""){document.getElementById('error').innerHTML="<br/>&rarr; Sorry, the validation code can not be empty";return false}else{document.getElementById('error').innerHTML="";return true}}function checkOnline(){document.getElementById('regi').disabled=true}function showRegi(){$('#register').slideDown('slow');$('#slowUP').slideUp('fast')}function checkB(){var value=document.getElementById('business').value;if(value==""){document.getElementById('error1').innerHTML="&rarr; Sorry, please fill in your business name"}else{document.getElementById('error1').innerHTML="";return true}}function checkABN(){var value=document.getElementById('ABN').value;if(value==""){document.getElementById('error2').innerHTML="&rarr; Sorry, please fill in your ABN number"}else{document.getElementById('error2').innerHTML="";return true}}function checkTrade(){var value=document.getElementById('trade').value;if(value==""){document.getElementById('error3').innerHTML="&rarr; Sorry, please fill in your trading number"}else{document.getElementById('error3').innerHTML="";return true}}function checkUser(){var value=document.getElementById('user').value;if(value==""){document.getElementById('error5').innerHTML="&rarr; Sorry, please fill in your perfered username"}else{document.getElementById('error5').innerHTML="";return true}}function checkPassword(){var value=document.getElementById('password').value;if(value==""){document.getElementById('error6').innerHTML="&rarr; Sorry, please fill in password"}else{document.getElementById('error6').innerHTML="";return true}}function checkEmail(){var str=document.getElementById('email').value;var at="@";var dot=".";var lat=str.indexOf(at);var lstr=str.length;var ldot=str.indexOf(dot);if(str.indexOf(at)==-1){document.getElementById("error4").innerHTML="&rarr; Sorry, please fill your e-mail address";return false}if(str.indexOf(at)==-1||str.indexOf(at)==0||str.indexOf(at)==lstr){document.getElementById("error4").innerHTML="&rarr; invalid E-mail ID";return false}if(str.indexOf(dot)==-1||str.indexOf(dot)==0||str.indexOf(dot)==lstr){document.getElementById("error4").innerHTML="&rarr; invalid E-mail ID";return false}if(str.indexOf(at,(lat+1))!=-1){document.getElementById("error4").innerHTML="&rarr; invalid E-mail ID";return false}if(str.substring(lat-1,lat)==dot||str.substring(lat+1,lat+2)==dot){document.getElementById("error4").innerHTML="&rarr; invalid E-mail ID";return false}if(str.indexOf(dot,(lat+2))==-1){document.getElementById("error4").innerHTML="&rarr; invalid E-mail ID";return false}if(str.indexOf(" ")!=-1){document.getElementById("error4").innerHTML="&rarr; invalid E-mail ID";return false}document.getElementById("error4").innerHTML="";return true}function checkPassword2(){var value=document.getElementById('password2').value;var value1=document.getElementById('password').value;if(value==""){document.getElementById('error7').innerHTML="&rarr; Sorry, please re-enter your password"}else if(value!==value1){document.getElementById('error7').innerHTML="&rarr; Sorry, your password not matched"}else{document.getElementById('error7').innerHTML="";return true}}function verifyNumber(){var value=document.getElementById('veri').value;if(value==""){document.getElementById('error8').innerHTML="&rarr; Sorry, please fill in the verification number"}else{document.getElementById('error8').innerHTML="";return true}}