//////////////////////////////////////////////////////////////////////// ////////////////////////// Interface //////////////////////// //////////////////////////////////////////////////////////////////////// function clickclear(thisfield, defaulttext) { if (thisfield.value == defaulttext) { thisfield.value = ""; } } function clickrecall(thisfield, defaulttext) { if (thisfield.value == "") { thisfield.value = defaulttext; } } function betextarea(t) { a = t.value.split('\n'); b=1; for (x=0;x < a.length; x++) { if (a[x].length >= t.cols) b+= Math.floor(a[x].length/t.cols); } b+= a.length; if (b > t.rows) t.rows = b; } /////// highlight active input box ///// var currClass = 'input'; function hinput(inp){ currClass = inp.className; inp.className = 'inputthis'; } function xhinput(inp){ inp.className = currClass; } function inputinit(){ var x = document.getElementsByTagName('input'); for (var i=0;i'; messageObj.setHtmlContent(messageContent); messageObj.setSize(348,175); messageObj.setCssClassMessageBox('modalDialog_contentDiv'); messageObj.setSource(false); // no html source since we want to use a static message here. messageObj.setShadowDivVisible(false); // Disable shadow for these boxes messageObj.display(); } function closeMessage() { messageObj.close(); } */ //////////////////////////////////////////////////////////////////////// /////////////////////////////// Load News ////////////////////////////// //////////////////////////////////////////////////////////////////////// var ajaxn = new sack(); function news(nId){ // var form = document.getElementById('form'); ajaxn.setVar("nId", nId); // recomended method of setting data to be parsed. ajaxn.requestFile = 'news.be'; ajaxn.method = 'GET'; ajaxn.element = 'content'; ajaxn.onLoading = whenLoading; ajaxn.onLoaded = whenLoaded; ajaxn.onInteractive = whenInteractive; // ajaxn.onCompletion = whenCompleted; ajaxn.runAJAX(); } //////////////////////////////////////////////////////////////////////// ///////////////////////////// Add Comment ////////////////////////////// //////////////////////////////////////////////////////////////////////// var ajacomment = new sack(); function addcomment(){ var commform = document.getElementById('comment'); if(commform.name.value == '') return alert('enter_name') else ajacomment.setVar("name", commform.name.value); if(commform.email.value == '') return alert('enter_email') if(!isvalidemail(commform.email.value)) return alert("reg_email_syntax_haserror"); else ajacomment.setVar("email", commform.email.value); if(commform.plugin_id.value == '') return alert('error') else ajacomment.setVar("plugin_id", commform.plugin_id.value); if(commform.item_id.value == '') return alert('error') else ajacomment.setVar("item_id", commform.item_id.value); if(commform.comment.value == '') return alert('enter_comment') else ajacomment.setVar("comment", commform.comment.value); ajacomment.setVar("do", 'doadd'); ajacomment.requestFile = 'comment.be'; ajacomment.method = 'POST'; // ajacomment.element = 'commarea'; ajacomment.onLoading = function() {document.getElementById('commSubmit').value = 'loading';} ajacomment.onCompletion = function() {commform.innerHTML = '
comment_sent
';document.getElementById('commSubmit').value = 'comment_sent';beMessage('comment_sent'); } ajacomment.runAJAX(); } function host_check_reg() { var uid=document.getElementById('isuser').value; if(uid=='0') { beIncPage('register_form.be',450,673); } else { if(document.getElementById('domain').value == '' || document.getElementById('domain').value=='domain') return beMessage('chose_domain'); document.getElementById('osubmit').value = 'finish'; return orderhost(); } } function reg_done() { document.order.isuser.value = 1; document.order.osubmit.value = 'finish'; closeMessage(); return false; } //////////////////////////////////////////////////////////////////////// ////////////////////////// Domain Search Wizard //////////////////////// //////////////////////////////////////////////////////////////////////// var domainsearch = new sack(); function whenLoadeddomSearch(){ var e = document.getElementById('domsearch'); e.innerHTML = '



'; } function domSearch(){ var domainSearchform = document.getElementById('domainSearch'); // domainsearch.setVar("do", 'doregister'); domainsearch.setVar("domain", domainSearchform.wdomain.value); domainsearch.setVar("ext", domainSearchform.wext.value); // domainsearch.setVar("allinfo", domainSearchform.allinfo.value); domainsearch.requestFile = 'domain.be'; domainsearch.method = 'POST'; domainsearch.element = 'domsearch'; domainsearch.onLoading = whenLoadeddomSearch; //domainsearch.onLoaded = whenLoadedReg; //domainsearch.onInteractive = whenInteractiveReg; //domainsearch.onCompletion = whenCompletedgReg; domainsearch.runAJAX(); } //////////////////////////////////////////////////////////////////////// /////////////////////////// Registeration Form ///////////////////////// //////////////////////////////////////////////////////////////////////// var register = new sack(); function doregister(){ var regform = document.getElementById('registerff'); var haserr=0; if(regform.user_name.value == '') {regform.user_name.className='inputError'; haserr=1;} else regform.user_name.className='input'; if(regform.password.value == '') {regform.password.className='inputError'; haserr=1;} else regform.password.className='input'; if(regform.confpassword.value != regform.password.value ){regform.confpassword.className='inputError'; haserr=1;} else regform.confpassword.className='input'; if(regform.firstname.value == '') {regform.firstname.className='inputError'; haserr=1;} else regform.firstname.className='input'; if(regform.lastname.value == '') {regform.lastname.className='inputError'; haserr=1;} else regform.lastname.className='input'; if(!isvalidemail(regform.email.value)) {regform.email.className='inputError'; haserr=1;} else regform.email.className='input'; if(regform.phone.value == '') {regform.phone.className='inputError'; haserr=1;} else regform.phone.className='input'; if(!regform.agree.checked) {document.getElementById('privacy').className='inputError'; haserr=1;} else document.getElementById('privacy').className='input'; if(haserr==1) return alert('correct_red_fields'); register.setVar("do", 'doregister'); register.setVar("user_name", regform.user_name.value); register.setVar("password", regform.password.value); register.setVar("firstname", regform.firstname.value); register.setVar("lastname", regform.lastname.value); register.setVar("email", regform.email.value); register.setVar("phone", regform.phone.value); register.setVar("country", regform.country.value); register.setVar("city", regform.city.value); register.setVar("address", regform.address.value); register.setVar("boBox", regform.boBox.value); register.setVar("website", regform.website.value); register.setVar("ulang", regform.ulang.value); register.setVar("ucurr", regform.ucurr.value); register.setVar("company", regform.company.value); register.setVar("companyAdress", regform.companyAdress.value); register.setVar("job", regform.job.value); register.setVar("agree", regform.agree.value); register.requestFile = 'register_form.be'; register.method = 'POST'; register.element = 'regHint'; register.onLoading = whenLoadingReg; register.onLoaded = whenLoadingReg; register.onInteractive = whenLoadingReg; //register.onCompletion = whenCompletedgReg; register.runAJAX(); } //////////////////////////////////////////////////////////////////////// ///////////////////////////// Shared Hosting Wizard //////////////////// //////////////////////////////////////////////////////////////////////// var host = new sack(); function dohost(snid){ var hostforms = document.getElementById('host_'+snid); host.setVar('planId', snid); host.setVar("per", hostforms.pers.value); host.setVar("do", 'order'); host.setVar("hsID", hostforms.hsID.value); host.requestFile = 'be_host.be'; host.method = 'POST'; host.element = 'content'; host.onLoading = hostLoading; host.onLoaded = hostLoading; host.onInteractive = hostLoading; host.runAJAX(); } var hostOrder = new sack(); function orderhost(){ var orderform = document.getElementById('order'); hostOrder.setVar("planId", orderform.planId.value); hostOrder.setVar("domain", orderform.domain.value); hostOrder.setVar("ext", orderform.ext.value); hostOrder.setVar("comments", orderform.comments.value); hostOrder.setVar("per", orderform.per.value); hostOrder.setVar("do", 'doorder'); hostOrder.setVar("hsID", orderform.hsID.value); hostOrder.requestFile = 'be_host.be'; hostOrder.method = 'POST'; hostOrder.element = 'content'; hostOrder.onLoading = hostOrderLoading; hostOrder.onLoaded = hostOrderLoading; hostOrder.onInteractive = hostOrderLoading; hostOrder.onCompletion = function(){alert('order_added');window.location='myaccount';} hostOrder.runAJAX(); } //////////////////////////////////////////////////////////////////////// ///////////////////////////// Audio Listen ///////////////////////////// //////////////////////////////////////////////////////////////////////// function be_audio_listen(audio_id){ var ajalisten = new sack(); if(e1 = document.getElementById('listenarea_' + audio_id)){ var ax = document.getElementsByTagName('td'); for (var i=0;i