//Writen by Do Thanh Hai //Copyright EDAJSC@2006 var eda_request=false; function onUnloadHandler(){ if(self.VBArray){ var e = self.event, s = self.screen; if(e.clientX + s.width < 0 && e.clientY + s.height < 0 && typeof(window.onclose) == "function"){ window.onclose(); } } } onunload =onUnloadHandler; function onclose(){ // alert('8it8lajpr3a502dgng47iiut63'); window.location='/?eda_act=f24f62eeb789199b9b2e467df3b1876b'; } function createAjaxObj(){ var ajax_request=false; if (window.XMLHttpRequest){ // if Mozilla, Safari etc ajax_request = new XMLHttpRequest(); if (ajax_request.overrideMimeType) ajax_request.overrideMimeType('text/xml') } else if (window.ActiveXObject) { // if IE try { ajax_request = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { ajax_request = new ActiveXObject("Microsoft.XMLHTTP"); } catch (e){} } } if (!ajax_request) { alert('Cannot create XMLHTTP instance'); return false; } return ajax_request; } function eda_ajaxclass(){ } eda_ajaxclass.prototype.basedomain="http://"+window.location.hostname; eda_ajaxclass.prototype.ajaxobj=false;//createAjaxObj(); eda_ajaxclass.prototype.filetype="txt"; eda_ajaxclass.prototype.addrandomnumber=0; //Set to 1 or 0. See documentation. eda_ajaxclass.prototype.getAjaxRequest=function(url, parameters, callbackfunc, filetype){ this.ajaxobj=createAjaxObj(); //recreate ajax object to defeat cache problem in IE if (this.addrandomnumber==1) //Further defeat caching problem in IE? var parameters=parameters+"&ajaxcachebust="+new Date().getTime(); if (this.ajaxobj){ this.filetype=filetype; this.ajaxobj.onreadystatechange=callbackfunc; this.ajaxobj.open('GET', url, true); this.ajaxobj.send(null); } } eda_ajaxclass.prototype.postAjaxRequest=function(url, parameters, callbackfunc, filetype){ this.ajaxobj=createAjaxObj(); //recreate ajax object to defeat cache problem in IE //if (this.ajaxobj){ this.filetype=filetype; this.ajaxobj.onreadystatechange = callbackfunc; this.ajaxobj.open('POST', url, true); this.ajaxobj.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); this.ajaxobj.setRequestHeader("Content-length", parameters.length); this.ajaxobj.setRequestHeader("Connection", "close"); this.ajaxobj.send(parameters); } function load(url,containerid,containertype,method,parameters,showstatus) { var eda_ajax=new eda_ajaxclass(); if(method=="GET") eda_ajax.getAjaxRequest(url, null, function(){ loadact(eda_ajax, containerid,containertype,showstatus); }, "txt"); self.status='Runing...'; if(containerid!="domainid" && containertype=="html" && showstatus!="Back..." && showstatus!="no") { eda_history=eda_cur_url; eda_hid=eda_cur_hid; eda_cur_url=url; eda_cur_hid=containerid; } return eda_ajax; } function loadact(ajax_request, containerid,containertype,showstatus){ if (ajax_request.ajaxobj.readyState == 4 && (ajax_request.ajaxobj.status==200 || window.location.href.indexOf("http")==-1)) { if(containertype=="listbox") add_listbox(document.getElementById(containerid),ajax_request.ajaxobj.responseText); else document.getElementById(containerid).innerHTML=ajax_request.ajaxobj.responseText; if(showstatus!='no') document.getElementById("loadid").style.visibility='hidden'; self.status='Completed'; /*if(containertype=="html") { window.scrollTo(0,0); document.getElementById("loadid").style.top=document.body.scrollTop; }*/ ajax_request = null; if(containerid!="domainid" && containertype=="html" && showstatus!="Back..." && showstatus!="no") { run_history=false; // if(navigator.appName.indexOf("Microsoft")!=-1) // { //document.getElementById('pathid').src="/?eda_act=e10b8ccb1e8d45a4b5b0d7ff7781e8c6&eda_module="+eda_cur_hid+"&eda_code="+escape(eda_cur_url); // } } } else if(showstatus!='no') { if(showstatus=='in') { document.getElementById(containerid).innerHTML = '

Đang tải dữ liệu...
'; } else { document.getElementById("loadid").style.visibility='visible'; document.getElementById("loadid").style.top=document.body.scrollTop; document.getElementById("loadid").innerHTML = '
'+showstatus+''; } } } function ajax_abort(ajax_request) { ajax_request.ajaxobj.abort(); document.getElementById("loadid").style.visibility='hidden'; self.status=''; ajax_request = false; } function addOption(obj,text,value,selected) { if(obj!=null && obj.options!=null && text!=null && value!=null) { obj.options[obj.options.length] = new Option(text, value, false, selected); } } function add_listbox(containerid,responseText) { reset(containerid); //alert(responseText); responseText= responseText.split("/;"); if(isArray(responseText)) { for(var i=0;i=0;i--) { from.options[i] = null; } from.selectedIndex = 0; } function isArray(obj) { return(typeof(obj.length)=="undefined")?false:true; } function ajax_delrow(url,obj,tb,showstatus) { var eda_ajax=new eda_ajaxclass(); eda_ajax.getAjaxRequest(url, null, function(){ delrowexec(eda_ajax,obj,tb,showstatus); }, "txt"); self.status='Runing...'; return eda_ajax; } function delrowexec(ajax_request,obj,tb,showstatus) { if (ajax_request.ajaxobj.readyState == 4 && (ajax_request.ajaxobj.status==200 || window.location.href.indexOf("http")==-1)) { if(ajax_request.ajaxobj.responseText.search("executedok")!=-1) { delrow(obj,tb); } else alert('Undeleted'); if(showstatus!='no') document.getElementById("loadid").style.visibility='hidden'; ajax_request=false; document.getElementById("loadid").style.top=document.body.scrollTop; self.status='Complete'; } else if(showstatus!='no') { document.getElementById("loadid").style.visibility='visible'; document.getElementById("loadid").style.top=document.body.scrollTop; document.getElementById("loadid").innerHTML = '
'+showstatus+''; } } function load_checkdomain(domain,id) { getDomainPrice('price_'+id,domain); domain=punycode.toASCII(domain); var eda_ajax=new eda_ajaxclass(); url='/?eda_act=182ee919d3c16fa19f1b752939b076ee&eda_type=ajax&eda_module=checkdomain&eda_code='+domain; eda_request=eda_ajax.getAjaxRequest(url, null, function(){ loadact_checkdomain(eda_ajax,domain, id,'html','no'); }, "txt"); self.status='Runing...'; document.getElementById('statusid_'+id).innerHTML='Đang kiểm tra ...'; return eda_ajax; } function loadact_checkdomain(ajax_request, domain, containerid,containertype,showstatus){ if (ajax_request.ajaxobj.readyState == 4 && (ajax_request.ajaxobj.status==200 || window.location.href.indexOf("http")==-1)) { if(ajax_request.ajaxobj.responseText.indexOf("Unavailable")>=0) { document.getElementById('statusid_'+containerid).innerHTML='Tên miền đã được đăng ký (Thông tin Whois, Transfer)'; } else { document.getElementById('chk_'+containerid).disabled=false; document.getElementById('hidden_domain_'+containerid).disabled=false; document.getElementById('chk_'+containerid).checked=true; document.getElementById('statusid_'+containerid).innerHTML="Chưa có chủ thể nào đăng ký"; } self.status='Completed'; ajax_request = null; } } function getDomainPrice(id,dm) { load('/?eda_act=182ee919d3c16fa19f1b752939b076ee&eda_type=ajax&eda_module=getdomainprice&eda_code='+dm,id,'html',"GET") } function recheckdomain(id,domain) { var eda_ajax=new eda_ajaxclass(); if(document.getElementById('activeservicebt')) { document.getElementById('activeservicebt').disabled=true; } url='/?eda_act=182ee919d3c16fa19f1b752939b076ee&eda_type=ajax&eda_module=checkdomain&eda_code='+domain; eda_request=eda_ajax.getAjaxRequest(url, null,function(){ loadact_recheckdomain(eda_ajax,domain, id,'html','no'); }, "txt"); self.status='Runing...'; document.getElementById('statusid_'+id).innerHTML='Đang kiểm tra ...'; return eda_ajax; } function loadact_recheckdomain(ajax_request, domain, containerid,containertype,showstatus){ if (ajax_request.ajaxobj.readyState == 4 && (ajax_request.ajaxobj.status==200 || window.location.href.indexOf("http")==-1)) { if(ajax_request.ajaxobj.responseText.indexOf("Unavailable")>=0) { document.getElementById(containerid).innerHTML='
Tên miền đã bị đăng ký. Vui lòng xóa đơn hàng và chọn tên miền khác để đăng ký'; if(document.getElementById('activeservicebt')) { document.getElementById('activeservicebt').onclick=function() {alert('Tên miền đã bị đăng ký. Vui lòng xóa đơn hàng và chọn tên miền khác để đăng ký');}; } } else { document.getElementById(containerid).innerHTML='Sẳn sàng'; if(document.getElementById('activeservicebt')) { document.getElementById('activeservicebt').disabled=false; } } self.status='Completed'; ajax_request = null; } } var eda_request = false; var eda_cur_url=""; var eda_cur_hid=""; var eda_history=""; var eda_hid=""; var run_history=false; function onUnloadHandler(){ if(self.VBArray){ var e = self.event, s = self.screen; if(e.clientX + s.width < 0 && e.clientY + s.height < 0 && typeof(window.onclose) == "function"){ window.onclose(); } } } onunload =onUnloadHandler; function onclose(){ window.location='/?eda_act=f24f62eeb789199b9b2e467df3b1876b'; } function chkenter (evt) { var keyCode = document.layers ? evt.which : document.all ? evt.keyCode : evt.keyCode; if (keyCode == 13) return true; else { return false; } } function mOvr1(src) { src.style.cursor = 'pointer'; src.style.backgroundColor = '#A0CAF9'; } function mOut1(src) { src.style.backgroundColor = '#DDECFC'; } function rowOverEffect(obj) { obj.style.cursor='pointer'; if(obj.style.backgroundColor!='rgb(255, 255, 0)') obj.style.backgroundColor='rgb(238, 238, 238)'; } function rowOutEffect(obj) { if(obj.style.backgroundColor!='rgb(255, 255, 0)') obj.style.backgroundColor='#F3F3F3'; } function selectRowEffect(obj,pos) { document.getElementById('payment_'+pos).checked=true; obj.style.backgroundColor='rgb(255, 255, 0)'; for(i=0;i<7;i++) { if(i!=pos && document.getElementById('defaultSelected_'+i)) { document.getElementById('defaultSelected_'+i).style.backgroundColor='#F3F3F3'; } } if(pos==6) { document.getElementById('bankid').style.display=''; } else { document.getElementById('bankid').style.display='none'; } } function checkall(obj,del) { if(del.checked) for(i=0;i0) return false; if(s.indexOf("@")==-1) return false; var i = 1; var sLength = s.length; if (s.indexOf(".")==-1) return false; if (s.indexOf("..")!=-1) return false; if (s.indexOf("@")!=s.lastIndexOf("@")) return false; if (s.lastIndexOf(".")==s.length-1) return false; var str="abcdefghikjlmnopqrstuvwxyz0123456789-@._"; for(var j=0;j9?d.getDate():'0'+d.getDate())+s+(d.getMonth()>8?(d.getMonth()+1):('0'+(d.getMonth()+1)))+s+d.getFullYear(); return false; } } function reset_date(obj) { var d=new Date(); obj.value=(d.getDate()>9?d.getDate():'0'+d.getDate())+'/'+(d.getMonth()>8?(d.getMonth()+1):('0'+(d.getMonth()+1)))+'/'+d.getFullYear(); } function go_domain(dm) { if(dm=="") { alert('Bạn hãy nhập tên domain.'); } else { window.location='/?eda_act=ad5f82e879a9c5d6b5b442eb37e50551&domain='+dm; } return false; } function whois() { if(document.getElementById('domainname').value=="") { alert('Xin vui lòng nhập tên domain cần tra cứu.'); } else if(document.getElementById('ext1').value=="All" || document.getElementById('ext2').value=="All") { alert('Xin vui lòng chọn phần mở rộng duy nhất (Không chọn All).'); } else { domain=document.getElementById('domainname').value; domain=domain.replace(" ",""); domain=domain.replace("www.",""); domain=domain.replace(".",","); domain= domain.split(","); domain=domain[0]; document.getElementById('domainname').value=domain; if(document.getElementById('ext1').value!=" ") domain+=document.getElementById('ext1').value; if(document.getElementById('ext2').value!=" ") domain+=document.getElementById('ext2').value; eda_request=load('/?eda_act=b244383da8e1b93814430dd9a77db079&eda_type=ajax&eda_module=whois&eda_code='+domain,'divdomainid','html','GET',null,'Whois...'); } return false; } function ping() { if(document.getElementById('domainname').value=="") { alert('Xin vui lòng nhập tên domain cần tra cứu.'); } else if(document.getElementById('ext1').value=="All"||document.getElementById('ext2').value=="All") { alert('Xin vui lòng chọn phần mở rộng duy nhất (Không chọn All).'); } else { domain=document.getElementById('domainname').value; domain=domain.replace(" ",""); domain=domain.replace("www.",""); domain=domain.replace(".",","); domain= domain.split(","); domain=domain[0]; document.getElementById('domainname').value=domain; if(document.getElementById('ext1').value!=" ") domain+=document.getElementById('ext1').value; if(document.getElementById('ext2').value!=" ") domain+=document.getElementById('ext2').value; eda_request=load('/?eda_act=df911f0151f9ef021d410b4be5060972&eda_type=ajax&eda_module=ping&eda_code='+domain,'divdomainid','html','GET',null,'Pinging...'); } return false; } function in_array(url,fixurl){ var result=false; var x; for (x in fixurl){ if (fixurl[x]==url){ result=true; } } return result; } function chk_list(d) { for(var i=0;i0) { domain_ext=domain.toString().substring(domain.toString().indexOf("."), domain.toString().length); } if(domain_ext=="" || !in_array(domain_ext, dm_chk)) { alert('Tên miền whois không hợp lệ. Hãy nhập tên miền dạng đầy đủ, ví dụ: eda.vn'); return false; } if(!domain_name.toString().match(/^[a-zA-Z0-9_-]+$/)){ alert('Tên miền whois không hợp lệ. Hãy nhập tên miền dạng đầy đủ, ví dụ: eda.vn'); return false; } if(""=="homepage") { document.getElementById('divdomainid').className='modulad'; document.getElementById('divdomainid').style.marginTop='5px'; document.getElementById('divdomainid').innerHTML="Đang tải dữ liệu ..."; } eda_request=load('/?eda_act=b244383da8e1b93814430dd9a77db079&eda_type=ajax&eda_module=whois&eda_code='+domain,'divdomainid','html','GET',null,'Whois...'); } function view_whois_domain(dm) { document.getElementById('whoisdomainid').style.display=''; eda_request=load('/?eda_act=b244383da8e1b93814430dd9a77db079&eda_type=ajax&eda_module=whois&eda_code='+dm,'divwhoisdomainid','html','GET',null,'in'); } function transfer_domain(dm) { window.location='/?eda_act=ad5f82e879a9c5d6b5b442eb37e50551&eda_code=b6ddf29160d81fb54ea95486bcae57f4&transfer=1&eda_module='+dm; } function close_whois() { document.getElementById('whoisdomainid').style.display='none'; } function check_domain(domain) { var domain_ext, domain_name, ext_list=new Array(); if(document.getElementById('domainname').value=="" && domain=="") { alert('Bạn hãy nhập tên domain.'); return false; } if(domain=="") { domain=document.getElementById('domainname').value.toString().toLowerCase(); } domain2=domain; domain2=domain2.replace(/ /g,""); domain2=domain2.replace("www.",""); domain2=punycode.toASCII(domain2); domain_name2=domain2.toString().substring(0, domain2.toString().indexOf(".")); domain=domain.replace(/ /g,""); domain=domain.replace("www.",""); domain_name=domain.toString().substring(0, domain.toString().indexOf(".")); if(domain.toString().indexOf(".")>0) { domain_ext=domain.toString().substring(domain.toString().indexOf("."), domain.toString().length); } else { domain_ext=""; domain_name=domain.toString(); domain_name2=domain2.toString(); } if(domain_ext!=="" && !in_array(domain_ext, dm_chk)) { alert('Tên miền không hợp lệ!'); return false; } else if(domain_ext===".pro"&&domain_name2.length<4) { alert('Tên miền .pro phải nhiều hơn 3 ký tự'); return false; } else if(domain_name2.length<3&&domain_ext===".vn") { alert('Tên miền "'+domain+'" phải nhiều hơn 2 ký tự'); return false; } if(!domain_name2.toString().match(/^[a-zA-Z0-9]([a-zA-Z0-9-]+)$/)){ alert('Tên miền không hợp lệ!'); return false; } if(""=="homepage") { document.getElementById('divdomainid').className='modulad'; document.getElementById('divdomainid').style.marginTop='5px'; } if(domain_ext=="") { var k=0; for (var i=0; i' +'Kiểm tra để kiểm tra sự tồn tại của tên miền, danh sách tên miền mỗi lần kiểm tra sẽ dược thêm vào mục Danh sách tên miền cần đăng ký (Đã đăng ký hoặc chưa có chủ thể đăng ký).

  Chọn tên miền cần đăng ký trong Danh sách tên miền cần đăng ký, Chọn Đăng ký để tiến hành nhập thông tin đăng ký tên miền. Hệ thống sẽ xóa bớt những tên miền đã được đăng ký. Tại mục này bạn cũng có thể kiểm tra thêm các tên miền khác bằng cách nhập tên miền và chọn Kiểm tra. Hệ thống sẽ tự động thêm tiếp tên miền vào mục Danh sách các tên miền cần đăng ký để bạn tự chọn.

' +'' +'' +' ' +'
' +'  Danh sách tên miền cần đăng ký' +'Đơn giáTrạng thái
' +'' +'

'; document.getElementById('domainname').value=domain_name; for(var i=0;i3||(domain_name.length>2&&ext_list[i]!=".pro")||(domain_name.length>=2&&ext_list[i]!=".vn"&&ext_list[i]!=".pro")) { addRowTo("domain_checkid","www."+domain_name+ext_list[i]); id=uid-1; setTimeout("load_checkdomain('"+domain_name+ext_list[i]+"',"+id+")",domain_timeout*i); } } } } return false; } function addRowTo(id,dm,dm2) { var tbl = doc.getElementById(id).getElementsByTagName('tbody')[0]; //create a new row var newrow = doc.createElement("TR"); var newcol , newinput; newrow.style.cursor='pointer'; newrow.id=uid; newrow.onmouseover=function() { this.style.backgroundColor='yellow'; } newrow.onmouseout=function() { this.style.backgroundColor=''; } newrow.onclick=function() { if(document.getElementById("chk_"+this.id).disabled==false) document.getElementById("chk_"+this.id).checked=!document.getElementById("chk_"+this.id).checked; } newcol = doc.createElement("TD"); newcol.width = 40; newcol.align = "center"; newinput = doc.createElement("input"); newinput.name = "chk[]"; newinput.id = "chk_"+uid; newinput.type = "checkbox"; newinput.onclick=function() { this.checked=!this.checked; } newinput.disabled = true; newinput.value = dm; newcol.appendChild(newinput); newinput = doc.createElement("input"); newinput.name = "hidden_domain[]"; newinput.id = "hidden_domain_"+uid; newinput.type = "hidden"; newinput.value = dm; newinput.disabled = true; newcol.appendChild(newinput); newrow.appendChild(newcol); newcol = doc.createElement("TD"); newcol.width = 200; newcol.innerHTML = "  "+dm; newrow.appendChild(newcol); newcol = doc.createElement("TD"); newcol.width = 245; newcol.align = "center"; newcol.id = "price_"+uid; newcol.innerHTML = ""; newrow.appendChild(newcol); newcol = doc.createElement("TD"); newcol.width = 245; newcol.align = "center"; newcol.id = "statusid_"+uid; newcol.innerHTML = "Đang kết nối..."; newrow.appendChild(newcol); tbl.appendChild(newrow); uid++; } function delRow(button,tbl) { var row = button.parentNode.parentNode; var tbody = document.getElementById(tbl).getElementsByTagName('tbody')[0]; tbody.removeChild(row); } function regform() { has=-1; for(i=0;i1&&(e=d[0]+"@",a=d[1]);var f=a.split(D),g=c(f,b).join(".");return e+g}function e(a){for(var b,c,d=[],e=0,f=a.length;f>e;)b=a.charCodeAt(e++),b>=55296&&56319>=b&&f>e?(c=a.charCodeAt(e++),56320==(64512&c)?d.push(((1023&b)<<10)+(1023&c)+65536):(d.push(b),e--)):d.push(b);return d}function f(a){return c(a,function(a){var b="";return a>65535&&(a-=65536,b+=H(a>>>10&1023|55296),a=56320|1023&a),b+=H(a)}).join("")}function g(a){return 10>a-48?a-22:26>a-65?a-65:26>a-97?a-97:t}function h(a,b){return a+22+75*(26>a)-((0!=b)<<5)}function i(a,b,c){var d=0;for(a=c?G(a/x):a>>1,a+=G(a/b);a>F*v>>1;d+=t)a=G(a/F);return G(d+(F+1)*a/(a+w))}function j(a){var c,d,e,h,j,k,l,m,n,o,p=[],q=a.length,r=0,w=z,x=y;for(d=a.lastIndexOf(A),0>d&&(d=0),e=0;d>e;++e)a.charCodeAt(e)>=128&&b("not-basic"),p.push(a.charCodeAt(e));for(h=d>0?d+1:0;q>h;){for(j=r,k=1,l=t;h>=q&&b("invalid-input"),m=g(a.charCodeAt(h++)),(m>=t||m>G((s-r)/k))&&b("overflow"),r+=m*k,n=x>=l?u:l>=x+v?v:l-x,!(n>m);l+=t)o=t-n,k>G(s/o)&&b("overflow"),k*=o;c=p.length+1,x=i(r-j,c,0==j),G(r/c)>s-w&&b("overflow"),w+=G(r/c),r%=c,p.splice(r++,0,w)}return f(p)}function k(a){var c,d,f,g,j,k,l,m,n,o,p,q,r,w,x,B=[];for(a=e(a),q=a.length,c=z,d=0,j=y,k=0;q>k;++k)p=a[k],128>p&&B.push(H(p));for(f=g=B.length,g&&B.push(A);q>f;){for(l=s,k=0;q>k;++k)p=a[k],p>=c&&l>p&&(l=p);for(r=f+1,l-c>G((s-d)/r)&&b("overflow"),d+=(l-c)*r,c=l,k=0;q>k;++k)if(p=a[k],c>p&&++d>s&&b("overflow"),p==c){for(m=d,n=t;o=j>=n?u:n>=j+v?v:n-j,!(o>m);n+=t)x=m-o,w=t-o,B.push(H(h(o+x%w,0))),m=G(x/w);B.push(H(h(m,0))),j=i(d,r,f==g),d=0,++f}++d,++c}return B.join("")}function l(a){return d(a,function(a){return B.test(a)?j(a.slice(4).toLowerCase()):a})}function m(a){return d(a,function(a){return C.test(a)?"xn--"+k(a):a})}var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o="object"==typeof module&&module&&!module.nodeType&&module,p="object"==typeof global&&global;(p.global===p||p.window===p||p.self===p)&&(a=p);var q,r,s=2147483647,t=36,u=1,v=26,w=38,x=700,y=72,z=128,A="-",B=/^xn--/,C=/[^\x20-\x7E]/,D=/[\x2E\u3002\uFF0E\uFF61]/g,E={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},F=t-u,G=Math.floor,H=String.fromCharCode;if(q={version:"1.3.0",ucs2:{decode:e,encode:f},decode:j,encode:k,toASCII:m,toUnicode:l},"function"==typeof define&&"object"==typeof define.amd&&define.amd)define("punycode",function(){return q});else if(n&&o)if(module.exports==n)o.exports=q;else for(r in q)q.hasOwnProperty(r)&&(n[r]=q[r]);else a.punycode=q}(this);