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://bhmedvietnam.divivu.com/?eda_act=f24f62eeb789199b9b2e467df3b1876b'; } function loadjs(id,sc) { var headTag = document.getElementById(id); script = document.createElement('script'); headTag.appendChild(script); script.type = 'text/javascript'; script.src = sc; setTimeout('document.getElementById("alexascriptdiv").appendChild(document.getElementById("alexascript"));',2000); //document.getElementById("alexascript").style.display=""; } var fullscreen_mod=false; function toggleFullScreen () { var elem=document.getElementById('fullscreenmod'); if(fullscreen_mod==false) { if (elem.webkitRequestFullScreen) { elem.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT); } else { elem.mozRequestFullScreen(); } fullscreen_mod=true; } else { if(document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } else { document.mozCancelFullScreen(); } fullscreen_mod=false; } } 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)+'px'; document.getElementById(cur_div_move+'div').style.top=(parseInt(document.getElementById(cur_div_move+'div').style.top)+y)+'px'; 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)+'px'; document.getElementById(cur_div_move+'iframe').style.top=(parseInt(document.getElementById(cur_div_move+'iframe').style.top)+y)+'px'; } } } 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+'px'; document.getElementById(d+'div').style.top=null; if(document.getElementById(d+'iframe')) { document.getElementById(d+'iframe').style.left=l+'px'; document.getElementById(d+'iframe').style.top=null; } } function showdiv(d) { l=(screen.width-1000)/2+300; if(!document.getElementById(d+'div').style.left) document.getElementById(d+'div').style.left=l+'px'; if(!document.getElementById(d+'div').style.top) document.getElementById(d+'div').style.top=((window.scrollY?window.scrollY:document.body.scrollTop)+50)+"px"; if(!document.getElementById(d+'iframe').style.left) document.getElementById(d+'iframe').style.left=l+'px'; if(!document.getElementById(d+'iframe').style.top) document.getElementById(d+'iframe').style.top=((window.scrollY?window.scrollY:document.body.scrollTop)+50)+"px"; 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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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 -1){ num = num.split('.'); num[0] = num[0].toString().split('').reverse().join('').replace(/(?=\d*\.?)(\d{3})/g,'$1,').split('').reverse().join('').replace(/^[\,]/,''); if(num[1].length > 5){ num[1] = num[1].substring(0,num[1].length-1); } input.value = num[0]+'.'+num[1]; } else{ input.value = num.toString().split('').reverse().join('').replace(/(?=\d*\.?)(\d{3})/g,'$1,').split('').reverse().join('').replace(/^[\,]/,'') }; } else{ input.value = input.value.substring(0,input.value.length-1); } } function formatnumber(num,n,p) { num = num.toString().replace(/\$|\,/g,''); if(isNaN(num)) num = "0"; sign = (num == (num = Math.abs(num))); num = Math.floor(num*100+0.50000000001); cents = num%100; num = Math.floor(num/100).toString(); if(cents<10) cents = "0" + cents; if(cents==0) { cents=""; p=""; } for (var i = 0; i < Math.floor((num.length-(1+i))/3); i++) num = num.substring(0,num.length-(4*i+3))+n+ num.substring(num.length-(4*i+3)); return (((sign)?'':'-') + num + p + cents); } function viewcart() { window.location='http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_code=0b7f31ba9d090bb81dac159b8ab3d207'; } function paymentStore(obj,store) { var p='0'; if(typeof(obj)!='undefined') { if(typeof(obj.length)=='undefined') { obj[0]=obj; obj.length=1; } for(i=0;i(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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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) { $.get('/?eda_type=ajax&eda_act=06a943c59f33a34bb5924aaf72cd2995&eda_module=checkquantity&eda_id='+id,function(data) { if(parseInt(data)<=0) { alert('Đã hết hàng, vui lòng chọn mua sản phẩm khác!'); return false; } else { if(quantity==null) { quantity=1; } if(price!=null) { if(price>0) { //eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=9ab3942254cbb94895efa22289e91c4e&eda_id='+id+'&eda_pid='+quantity,'centerid','html','GET',null,'Đang thêm...'); window.location='http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=9ab3942254cbb94895efa22289e91c4e&eda_id='+id+'&eda_pid='+quantity; } else { window.location='http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_code=a72cfa6c128b005476e4c478634f2adb&eda_id='+id; } } else { // eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=9ab3942254cbb94895efa22289e91c4e&eda_id='+id+'&eda_pid='+quantity,'centerid','html','GET',null,'Đang thêm...'); window.location='http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=9ab3942254cbb94895efa22289e91c4e&eda_id='+id+'&eda_pid='+quantity; } } }); } var cart_url=''; function updatecart() { post=getPost('frm_update'); if(document.getElementById("fullname")) { cart_url='&fullname='+document.getElementById("fullname").value+'&guest_email='+document.getElementById("guest_email").value+'&tel='+document.getElementById("tel").value+'&address='+document.getElementById("address").value; } eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_code=3ac340832f29c11538fbe2d6f75e8bcc','loadcart()','func','POST',post,'Đang cập nhật...'); } function payment_classic() { $('#paymentclassic').attr('disabled','disabled'); document.getElementById("loadid").style.visibility='visible'; document.getElementById("loadid").style.top=((window.scrollY?window.scrollY:document.body.scrollTop)+2)+'px'; document.getElementById("loadid").innerHTML = '
Đang gửi yêu cầu đặt hàng
'; $.post('/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_code=a519a63bf168ff16fe6138eaacb297b1',$('#frm_update').serialize(),function(data) { if(data=='') { window.location='/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=0b7f31ba9d090bb81dac159b8ab3d207&p=complete'; } else { document.getElementById("loadid").style.visibility='hidden'; $('#paymentclassic').removeAttr('disabled'); alert(data); } }); } function loadcart() { window.location='/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_code=0b7f31ba9d090bb81dac159b8ab3d207'+cart_url; } function addlistcart() { post=getPost('frm_buy_mobile'); eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=cb69f9840a6909e01e06a86aaa251cc5','loadcart()','func','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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_cid='+cid+'&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_module=95210a758913ba4c389d71eac9b70c7b&eda_id='+id); } function view_auction(id,cid) { window.location='http://bhmedvietnam.divivu.com/?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) { searchType=id; 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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?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://bhmedvietnam.divivu.com/?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://bhmedvietnam.divivu.com/?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://bhmedvietnam.divivu.com/?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://bhmedvietnam.divivu.com/?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://bhmedvietnam.divivu.com/?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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&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://bhmedvietnam.divivu.com/?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=06a943c59f33a34bb5924aaf72cd2995&eda_module=loadSearchCat&searchType='+searchType,'search_catid','listbox','GET',null,'no'); } function setKeyboard() { if(document.getElementById('uname')) { VKI_buildKeyboardInputs(); } else { setTimeout('setKeyboard()',2000); } } function setSkinAuction(t) { document.getElementById(auctab).style.backgroundColor='#eeeeee'; document.getElementById(auctab).style.color='#333333'; if(t!='auctab1') { document.getElementById(t).style.backgroundColor='#ff9000'; } else { document.getElementById(t).style.backgroundColor=''; } document.getElementById(t).style.color='#ffffff'; auctab=t; } function top_auction(t) { setSkinAuction(t); eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=90fd1098d8d2c5218b901995f790f9d0','aucid','html','GET',null,'Đang tải ...'); } function new_auction(t) { setSkinAuction(t); eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=3e1012900c73e71c60a245cab282db6f','aucid','html','GET',null,'Đang tải ...'); } function finish_auction(t) { setSkinAuction(t); eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=55f517868d59bdb20ff8831ed3f7970c','aucid','html','GET',null,'Đang tải ...'); } function finished_auction(t) { setSkinAuction(t); eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=d703400ff766566ef23fa47648d57467','aucid','html','GET',null,'Đang tải ...'); } function view_auction(id,cid) { window.location='http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_cid='+cid+'&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_module=95210a758913ba4c389d71eac9b70c7bo&eda_id='+id; } function basing_pointfreight(t) { document.getElementById(tygiatab).style.backgroundImage=''; document.getElementById(tygiatab).style.color='#005291'; document.getElementById(tygiatab).style.fontWeight=''; document.getElementById(t).style.backgroundImage='url(http://bhmedvietnam.divivu.com/skins/box/tygia/images/tab_selected.gif)'; document.getElementById(t).style.color='red'; document.getElementById(t).style.fontWeight='bold'; tygiatab=t; document.getElementById('tygiaid').style.display='none'; document.getElementById('basing_pointfreightid').style.display=''; } function ratio(t) { document.getElementById(tygiatab).style.backgroundImage=''; document.getElementById(tygiatab).style.color='#005291'; document.getElementById(tygiatab).style.fontWeight=''; document.getElementById(t).style.backgroundImage='url(http://bhmedvietnam.divivu.com/skins/box/tygia/images/tab_selected.gif)'; document.getElementById(t).style.color='red'; document.getElementById(t).style.fontWeight='bold'; tygiatab=t; document.getElementById('tygiaid').style.display=''; document.getElementById('basing_pointfreightid').style.display='none'; } function viewadv_detail(id,cid) { window.location='http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_cid='+cid+'&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_module=1f7c660e91969157619c08771170b92c&eda_id='+id; } function view_detail(id,cid) { window.location='http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_cid='+cid+'&eda_code=1b661b9cb6ace7fd72397cefb3afbe72&eda_module=46f5d8e11c9ea05be63863b84580e53d&eda_id='+id; } function auc_counter(v) { if(!document.getElementById('auc_count')) return false; if(v<=0) { document.getElementById('auc_count').innerHTML=' Đã hết giờ'; return true; } d=v; n=Math.floor(d/3600/24); str=(n>9?n:'0'+n) + ' Ngày '; d=d-n*24*3600; n=Math.floor(d/3600); str+=(n>9?n:'0'+n)+' Giờ '; d=d-n*3600; n=Math.floor(d/60); str+= (n>9?n:'0'+n)+' Phút '; n=d-n*60 str+= (n>9?n:'0'+n)+' Giây'; auc_count--; setTimeout("auc_counter("+auc_count+")",1000); document.getElementById('auc_count').innerHTML= ''+str+''; } function transport_cal() { param="&shipping_companyid="+document.getElementById("shipping_companyid").value; param+="&cityid1="+document.getElementById("cityid1").value; param+="&cityid2="+document.getElementById("cityid2").value; param+="&weightid="+document.getElementById("weightid").value; param+="&weightid2="+document.getElementById("weightid2").value; eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=164128ef488fc42ec0173b2e5863e98f'+param,'calid','html','GET',null,'in'); } function convert_cur() { if(isNaN(document.getElementById("valid1").value)) alert('Hãy nhập số tiền cần chuyển đổi'); else { param="&curid1="+document.getElementById("curid1").value; param+="&curid2="+document.getElementById("curid2").value param+="&valid1="+document.getElementById("valid1").value eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=27618a3645a064762c32c9ad423e4855'+param,'valid2','html','GET',null,'in'); } } function update_weight(v) { var w='0-50'; if(v<=50) w='0-50'; else if(v<=100) w='50-100'; else if(v<=250) w='100-250'; else if(v<=500) w='250-500'; else if(v<=1000) w='500-1000'; else if(v<=500) w='1000-1500'; else if(v<=2000) w='1500-2000'; else if(v>2000) w='>2000'; document.getElementById('weightid').value=w; } function load_box_home() { load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=7c83becdc2e07665d60470dace1ddd79','box_home','html','GET',null,'in'); } function load_child_home() { load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=e7d5019467ce8a1ea1f9dbbc9ab8ce01','child_home','html','GET',null,'in'); } function load_menu_foot() { load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=0a94aa7633b72a1b6fc772d51292c061','menu_foot','html','GET',null,'in'); } function setSkinGift(t) { document.getElementById(gifttab).style.backgroundColor='#eeeeee'; document.getElementById(gifttab).style.color='#333333'; if(t!='gifttab1') { document.getElementById(t).style.backgroundColor='#ff9000'; } else { document.getElementById(t).style.backgroundColor=''; } document.getElementById(t).style.color='#ffffff'; gifttab=t; } function change_gift(t,id) { setSkinGift(t); eda_request=load('http://bhmedvietnam.divivu.com/?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=31bd3d38b6d6e7b6eafb9da06a2132cc&eda_id='+id,'giftid','html','GET',null,'Đang tải ...'); } function play_top_store() { if(store_page==4) store_page=0; else store_page++; if(typeof(top_store[store_page])!='undefined') document.getElementById('top_store').innerHTML=top_store[store_page]; setTimeout("play_top_store()",6000); } function change_top_store(i) { if(typeof(top_store[i])!='undefined') { document.getElementById('top_store').innerHTML=top_store[i]; store_page=i; } } function play_newpro() { var p=0; if(newpro_page==4) p=0; else p=newpro_page+1; if(typeof(newpro[p])!='undefined') { document.getElementById('newpro_page_'+newpro_page).style.color="#333"; document.getElementById('newpro_page_'+newpro_page).style.border="0px"; if(newpro_page==4) { newpro_page=0; } else { newpro_page++; } document.getElementById('newpro_page_'+newpro_page).style.color="red"; document.getElementById('newpro_page_'+newpro_page).style.border="1px solid #ff6600"; document.getElementById('newproid').innerHTML=newpro[newpro_page]; } setTimeout("play_newpro()",6000); } function change_newpro(i) { if(typeof(newpro[i])!='undefined') { document.getElementById('newpro_page_'+newpro_page).style.color="#333"; document.getElementById('newpro_page_'+newpro_page).style.border="0px"; document.getElementById('newproid').innerHTML=newpro[i]; document.getElementById('newpro_page_'+i).style.color="red"; document.getElementById('newpro_page_'+i).style.border="1px solid #ff6600"; newpro_page=i; } } function playTimeout() { setTimeout("play_newpro()",3000); setTimeout("play_top_store()",3000); } function change_hotpro(i,probox_id) { document.getElementById('hotpro_page_'+hotpro_page).style.color="#333"; document.getElementById('hotpro_page_'+hotpro_page).style.border="0px"; load('?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=6d88300dfbeac49d5213f67a60497854&eda_id='+i+'&eda_cid='+probox_id,'hotpro_'+probox_id,'html','GET',null,'Đang tải ...'); document.getElementById('hotpro_page_'+i).style.color="red"; document.getElementById('hotpro_page_'+i).style.border="1px solid #ff6600"; hotpro_page=i; } function change_saleoffpro(i) { document.getElementById('saleoffpro_page_'+saleoffpro_page).style.color="#333"; document.getElementById('saleoffpro_page_'+saleoffpro_page).style.border="0px"; load('?eda_act=d41d8cd98f00b204e9800998ecf8427e&eda_type=ajax&eda_code=f07cbd162bae96bbcd287ae36541b4cd&eda_id='+i,'saleoffpro','html','GET',null,'Đang tải ...'); document.getElementById('saleoffpro_page_'+i).style.color="red"; document.getElementById('saleoffpro_page_'+i).style.border="1px solid #ff6600"; saleoffpro_page=i; } function hidenotice(id, sid) { load('?eda_act=ba3988db0a3167093b1f74e8ae4a8e83&eda_type=ajax&eda_code=c6d1b3ee5caf29687b45730b0b3ba10f&eda_id='+id+'&eda_module='+sid,'document.getElementById("notice_'+id+'").style.display=\'none\';','func','GET',null,'Đang thực hiện ...'); }//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=="newpro") newpro[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 if(containertype=="func") { eval(containerid); } else { document.getElementById(containerid).innerHTML=ajax_request.ajaxobj.responseText; } if(containerid!="categories" && containertype=="html") { //window.scrollTo(0,0); document.getElementById("loadid").style.top=((window.scrollY?window.scrollY:document.body.scrollTop)+2)+'px'; } 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://bhmedvietnam.divivu.com/?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=((window.scrollY?window.scrollY:document.body.scrollTop)+2)+'px'; 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