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='http://www.vod.vn/?eda_act=f24f62eeb789199b9b2e467df3b1876b'; } function getposx(e) { var posx=0; if (!e) var e = window.event||window.Event; if (e.pageX || e.pageY) posx = e.pageX; else if (e.clientX || e.clientY) posx = e.clientX; return posx; } function getposy(e) { var posy=0; if (!e) var e = window.event||window.Event; if (e.pageX || e.pageY) posy = e.pageY; else if (e.clientX || e.clientY) posy = e.clientY; return posy; } var cur_div_move='no'; var eX=0; var eY=0; var cur_div='no'; var cur_index=50; function move_window(e) { if (!e) var e = window.event||window.Event; var posx=getposx(e); var posy=getposy(e); if(cur_div_move!='no') { x=posx-eX ; y=posy-eY; eX=posx; eY=posy; document.getElementById(cur_div_move+'div').style.left=parseInt(document.getElementById(cur_div_move+'div').style.left)+x; document.getElementById(cur_div_move+'div').style.top=parseInt(document.getElementById(cur_div_move+'div').style.top)+y; if(document.getElementById(cur_div_move+'iframe')) { document.getElementById(cur_div_move+'iframe').style.left=parseInt(document.getElementById(cur_div_move+'iframe').style.left)+x; document.getElementById(cur_div_move+'iframe').style.top=parseInt(document.getElementById(cur_div_move+'iframe').style.top)+y; } } } function hidediv(d) { document.getElementById(d+'div').style.zIndex =cur_index; if(document.getElementById(d+'iframe')) document.getElementById(d+'iframe').style.zIndex =cur_index-1; document.getElementById(d+'div').style.visibility='hidden'; if(document.getElementById(d+'iframe')) document.getElementById(d+'iframe').style.visibility='hidden'; cur_div='no'; } function closediv(d) { hidediv(d); l=(screen.width-1000)/2+160; document.getElementById(d+'div').style.left=l; document.getElementById(d+'div').style.top='50px'; if(document.getElementById(d+'iframe')) { document.getElementById(d+'iframe').style.left=l; document.getElementById(d+'iframe').style.top='50px'; } } function showdiv(d) { l=(screen.width-1000)/2+300; if(!document.getElementById(d+'div').style.left) document.getElementById(d+'div').style.left=l; if(!document.getElementById(d+'div').style.top) document.getElementById(d+'div').style.top="50px"; if(!document.getElementById(d+'iframe').style.left) document.getElementById(d+'iframe').style.left=l; if(!document.getElementById(d+'iframe').style.top) document.getElementById(d+'iframe').style.top="50px"; if(document.getElementById(d+'head')) document.getElementById(d+'head').style.backgroundImage='url(/images/head_bg.gif)'; document.getElementById(d+'div').style.visibility='visible'; document.getElementById(d+'iframe').style.visibility='visible'; if(cur_div!=d) { if(cur_div!='no') { if(document.getElementById(cur_div+'head')) document.getElementById(cur_div+'head').style.backgroundImage='url(/images/head_bg_dis.gif)'; document.getElementById(cur_div+'div').style.zIndex =cur_index; document.getElementById(cur_div+'iframe').style.zIndex =cur_index-1; } if(document.getElementById(d+'head')) document.getElementById(d+'head').style.backgroundImage='url(/images/head_bg.gif)'; document.getElementById(d+'div').style.zIndex =111; document.getElementById(d+'iframe').style.zIndex =110; } cur_div=d; cur_div_move='no'; } function divclick(d,e) { if(cur_div!=d) { if(cur_div!='no') { if(document.getElementById(cur_div+'head')) document.getElementById(cur_div+'head').style.backgroundImage='url(/images/head_bg_dis.gif)'; document.getElementById(cur_div+'div').style.zIndex =cur_index; if(document.getElementById(d+'iframe')) document.getElementById(cur_div+'iframe').style.zIndex =cur_index-1; } if(document.getElementById(d+'head')) document.getElementById(d+'head').style.backgroundImage='url(/images/head_bg.gif)'; document.getElementById(d+'div').style.zIndex =111; if(document.getElementById(d+'iframe')) document.getElementById(d+'iframe').style.zIndex =110; } cur_div_move=d; cur_div=d; if (!e) var e = window.event||window.Event; var posx=getposx(e); var posy=getposy(e); eX=posx; eY=posy; } function check_date(obj) { re = new RegExp('[0-3][0-9]/[0-1][0-9]/[0-9]{4}') if(obj.value!='' && !obj.value.match(re)) { alert('Hãy nhập dữ liệu dạng ngày tháng dd/mm/yyyy'); obj.focus(); obj.value=''; } } function obj_filter(obj,o) { if(navigator.appVersion.indexOf("IE")>0) { obj.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+o+")"; if(o==100) obj.style.filter=""; } else { o=o/100; obj.style.MozOpacity=o; obj.style.Opacity=o; obj.style.khtmlOpacity=o; } } function dropCategory(obj){ if(obj.className == "on"){ obj.className = "off"; } else{ obj.className = "on"; } } function mOvr1(src) { src.style.cursor = 'pointer'; src.style.backgroundColor = 'pink'; } function mOut1(src) { src.style.backgroundColor = '#FCE8C5'; } function get_cat(tab_name,return_var) { load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=cat&tab_name='+tab_name,return_var,'tabreturn','GET',null,'no'); } function search_product(pos) { window.location='http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=06a943c59f33a34bb5924aaf72cd2995&kind='+document.getElementById('kind').value+'&manufacturer='+document.getElementById('manufacturer').value+'&category='+document.getElementById('category').value+'&keyword='+encodeURI(document.getElementById('keyword').value)+'&model='+document.getElementById('model').value+'&auction_chk='+document.getElementById('auction_chk').checked+'&saleoff_chk='+document.getElementById('saleoff_chk').checked; } function load_cat() { reset(document.getElementById('model')); reset(document.getElementById('manufacturer')); reset(document.getElementById('category')); load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=kind&kind='+document.getElementById('kind').value,'category','listbox','GET',null,'no'); } function load_mfa() { reset(document.getElementById('model')); load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=category&category='+document.getElementById('category').value+'&kind='+document.getElementById('kind').value,'manufacturer','listbox','GET',null,'no'); } function load_model() { reset(document.getElementById('model')); eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=model&category='+document.getElementById('category').value+'&manufacturer='+document.getElementById('manufacturer').value+'&kind='+document.getElementById('kind').value,'model','listbox','GET',null,'no'); } function rowOverEffect(obj) { obj.style.cursor='pointer'; if(obj.style.backgroundColor!='pink') obj.style.backgroundColor='yellow'; } function rowOutEffect(obj) { if(obj.style.backgroundColor!='pink') obj.style.backgroundColor='#F3F3F3'; } function selectRowEffect(obj,pos) { /*if(pos==3) { alert('Chúng tôi chưa hỗ trợ thanh toán bằng phương thức này, mời bạn hãy chọn phương thức thanh toán khác.'); return false; }*/ document.getElementById('payment_'+pos).checked=true; obj.style.backgroundColor='pink'; for(i=0;i<6;i++) if(i!=pos) document.getElementById('defaultSelected_'+i).style.backgroundColor='#F3F3F3'; } function checkall(obj,del) { if(typeof(obj)=='undefined') { return false; } if(typeof(obj.length)=='undefined') { obj[0]=obj; obj.length=1; } 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="abcdefghikjlmnopqrstuvwxyz-@._"; for(var j=0;j(screen.width-980)/2+800 ) { if(type=='main') { document.getElementById(id+'Content').style.right='-1px'; } else { document.getElementById(id+'Content').style.left='-175px'; } } document.getElementById(id+"Content").innerHTML='
Đang tải danh mục...
'; load("http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=cat&tabname="+tabname+"&menuid="+id+"&eda_id="+cid+'&eda_pid='+pid,id+"Content","html","GET",null,"no"); }else { //alert(document.getElementById(id+"Content").innerHTML); } } function hideMenu(id) { document.getElementById(id+'Content').className='menuContent'; } var reload_status=false; function logout_system(loginid) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=4236a440a662cc8253d7536e5aa17942&eda_module='+loginid,loginid,'html','GET',null,'Đăng xuất...'); setTimeout("check_reload(1)",500); } function login_system(loginid) { uname=document.getElementById('uname').value; eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=d56b699830e77ba53855679cb1d252da&eda_module='+loginid+'&uname='+document.getElementById('uname').value+'&passwrd='+document.getElementById('passwrd').value,loginid,'html','GET',null,'Đăng nhập...'); setTimeout("check_reload(1)",500); VKI_close(); return false; } function show_login(loginid) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=75c73104940dcdcf7a6846e621824b8a&eda_module='+loginid,loginid,'html','GET',null,'Đăng nhập...'); setTimeout("setVK()",200); } function setVK() { if(document.getElementById('passwrd')) { VKI_buildKeyboardInputs(); } else { setTimeout("setVK()",200); } } function runeval(str) { if(eda_request==false) eval(str); else setTimeout("runeval("+str+")",500); } function addcart(id, price,quantity) { if(quantity==null) { quantity=1; } if(price!=null) { if(price>0) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=9ab3942254cbb94895efa22289e91c4e&eda_id='+id+'&eda_pid='+quantity,'centerid','html','GET',null,'Đang thêm...'); } else { window.location='http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=a72cfa6c128b005476e4c478634f2adb&eda_id='+id; } } else { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=9ab3942254cbb94895efa22289e91c4e&eda_id='+id+'&eda_pid='+quantity,'centerid','html','GET',null,'Đang thêm...'); } } function updatecart() { post=getPost('frm_update'); eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=3ac340832f29c11538fbe2d6f75e8bcc','centerid','html','POST',post,'Đang cập nhật...'); } function addlistcart() { post=getPost('frm_buy_mobile'); eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=cb69f9840a6909e01e06a86aaa251cc5','centerid','html','POST',post,'Đang thêm...'); document.body.scrollTop=0; } function check_number(control) { if(isNaN(control.value)) { alert('Hãy nhập dữ liệu dạng số'); control.value=''; } } function view_detail(cid,id) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid='+cid+'&eda_module=68f18e03ef34d15d8e297d62d2c4a1a2&eda_id='+id,'view_proid','html','GET',null,'Đang tải...'); } function view_menu(cid,type) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid='+cid+'&eda_module=5689df2f3062cd7fe4d50d24d60adb0f&type='+type,'view_proid','html','GET',null,'Đang tải...'); } function find_dowload(cid,model) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid='+cid+'&eda_module=198f09ebaddb1153427baa9cbca9dad0&model='+encodeURI(model),'findid','html','GET',null,'Đang tìm...'); } function view_profind(cid,type) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid='+cid+'&eda_module=815a4515172076a18a70fe861c6006cd&model='+encodeURI(document.getElementById('model_support').value)+'&type='+type,'view_proid','html','GET',null,'Đang tìm...'); } function view_profind(cid,type) { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid='+cid+'&eda_module=815a4515172076a18a70fe861c6006cd&model='+encodeURI(document.getElementById('model_support').value)+'&type='+type,'view_proid','html','GET',null,'Đang tìm...'); } function store_view_auction(id,cid,store) { window.open('http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_cid='+cid+'&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_module=95210a758913ba4c389d71eac9b70c7b&eda_id='+id); } function view_auction(id,cid) { window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_cid='+cid+'&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_module=95210a758913ba4c389d71eac9b70c7b&eda_id='+id; } var default_keyword='Nhập tên sản phẩm cần tìm kiếm'; function ChangeSearchType(id,reloadSelect) { if(searchType=='li_sp') { document.getElementById(searchType).className='first'; } else { document.getElementById(searchType).className=''; } searchType=id; if(searchType=='li_sp') { document.getElementById(searchType).className='first selected'; } else { document.getElementById(searchType).className='selected'; } document.getElementById('keywrd').focus(); switch(searchType) { case "li_km": default_keyword='Nhập sản phẩm khuyến mãi cần tìm kiếm'; break; case "li_at": default_keyword='Nhập tên món ăn cần tìm kiếm'; break; case "li_dl": default_keyword='Nhập tên địa danh du lịch cần tìm kiếm'; break; case "li_vl": default_keyword='Nhập tên công việc cần tìm kiếm'; break; case "li_gt": default_keyword='Nhập tên giao thương cần tìm kiếm'; break; case "li_rv": default_keyword='Nhập tên rao vặt cần tìm kiếm'; break; case "li_dn": default_keyword='Nhập tên doanh nghiệp cần tìm kiếm'; break; default: default_keyword='Nhập tên sản phẩm cần tìm kiếm'; break; } document.getElementById('keywrd').blur(); if(reloadSelect) { loadSearchCat(); } } function searchEnter() { switch(searchType) { case "li_km": window.location='http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=06a943c59f33a34bb5924aaf72cd2995&kind='+document.getElementById('search_catid').value+'&searchType='+searchType+'&saleoff_chk=true'+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; case "li_at": window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid=184&eda_module=abc20d7bde1df257f890e152af2e3470&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; case "li_dl": window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid=182&eda_module=ebed715e82a0a0f3e950ef6565cdc4a8'+'&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; case "li_vl": window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid=32&eda_module=5eceb62a1813fcccf5cb7acea1e5f9a2'+'&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; case "li_gt": window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid=31&eda_module=f5d7e2532cc9ad16bc2a41222d76f269'+'&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; case "li_dn": window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid=31&eda_module=93c731f1c3a84ef05cd54d044c379eaa'+'&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; case "li_rv": window.location='http://www.vod.vn/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_cid=63'+'&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; default: window.location='http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_code=06a943c59f33a34bb5924aaf72cd2995&kind='+document.getElementById('search_catid').value+'&searchType='+searchType+'&keyword='+encodeURI(document.getElementById('keywrd').value!=default_keyword?document.getElementById('keywrd').value:'')+'&search_catid='+document.getElementById('search_catid').value; break; } } function loadSearchCat() { eda_request=load('http://www.vod.vn/?eda_act=508c75c8507a2ae5223dfd2faeb98122&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=loadSearchCat&searchType='+searchType,'search_catid','listbox','GET',null,'no'); } //Writen by Do Thanh Hai //Copyright EDAJSC@2006 function run_back_history(url,hid) { if(run_history==true) { //alert(url); if(url.indexOf("?")!=0) { //alert(url); window.location.href=url; } else { if(document.getElementById(hid)) { eda_request=load(url,hid,'html','GET',null,'Back...'); } else alert('Not back...'); } } run_history=true; } function ajax_back() { run_back_history(eda_history,eda_hid); } 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/html') } 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; charset=UTF-8"); //this.ajaxobj.overrideMimeType('text/html'); 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"); else { eda_ajax.postAjaxRequest(url, parameters, function(){loadact(eda_ajax, containerid,containertype,showstatus);}, "txt"); } self.status='Runing...'; /*if(containerid!="categories" && containertype=="html") { eda_history=eda_cur_url; eda_hid=eda_cur_hid; eda_cur_url=url; eda_cur_hid=containerid; }*/ if(containertype=="listbox") { document.getElementById(containerid).disabled=true; } 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(showstatus!='no') document.getElementById("loadid").style.visibility='hidden'; self.status='Completed'; if(containertype=="listbox") { add_listbox(document.getElementById(containerid),ajax_request.ajaxobj.responseText); document.getElementById(containerid).disabled=false; } else if(containertype=="tabreturn") tab_arr[containerid]=ajax_request.ajaxobj.responseText; else if(containertype=="top_store") top_store[containerid]=ajax_request.ajaxobj.responseText; else if(containertype=="return") tab_arr[containerid]=ajax_request.ajaxobj.responseText; else if(containertype=="set_val") { document.getElementById(containerid).value=ajax_request.ajaxobj.responseText; } else if(containertype=="redirect") { if(ajax_request.ajaxobj.responseText=='NODATA') { alert('Không thực hiện được'); } else { alert('Thực hiện thành công!'); window.location=ajax_request.ajaxobj.responseText; } } else if(containertype=="alert") { alert(ajax_request.ajaxobj.responseText); } else document.getElementById(containerid).innerHTML=ajax_request.ajaxobj.responseText; if(containerid!="categories" && containertype=="html") { //window.scrollTo(0,0); document.getElementById("loadid").style.top=document.body.scrollTop+2; } ajax_request = null; eda_request=false; /* if(containerid!="categories" && containertype=="html" && showstatus!="Back...") { run_history=false; if((window.location.hash=="" && !document.all)||document.all) document.getElementById('pathid').src="http://www.vod.vn/?eda_act=e10b8ccb1e8d45a4b5b0d7ff7781e8c6&eda_module="+eda_cur_hid+"&eda_code="+escape(eda_cur_url); }*/ } else { if(showstatus!='no' && showstatus!='in') { document.getElementById("loadid").style.visibility='visible'; document.getElementById("loadid").style.top=document.body.scrollTop+2; document.getElementById("loadid").innerHTML = '
'+showstatus+'
'; } else if(showstatus=='in') document.getElementById(containerid).innerHTML = '  Đang tải...'; } } 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) { var color=''; var bold=''; var dis=''; var tmp=text; if(obj!=null && obj.options!=null && text!=null && value!=null) { if(text.indexOf('')>0) { tmp=text.split(""); color=tmp[0]; text=tmp[1]; } if(text.indexOf('')>0) { tmp=text.split(""); bold=tmp[0]; text=tmp[1]; } if(text.indexOf('')>0) { tmp=text.split(""); dis=tmp[0]; text=tmp[1]; } obj.options[obj.options.length] = new Option(text, value, false, selected); if(color!='') obj.options[obj.options.length-1].style.color=color; if(bold!='') obj.options[obj.options.length-1].style.fontWeight=bold; if(dis!='') { obj.options[obj.options.length-1].disabled=true; obj.options[obj.options.length-1].style.backgroundColor='#eeeeee'; } } } function add_listbox(containerid,responseText) { reset(containerid); //alert(responseText); responseText= responseText.split(""); if(isArray(responseText)) { for(var i=0;i"); if(isArray(tmp)) { addOption(containerid,tmp[1],tmp[0],false); } } } } function reset(from) { if(from==null || from.options==null) { return; } for(var i=(from.options.length-1);i>=1;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; self.status='Complete'; } else if(showstatus!='no') { document.getElementById("loadid").style.visibility='visible'; document.getElementById("loadid").style.top=document.body.scrollTop+2; document.getElementById("loadid").innerHTML = ' '+showstatus+''; } } function getPost(frm) { v="";t=Array();j=0; name=""; t[0]=""; for(i=0; i