var mtt=new Array('toan-quoc','ha-noi','da-nang','tp-ho-chi-minh','an-giang','ba-ria-vung-tau','bac-giang','bac-kan','bac-lieu','bac-ninh','ben-tre','binh-dinh','binh-duong','binh-phuoc','binh-thuan','ca-mau','can-tho','cao-bang','dak-lak','dak-nong','dien-bien','dong-nai','dong-thap','gia-lai','ha-giang','ha-nam','ha-tinh','hai-duong','hai-phong','hau-giang','hoa-binh','hue','hung-yen','khanh-hoa','kien-giang','kon-tum','lai-chau','lam-dong','lang-son','lao-cai','long-an','nam-dinh','nghe-an','ninh-binh','ninh-thuan','phu-tho','phu-yen','quang-binh','quang-nam','quang-ngai','quang-ninh','quang-tri','soc-trang','son-la','tay-ninh','thai-binh','thai-nguyen','thanh-hoa','tien-giang','tra-vinh','tuyen-quang','vinh-long','vinh-phuc','yen-bai');var ttt=new Array('Toàn Quốc','Hà Nội','Đà Nẵng','TP HCM','An Giang','B.Rịa V.Tàu','Bắc Giang','Bắc Kạn','Bạc Liêu','Bắc Ninh','Bến Tre','Bình Định','Bình Dương','Bình Phước','Bình Thuận','Cà Mau','Cần Thơ','Cao Bằng','Đắk Lắk','Đắk Nông','Điện Biên','Đồng Nai','Đồng Tháp','Gia Lai','Hà Giang','Hà Nam','Hà Tĩnh','Hải Dương','Hải Phòng','Hậu Giang','Hoà Bình','Huế','Hưng Yên','Khánh Hoà','Kiên Giang','Kon Tum','Lai Châu','Lâm Đồng','Lạng Sơn','Lào Cai','Long An','Nam Định','Nghệ An','Ninh Bình','Ninh Thuận','Phú Thọ','Phú Yên','Quảng Bình','Quảng Nam','Quảng Ngãi','Quảng Ninh','Quảng Trị','Sóc Trăng','Sơn La','Tây Ninh','Thái Bình','T.Nguyên','Thanh Hoá','Tiền Giang','Trà Vinh','T.Quang','Vĩnh Long','Vĩnh Phúc','Yên Bái');var mtl=new Array(["tat-ca-danh-muc"],["may-tinh-linh-kien","laptop-notebook","desktop","server","linh-kien","may-in-muc-in"],["phan-mem-website","phan-mem-ung-dung","thiet-ke-website","hosting-domain"],["thiet-bi-vien-thong","bo-dam","camera","tong-dai","cap-dong-cap-quang","thiet-bi-khac"],["dien-thoai-sim-card","dien-thoai-di-dong","sim-so-dep","card-the-nho","phu-kien"],["bat-dong-san","dat","nha"],["kien-truc-xay-dung","noi-that","ngoai-that","vat-lieu-xay-dung"],["thu-cong-my-nghe","dieu-khac","tranh-anh","gom-su","vai-soi","san-pham-khac"],["dien-may-dien-tu","tu-lanh-dieu-hoa","may-giat-may-hut-bui","tivi-video","san-pham-khac"],["do-dung-vat-dung","van-phong","gia-dinh"],["giao-duc-dao-tao","tren-dai-hoc","dai-hoc","cao-dang-thcn","trung-hoc-pho-thong"],["lao-dong-viec-lam","tri-oc","pho-thong"],["tai-chinh-ke-toan"],["quang-cao-su-kien"],["y-te-skhoe-the-thao","thiet-bi-y-te","thuoc","diem-kham-benh","do-dung-the-thao"],["thoi-trang-lam-dep","quan-ao","giay-dep","my-pham","trang-suc","san-pham-khac"],["xe","o-to-tai","xe-may","xe-co-hiem","xe-dap-dien","phu-tung"],["du-lich-giai-tri","tour-trong-nuoc","tour-quoc-te","nha-hang-khach-san","diem-vui-choi-giai-tri"],["cong-dong"],["dich-vu-tong-hop"]);var ttl=new Array(["Tất cả danh mục"],["Máy tính, linh kiện","Laptop, Notebook","Desktop","Server","Linh kiện","Máy in, mực in"],["Phần mềm, website","Phần mềm ứng dụng","Thiết kế website","Hosting, domain"],["Thiết bị viễn thông","Bộ đàm","Camera","Tổng đài","Cáp đồng, cáp quang","Thiết bị khác"],["Điện thoại, sim, card","Điện thoại di động","Sim số đẹp","Card, thẻ nhớ","Phụ kiện"],["Bất động sản","Đất","Nhà"],["Kiến trúc, xây dựng","Nội thất","Ngoại thất","Vật liệu xây dựng"],["Thủ công mỹ nghệ","Điêu khắc","Tranh ảnh","Gốm sứ","Vải, sợi","Sản phẩm khác"],["Điện máy, điện tử","Tủ lạnh, điều hòa","Máy giặt, máy hút bụi","Tivi, video","Sản phẩm khác"],["Đồ dùng, vật dụng","Văn phòng","Gia đình"],["Giáo dục, đào tạo","Trên đại học","Đại học","Cao đẳng, THCN","Trung học phổ thông"],["Lao động, việc làm","Trí óc","Phổ thông"],["Tài chính, kế toán"],["Quảng cáo, sự kiện"],["Y tế, s.khỏe, thể thao","Thiết bị y tế","Thuốc","Điểm khám bệnh","Đồ dùng thể thao"],["Thời trang, làm đẹp","Quần áo","Giày dép","Mỹ phẩm","Trang sức","Sản phẩm khác"],["Xe","Ô tô, tải","Xe máy","Xe cổ, hiếm","Xe đạp điện","Phụ tùng"],["Du lịch, giải trí","Tour trong nước","Tour quốc tế","Nhà hàng, khách sạn","Điểm vui chơi, giải trí"],["Cộng đồng"],["Dịch vụ tổng hợp"]);var myTimer;var myt=null;function SearchOnBlur(field){if(field.value==''){field.value='Nhập nội dung cần tìm kiếm...';}}function SearchOnFocus(field){if(field.value=='Nhập nội dung cần tìm kiếm...'){field.value = '';}}function indv(prdiv,l,da,it,vp,e){if (it==0){if (!e) var e = window.event;var fromEl=e.relatedTarget||e.fromElement;if (fromEl.className=="dong") return;}var c=prdiv.getElementsByTagName("div")[0];if (c.style.display!= "block"){if ((c.innerHTML=="")&(it==0)){var stp='
';c.innerHTML=stp.replace(mati, mati + ' class="mainat"');}prdiv.style.zIndex="5";var t=function(){if (prdiv.style.zIndex=="0") return;c.style.top=prdiv.offsetHeight-1+"px";if (it!=0){if (c.innerHTML ==''){var astt=vp.split(";");if (astt.length==1) c.innerHTML=idmn[it].replace(/vpath/g, vp);else{var snt=mtl[astt[0]-1][0];var stl='';if (astt[1]!=0) stl='/' + mtl[astt[0]-1][astt[1]];c.innerHTML=idmn[it].replace(/vpath/g, '/' + mtt[document.getElementById("stttinh").value-1] + '/' + snt +stl);}}if (prdiv.offsetWidth<80) c.style.width="100px";else c.style.width=prdiv.offsetWidth -2 + "px";}c.style.left=l +"px";prdiv.getElementsByTagName("a")[0].className="subat";if (da!="") prdiv.className=da;c.style.display="block";};myTimer= setTimeout(t , 200);}}function clickdv(prdiv,l,z,b,st,e){if ((myt!=null)&&(myt!=prdiv)){myt.getElementsByTagName("div")[0].style.display="none";myt.style.zIndex="0";myt.getElementsByTagName("a")[0].className="nor";}if (!e) var e = window.event;var toEl=e.srcElement;if (!toEl){toEl=e.target;while(toEl.nodeType != toEl.ELEMENT_NODE) toEl = toEl.parentNode;}if (toEl.className=="dong"){prdiv.getElementsByTagName("div")[0].style.display="none";prdiv.style.zIndex="0";prdiv.getElementsByTagName("a")[0].className="nor";myt=null;document.onclick=null;return;}if (toEl.nodeName!=b) return;var c=prdiv.getElementsByTagName("div")[0];if (c.style.display!= "block"){if (st!=""){st='"'+ st + '"';var stp='';var bd=0;for (var q = 0; q < mtt.length; q++){stp=stp + '- ' + ttt[q] + '
';bd+=1;if (bd==11) {stp=stp + '
';c.innerHTML=stp.replace(st, st + ' class="mainat"')}else{var dstt=document.getElementById("tinhthanhnc");if (dstt.options.length < 4){dstt.options.length=0;var q;for (q = 0;q < mtt.length;q++){dstt.options[q] = new Option(ttt[q], (q+1) + ';' + mtt[q]);}}dstt.selectedIndex=document.getElementById("stttinh").value-1;if (document.getElementById("hdlti").value==""){var dsdm=document.getElementById("danhmucchinh");dsdm.options.length=0;var vld;var n="";var v="";var value="";for (q = 0;q < mtl.length;q++){value=ttl[q][0] + std[q][0];n= n + value + ";";v= v + mtl[q][0] + ";";dsdm.options[q] = new Option(value, mtl[q][0]);}document.getElementById("hdmuccin").value=n;document.getElementById("hdmucciv").value=v;}else{setnv(document.getElementById("hdmuccin").value, document.getElementById("hdmucciv").value, document.getElementById("hdmuccii").value, "danhmucchinh");setnv(document.getElementById("hdmucconn").value, document.getElementById("hdmucconv").value, document.getElementById("hdmucconi").value, "dmcon");setnv(document.getElementById("hdltn").value, document.getElementById("hdltv").value,document.getElementById("hdlti").value, "ltin");}}prdiv.style.zIndex=z;c.style.top=prdiv.offsetHeight-1+"px";c.style.left=l +"px";c.style.display="block";prdiv.getElementsByTagName("a")[0].className="activeok";myt=prdiv;document.onclick = function (e){if (!e) var e = window.event;var toEl=e.srcElement;if (!toEl){toEl=e.target;while(toEl.nodeType != toEl.ELEMENT_NODE) toEl = toEl.parentNode;}if (! contains(prdiv, toEl)){prdiv.getElementsByTagName("div")[0].style.display="none";prdiv.style.zIndex="0";prdiv.getElementsByTagName("a")[0].className="nor";myt=null;document.onclick=null;}return true;}}}function outdv(prdiv,dn,it,e){if (!e) var e = window.event;var toEl=e.relatedTarget||e.toElement;if (! contains(prdiv, toEl)){prdiv.style.zIndex="0";if (prdiv.getElementsByTagName("div")[0].style.display=="block"){prdiv.getElementsByTagName("div")[0].style.display="none";prdiv.getElementsByTagName("a")[0].className="sub";if (dn!="") prdiv.className=dn;clearTimeout(myTimer)}}}function contains(a, b){while(b && (a!=b) && (b!=null))b = b.parentNode;return a == b;}function setdmc(ca){var danhmuccon=document.getElementById("dmcon");var loaitin=document.getElementById("ltin");var objtt=document.getElementById("tinhthanhnc");var objmc=document.getElementById("danhmucchinh");var idtt=objtt[objtt.selectedIndex].value;var categoryID=objmc[objmc.selectedIndex].value;if (categoryID=="" ||idtt=="") return;var arr=idtt.split(";");idtt=arr[1];var stt=arr[0];var HttpRequest = false;if (window.XMLHttpRequest) {HttpRequest = new XMLHttpRequest();} else{HttpRequest = new ActiveXObject("Microsoft.XMLHTTP");} if (!HttpRequest) return;danhmuccon.options.length=0;loaitin.options.length=0;document.form1.hdmucconn.value="";document.form1.hdmucconv.value="";document.form1.hdmucconi.value="";document.form1.hdltn.value="";document.form1.hdltv.value="";document.form1.hdlti.value="";var url;if(ca==0){objmc.options.length=0;document.form1.hdmuccin.value="";document.form1.hdmucciv.value="";document.form1.hdmuccii.value="";document.form1.stttinh.value=stt;url = "/" + idtt + "/get-muc-con.aspx"}else {document.form1.hdmuccii.value=categoryID;url= "/" + idtt + "/" + categoryID + "/get-muc-con.aspx"} HttpRequest.open("GET",url);HttpRequest.onreadystatechange = function() {if (HttpRequest.readyState == 4 && HttpRequest.status == 200){var a = HttpRequest.responseXML.documentElement.getElementsByTagName("item");getnv(a, "name", "value", "hdmucconn", "hdmucconv", "hdmucconi", danhmuccon);a = HttpRequest.responseXML.documentElement.getElementsByTagName("tl");getnv(a, "tln", "tlv", "hdltn", "hdltv", "hdlti", loaitin);if (ca==0){a = HttpRequest.responseXML.documentElement.getElementsByTagName("tt");getnv(a, "ttn", "ttv", "hdmuccin", "hdmucciv", "hdmuccii", objmc);}}};HttpRequest.send(null);}function setnv(sn, sv, si, idsl){if (sn=="" || sv=="") return;var arrn=sn.split(";");var arrv=sv.split(";");var j;if (arrn.length==arrv.length) {var dm=document.getElementById(idsl);dm.options.length = 0;for (var i = 0;i < arrn.length-1;i++) {if (arrv[i]==si) j=i;dm.options[i] = new Option(arrn[i], arrv[i]);} dm.selectedIndex=j;}}function getnv(a,itn,itv,hdn,hdv,hdi,ido){var value;var name;var aa;var n="";var v="";var ac="";for (var i = 0;i < a.length;i++) {aa=a[i].getElementsByTagName(itn);name = aa[0].firstChild.nodeValue;n= n + name + ";";aa=a[i].getElementsByTagName(itv);value = aa[0].firstChild.nodeValue;if (i==0) ac=value;v= v + value + ";";ido.options[i] = new Option(name, value);}document.getElementById(hdn).value=n;document.getElementById(hdv).value=v;document.getElementById(hdi).value=ac;}function j(valueID){var svp=document.getElementById("vp").value;if (svp=="/default.aspx"){if (valueID=="toan-quoc") document.location.href= svp;else document.location.href= "/" + valueID + svp;}else document.location.href= "/" + valueID + svp + ".aspx"}function zu(){var objtt=document.getElementById("tinhthanhnc");var idtt=objtt[objtt.selectedIndex].value;var objmc=document.getElementById("danhmucchinh");var idmc=objmc[objmc.selectedIndex].value;var objmcon=document.getElementById("dmcon");var idmcon=objmcon[objmcon.selectedIndex].value;var objltin=document.getElementById("ltin");var idltin=objltin[objltin.selectedIndex].value;var url="";idtt=idtt.split(";")[1];if (idmc=="tat-ca-danh-muc"){if (idtt=="toan-quoc") url="http://www.raovat30s.com/";else url="/" + idtt + "/default.aspx"}else {if (idmcon==idmc) url="/" + idtt + "/" + idmc;else url="/" + idtt + "/" + idmc + "/" + idmcon;if (idltin=="tat-ca") url= url + ".aspx";else url=url + "-" + idltin + "-30s.aspx"}document.location.href= url}function sethd(valueID,eid){document.getElementById(eid).value=valueID}document.onkeypress = pressenter;function pressenter(e) {if (!e) var e = window.event;var keyCode = e.keyCode ? e.keyCode : e.which ? e.which : e.charCode;var node = (e.target) ? e.target : ((e.srcElement) ? e.srcElement : null);if (keyCode == 13) {if ((node==null) || (typeof (node.type) == 'undefined')) {return false;} else {return true;}}}function ghi(show){var i, j;var s='';if (mat=="toan-quoc") s=s + '- Tất cả danh mục' + std[0][0] + '
';else s=s+ '- Tất cả danh mục'+ std[0][0] + '
';var ob=document.getElementById("showdm");if (show==1){for (i = 1;i < mtl.length;i++){s=s+ '- ' + ttl[i][0] + '' + std[i][0];if (mtl[i].length==1) s=s+ '
';else{s=s + '';for (j = 1;j < mtl[i].length;j++){s=s +'- ' + ttl[i][j] + '' + std[i][j] + '
';}s=s + '
';}}ob.className="hide";ob.href="javascript:ghi(0)";ob.title="Thu gọn danh mục";}else{ob.className="show";ob.href="javascript:ghi(1)";ob.title="Hiển thị chi tiết danh mục";}s= s+ "
";var tmatib=matib.replace('/.aspx', '.aspx');document.getElementById("right").innerHTML=s.replace(tmatib, tmatib + ' class="active"');}