function _change() { document.getElementById("ContentTD").innerHTML = frames["opIframe"].document.body.innerHTML; } function setDomainName(x,y) { x.value=y; } function ContainsSpecialSymbols(strInput){ var reg = new RegExp("#|%|'"); if (reg.test(strInput)){ return true; } else{ return false; } } function CheckValidEmail(strEmail) { if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) { return true; } else { return false; } } var lang = "en"; function ValidateAddNewUser(x){ if(ContainsSpecialSymbols(x.username.value)) { if(lang == "bg") { alert("The username can not contain special symbols"); } else { alert("The username can not contain special symbols!"); } return false; } if(x.username.value=="") { if(lang == "bg") { alert("Please enter your username!"); } else { alert("Please enter your username!!"); } x.username.focus(); return false; } if(x.password.value=="") { if(lang == "bg") { alert("The password can not be empty"); } else { alert("The password can not be empty!"); } x.password.focus(); return false; } if(x.password2.value=="") { if(lang == "bg") { alert("The password can not be empty"); } else { alert("The password can not be empty!"); } x.password2.focus(); return false; } if(x.first_name.value=="") { if(lang == "bg") { alert("Please enter your name!"); } else { alert("Please enter your name!"); } x.first_name.focus(); return false; } if(x.last_name.value=="") { if(lang == "bg") { alert("Please enter your name!"); } else { alert("Please enter your name!"); } x.last_name.focus(); return false; } if(x.email.value=="") { if(lang == "bg") { alert("Please enter your email!"); } else { alert("Please enter your email!"); } x.email.focus(); return false; } if(!CheckValidEmail(x.email.value) ) { if(lang == "bg") { alert(x.email.value+" is not a valid email address"); } else { alert(x.email.value+" is not a valid email address"); } x.email.focus(); return false; } if(!x.agree.checked) { if(lang == "bg") { alert("You have to agree with the terms of service in order to continue!"); } else { alert("You have to agree with the terms of service in order to continue!"); } return false; } return true; } function ShowFaq(x) { if(document.getElementById("faq"+x).style.display=="none") { document.getElementById("faq"+x).style.display="block"; } else { document.getElementById("faq"+x).style.display="none"; } }