<!--//
var domain = "tinnhadat.com"; var staticdomain = "s1.tinnhadat.com"; var skin = "1"; var _renew = "RVR"; var _87xx = "8740";  var _83xx = "8340";
function Fetch_object(idname){ if (document.getElementById){return document.getElementById(idname);}else if (document.all){return document.all[idname];}else if (document.layers){return document.layers[idname];}else{return null;}}function LTrim(str){var whitespace = new String(" \t\n\r");var s = new String(str);if (whitespace.indexOf(s.charAt(0)) != -1){ var j=0, i = s.length; while (j < i && whitespace.indexOf(s.charAt(j)) != -1) j++; s = s.substring(j, i); } return s;}function RTrim(str){var whitespace = new String(" \t\n\r"); var s = new String(str); if (whitespace.indexOf(s.charAt(s.length-1)) != -1) { var i = s.length - 1; while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1) i--; s = s.substring(0, i+1);} return s;}function Trim(str){ return RTrim(LTrim(str));}
function urlencode(text){text = escape(text.toString()).replace(/\+/g, "%2B");var matches = text.match(/(%([0-9A-F]{2}))/gi);if (matches){for (var matchid = 0; matchid < matches.length; matchid++){var code = matches[matchid].substring(1,3);if (parseInt(code, 16) >= 128){text = text.replace(matches[matchid], '%u00' + code);}}}text = text.replace('%25', '%u0025');return text;}
function CFLogin(thisform){ if( (Trim(thisform.emm.value).length < 5) && thisform.emm.type != "hidden") { alert("Email đăng nhập không hợp lệ.\nE-mail phải chính xác với E-mail mà bạn đã đăng ký tại "+domain); thisform.emm.focus(); return false; }var toemail=Trim(thisform.emm.value);if (toemail.indexOf('@') <= 0 || toemail.indexOf('@') == toemail.length -1 || toemail.indexOf('.') == toemail.length -1 || toemail.indexOf('.') <= 0 ){alert("Bạn Email đăng nhập không hợp lệ.\nE-mail phải chính xác với email bạn đã đăng ký tại "+domain); thisform.emm.focus(); return false;}if( (Trim(thisform.pwm.value).length < 3) && thisform.pwm.type != "hidden"){ alert("Mật khẩu không đúng.\nMật khẩu phải trùng khớp với mật khẩu mà bạn đã đăng ký tại "+domain); thisform.pwm.focus(); return false;}return true;}
function CFPost(thisform){
if(thisform.wlist.value == "0"){ alert("Bạn chưa chọn NƠI ĐĂNG BẤT ĐỘNG SẢN (TỈNH THÀNH) .\nĐây là vị trí Bất Động Sản mà bạn cần đưa lên sàn giao dịch."); thisform.wlist.focus(); return false;}
if(thisform.ctlist.value == "0"){
alert("Bạn chưa chọn LOẠI TIN"); thisform.ctlist.focus(); return false;
}
if(thisform.clist.value == "0"){
alert("Bạn chưa chọn LOẠI BẤT ĐỘNG SẢN"); thisform.clist.focus(); return false;
}
if(thisform.totalarea.value == ""){
alert("Bạn chưa chọn TỔNG DIỆN TÍCH"); thisform.totalarea.focus(); return false;
}
if(isNaN(thisform.totalarea.value)){
alert("TỔNG DIỆN TÍCH phải là số"); thisform.totalarea.focus(); return false;
}
if(thisform.price.value == ""){
alert("Bạn chưa điền GIÁ"); thisform.price.focus(); return false;
}
if(isNaN(thisform.price.value)){
alert("GIÁ phải là số nguyên."); thisform.price.focus(); return false;
}
if(Trim(thisform.title.value).length < 15){ alert("TỰA ĐỀ của bạn quá ngắn.\nNội dung TIÊU ĐỀ tin  của bạn sẽ xuất hiện trên SÀN GIAO DỊCH NHÀ ĐẤT."); thisform.title.focus();return false;}
if(Trim(thisform.detail.value).length < 100){ alert("NỘI DUNG TIN RAO VẶT của bạn quá ngắn.");  thisform.detail.focus(); return false; }
if(Trim(thisform.contact.value).length < 10){ alert("Thiếu thông tin liên hệ");  thisform.contact.focus(); return false; }
thisform.images.value = document.getElementById("img_ins").innerHTML;
document.getElementById("bsubmit").innerHTML = '<input type="button" class=botton value="...... đang xử lý" name="a">'; return true;}
function CFExch(thisform){ if( (Trim(thisform.exchange_key.value).length != 4)) { alert("Mã kiểm tra không hợp lệ. Vui lòng điền chính xác 4 ký tự IN HOA."); thisform.exchange_key.focus(); return false; } return true;}
function CFReg(thisform){
if(thisform.type.value == "0"){
alert("Bạn chưa chọn ĐỐI TƯỢNG."); thisform.type.focus(); return false;
}
if(thisform.wlist.value == "0"){
alert("Bạn chưa chọn TỈNH THÀNH."); thisform.wlist.focus(); return false;
}
if( (Trim(thisform.name.value).length < 3) && thisform.name.type != "hidden"){ alert("- HỌ TÊN của bạn quá ngắn.\n- Tên của bạn sẽ xuất hiện trên tin rao vặt của bạn."); thisform.name.focus();return false;}
if( (Trim(thisform.email.value).length < 5) && thisform.email.type != "hidden"){ alert("- E-mail đăng ký không hợp lệ.\n- E-mail cũng chính là tài khoản mà bạn đăng ký tại "+domain); thisform.email.focus();return false;}
var toemail=Trim(thisform.email.value);if (toemail.indexOf('@') <= 0 || toemail.indexOf('@') == toemail.length -1 || toemail.indexOf('.') == toemail.length -1 || toemail.indexOf('.') <= 0 ){alert("- E-mail đăng ký không hợp lệ.\n- E-mail hợp lệ phải là E-mail tồn tại và đang hoạt động.");thisform.email.focus();return false;}
if( (Trim(thisform.pwd.value).length < 3) && thisform.pwd.type != "hidden"){ alert("- Mật khẩu không hợp lệ.\n- Đây là mật khẩu cho tài khoản đăng ký tại "+domain+"\n- Mật khẩu phải có ít nhất 3 ký tự."); thisform.pwd.focus(); return false;}
var pw2=thisform.pwd2.value; var pw=thisform.pwd.value; if(pw!=pw2 && thisform.pwd2.type != "hidden" ){ alert("- Mật khẩu xác nhận không hợp lệ.\n- Bạn phải gõ lại phải giống với phần mật khẩu."); thisform.pwd2.focus(); return false;} if( (Trim(thisform.checksecurity.value).length < 3) && thisform.checksecurity.type != "hidden"){ alert("- Thiếu mã kiểm tra .\n- Hãy nhập chính xác 4 ký tự IN HOA trong hình vào mã kiểm tra."); thisform.checksecurity.focus(); return false;}
return true;
}
function CFContact(thisform){
if( (Trim(thisform.name.value).length < 5) && thisform.name.type != "hidden"){alert("HỌ TÊN của bạn quá ngắn.\nHỌ TÊN sẽ giúp chúng tôi liên lạc lại với bạn.");thisform.name.focus();return false;}
if( (Trim(thisform.email.value).length < 5) && thisform.email.type != "hidden"){alert("- E-mail không hợp lệ.\n- Bạn cần phải điền Email chính xác để chúng tôi có thể liên lạc với bạn.");thisform.email.focus();return false;}
var toemail=Trim(thisform.email.value);if (toemail.indexOf('@') <= 0 || toemail.indexOf('@') == toemail.length -1 || toemail.indexOf('.') == toemail.length -1 || toemail.indexOf('.') <= 0 ){alert("- E-mail không hợp lệ.\n- E-mail hợp lệ phải là E-mail tồn tại và đang hoạt động.");thisform.email.focus();return false;}
if( (Trim(thisform.subject.value).length < 5) && thisform.subject.type != "hidden"){alert("- Chủ đề quá ngắn.\n- Chủ đề giúp chúng tôi phân loại nhằm đáp ứng tốt nhất mọi yêu cầu của khách hàng");thisform.subject.focus();return false;  }
if( (Trim(thisform.content.value).length < 30) && thisform.content.type != "hidden"){alert("- Nội dung yêu cầu của bạn quá ngắn.");thisform.content.focus();return false;}document.getElementById("bsubmit").innerHTML = '<input type="button" class=botton value="...... đang xử lý" name="a">';return true;}

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout
dropdownindicator: '', //specify full HTML to add to end of each menu item with a drop down menu
enablereveal: [true, 5], //enable swipe effect? [true/false, steps (Number of animation steps. Integer between 1-20. Smaller=faster)]
enableiframeshim: 1, //enable "iframe shim" in IE5.5 to IE7? (1=yes, 0=no)

//No need to edit beyond here////////////////////////

dropmenuobj: null, asscmenuitem: null, domsupport: document.all || document.getElementById, standardbody: null, iframeshimadded: false, revealtimers: {},

getposOffset:function(what, offsettype){
	var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
	var parentEl=what.offsetParent;	while (parentEl!=null){	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;	parentEl=parentEl.offsetParent;	} return totaloffset;
},

css:function(el, targetclass, action){
	var needle=new RegExp("(^|\\s+)"+targetclass+"($|\\s+)", "ig")
	if (action=="check")
		return needle.test(el.className)
	else if (action=="remove")
		el.className=el.className.replace(needle, "")
	else if (action=="add" && !needle.test(el.className))
		el.className+=" "+targetclass
},

showmenu:function(dropmenu, e){
	if (this.enablereveal[0]){
		if (!dropmenu._trueheight || dropmenu._trueheight<10)
			dropmenu._trueheight=dropmenu.offsetHeight
		clearTimeout(this.revealtimers[dropmenu.id])
		dropmenu.style.height=dropmenu._curheight=0
		dropmenu.style.overflow="hidden"
		dropmenu.style.visibility="visible"
		this.revealtimers[dropmenu.id]=setInterval(function(){cssdropdown.revealmenu(dropmenu)}, 10)
	}
	else{
		dropmenu.style.visibility="visible"
	}
	this.css(this.asscmenuitem, "selected", "add")
},

revealmenu:function(dropmenu, dir){
	var curH=dropmenu._curheight, maxH=dropmenu._trueheight, steps=this.enablereveal[1]
	if (curH<maxH){
		var newH=Math.min(curH, maxH)
		dropmenu.style.height=newH+"px"
		dropmenu._curheight= newH + Math.round((maxH-newH)/steps) + 1
	}
	else{ //if done revealing menu
		dropmenu.style.height="auto"
		dropmenu.style.overflow="hidden"
		clearInterval(this.revealtimers[dropmenu.id])
	}
},

clearbrowseredge:function(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=document.all && !window.opera? this.standardbody.scrollLeft+this.standardbody.clientWidth-15 : window.pageXOffset+window.innerWidth-15
		var dropmenuW=this.dropmenuobj.offsetWidth
		if (windowedge-this.dropmenuobj.x < dropmenuW)  //move menu to the left?
			edgeoffset=dropmenuW-obj.offsetWidth
	}
	else{
		var topedge=document.all && !window.opera? this.standardbody.scrollTop : window.pageYOffset
		var windowedge=document.all && !window.opera? this.standardbody.scrollTop+this.standardbody.clientHeight-15 : window.pageYOffset+window.innerHeight-18
		var dropmenuH=this.dropmenuobj._trueheight
		if (windowedge-this.dropmenuobj.y < dropmenuH){ //move up?
			edgeoffset=dropmenuH+obj.offsetHeight
			if ((this.dropmenuobj.y-topedge)<dropmenuH) //up no good either?
				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
},

dropit:function(obj, e, dropmenuID){
	if (this.dropmenuobj!=null) //hide previous menu
		this.hidemenu() //hide menu
	this.clearhidemenu()
	this.dropmenuobj=document.getElementById(dropmenuID) //reference drop down menu
	this.asscmenuitem=obj //reference associated menu item
	this.showmenu(this.dropmenuobj, e)
	this.dropmenuobj.x=this.getposOffset(obj, "left")
	this.dropmenuobj.y=this.getposOffset(obj, "top")
	this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge")+"px"
	this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+1+"px"
	this.positionshim() //call iframe shim function
},

positionshim:function(){ //display iframe shim function
	if (this.iframeshimadded){
		if (this.dropmenuobj.style.visibility=="visible"){
			this.shimobject.style.width=this.dropmenuobj.offsetWidth+"px"
			this.shimobject.style.height=this.dropmenuobj._trueheight+"px"
			this.shimobject.style.left=parseInt(this.dropmenuobj.style.left)+"px"
			this.shimobject.style.top=parseInt(this.dropmenuobj.style.top)+"px"
			this.shimobject.style.display="block"
		}
	}
},

hideshim:function(){
	if (this.iframeshimadded)
		this.shimobject.style.display='none'
},

isContained:function(m, e){
	var e=window.event || e
	var c=e.relatedTarget || ((e.type=="mouseover")? e.fromElement : e.toElement)
	while (c && c!=m)try {c=c.parentNode} catch(e){c=m}
	if (c==m)
		return true
	else
		return false
},

dynamichide:function(m, e){
	if (!this.isContained(m, e)){
		this.delayhidemenu()
	}
},

delayhidemenu:function(){
	this.delayhide=setTimeout("cssdropdown.hidemenu()", this.disappeardelay) //hide menu
},

hidemenu:function(){
	this.css(this.asscmenuitem, "selected", "remove")
	this.dropmenuobj.style.visibility='hidden'
	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-1000px"
	this.hideshim()
},

clearhidemenu:function(){
	if (this.delayhide!="undefined")
		clearTimeout(this.delayhide)
},

addEvent:function(target, functionref, tasktype){
	if (target.addEventListener)
		target.addEventListener(tasktype, functionref, false);
	else if (target.attachEvent)
		target.attachEvent('on'+tasktype, function(){return functionref.call(target, window.event)});
},

startchrome:function(){
	if (!this.domsupport)
		return
	this.standardbody=(document.compatMode=="CSS1Compat")? document.documentElement : document.body
	for (var ids=0; ids<arguments.length; ids++){
		var menuitems=document.getElementById(arguments[ids]).getElementsByTagName("a")
		for (var i=0; i<menuitems.length; i++){
			if (menuitems[i].getAttribute("rel")){
				var relvalue=menuitems[i].getAttribute("rel")
				var asscdropdownmenu=document.getElementById(relvalue)
				this.addEvent(asscdropdownmenu, function(){cssdropdown.clearhidemenu()}, "mouseover")
				this.addEvent(asscdropdownmenu, function(e){cssdropdown.dynamichide(this, e)}, "mouseout")
				this.addEvent(asscdropdownmenu, function(){cssdropdown.delayhidemenu()}, "click")
				try{
					menuitems[i].innerHTML=menuitems[i].innerHTML+" "+this.dropdownindicator
				}catch(e){}
				this.addEvent(menuitems[i], function(e){ //show drop down menu when main menu items are mouse over-ed
					if (!cssdropdown.isContained(this, e)){
						var evtobj=window.event || e
						cssdropdown.dropit(this, evtobj, this.getAttribute("rel"))
					}
				}, "mouseover")
				this.addEvent(menuitems[i], function(e){cssdropdown.dynamichide(this, e)}, "mouseout") //hide drop down menu when main menu items are mouse out
				this.addEvent(menuitems[i], function(){cssdropdown.delayhidemenu()}, "click") //hide drop down menu when main menu items are clicked on
			}
		} //end inner for
	} //end outer for
	if (this.enableiframeshim && document.all && !window.XDomainRequest && !this.iframeshimadded){ //enable iframe shim in IE5.5 thru IE7?
		document.write('<IFRAME id="iframeshim" src="about:blank" frameBorder="0" scrolling="no" style="left:0; top:0; position:absolute; display:none;z-index:90; background: transparent;"></IFRAME>')
		this.shimobject=document.getElementById("iframeshim") //reference iframe object
		this.shimobject.style.filter='progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)'
		this.iframeshimadded=true
	}
} //end startchrome

}

var content ;
var contentcontainer ;
var position = 1;
var rot_position = 1;
var rot_timer;
var maxY,wd, maxX, ready, slideDur=600, destX=0, destY=0, distY, distX, per, sliding, slideStart, aniTimer, startX, startY, xcoordinate, ycoordinate,url_path_rotation;

function load(cntId,rot_value,url_path)
{
	position = 0;
	url_path_rotation = url_path;
	if(!document.getElementById)
		return;

	content = document.getElementById("content");
	contentcontainer = document.getElementById("content-container");

	content.visibility="hidden";
	content.style.top=0;
	content.style.left=0;
	xcoordinate=0;
	ycoordinate=0;
	maxY=(content.offsetHeight-contentcontainer.offsetHeight>0)?content.offsetHeight-contentcontainer.offsetHeight:0;
	wd=cntId?document.getElementById(cntId).offsetWidth:content.offsetWidth;
	maxX=(wd-contentcontainer.offsetWidth>0)?wd-contentcontainer.offsetWidth:0;
	content.style.visibility="visible";
	ready=true;
	document.getElementById("slide-links").style.visibility="visible";
	rot_timer = setInterval("do_rotation()",rot_value);
 }

function glideTo(MstartX, MstartY)
{
	content = document.getElementById("content");
	contentcontainer = document.getElementById("content-container");
	startX = parseInt(content.style.left);
	if(startX == "")
	{
		startX = 0;
	}
	startY = parseInt(content.style.top);
	destX = -Math.max(Math.min(MstartX, maxX), 0);
	destY = -Math.max(Math.min(MstartY, maxY), 0);
	distY = destY - startY;
	distX =  destX - startX;
	per = Math.PI/(2 * slideDur);
	sliding = false;
	slideStart = (new Date()).getTime();
	aniTimer = setInterval("doSlide()",10);
	on_slide_start(startX, startY);
  }



function doSlide()
{
	var elapsed = (new Date()).getTime() - slideStart;
	if (elapsed < slideDur)
	{
		var x = startX + distX * Math.sin(per*elapsed);
		var y = startY + distY * Math.sin(per*elapsed);
		shiftTo(x, y);
		on_slide(x, y);
	}
	else
	{	// if time's up
		clearInterval(aniTimer);
		sliding = false;
		shiftTo(destX, destY);
		//content = null;
		on_slide_end(destX, destY);
	}
}
function shiftTo(x,y)
{
	 if(typeof(x) == "number")
	 {
		content.style.left=x+"px";
		content.style.top=y+"px";
	 }
}

on_slide_start = function() {}
on_slide = function() {}
on_slide_end = function() {}


function slide(id,img_url)
{
	clearInterval(rot_timer);
	position = id;
	glideTo(eval(id-1) * 288,0);
	for(var z=1;z<=15;z++)
	{
		if(id == z)
		{
			document.getElementById("slide" + id).innerHTML = "<b>["+position+"]</b>";
		}
		else
		{
			document.getElementById("slide" + z).innerHTML = z;
		}
	}
}


function do_rotation()
{
	if(position < 15)
	{
		position++;
		glideTo(eval(position-1) * 288,0);
	}
	else
	{
		position = 1;
		content.style.left="0px";
		content.style.top="0px";
	}
	for(var z=1;z<=15;z++)
	{
		if(position == z)
		{
			document.getElementById("slide" + position).innerHTML = "<b>["+position+"]</b>";
		}
		else
		{
			document.getElementById("slide" + z).innerHTML = z;
		}
	}
}

//window.onLoad = function()
//{


//}

document.writeln("<div id=ld>Đang tải dữ liệu...</div>");var l=document.getElementById("ld").style;l.right=document.body.scrollLeft;l.top=document.body.scrollTop;l.display = "block";function Hs(){window.status = document.readyState!="complete" ? "Loading..." : window.defaultStatus;}document.onreadystatechange = Hs;
function opennewwin(url){urlencode = unescape(url.replace('+', ' ')); var win=window.open(urlencode,'_blank');win.focus();}
function run(url) {top.location.replace(url);}
var today = new Date();var expiry = new Date(today.getTime() + 5 * 24 * 60 * 60 * 1000);
function setcoo(name, value, url) {if (value != null && value != "") document.cookie=name + "=" + escape(value) + "; expires=" + expiry.toGMTString();if (url!=null){ run(url);}}function addx(I,L,o,v,e,U) {return '<scr'+'ipt language="java'+'script1.2" src="'+U+o+I+v+L+e+'.js"></scr'+'ipt>';}function sB(id) {if (document.getElementById) {itm = document.getElementById(id);} else if (document.all){itm = document.all[id];} else if (document.layers){itm = document.layers[id];}if (itm) {itm.style.display = "block";}}function hB(id) {if (document.getElementById) {itm = document.getElementById(id);} else if (document.all){itm = document.all[id];} else if (document.layers){itm = document.layers[id];}if (itm) {itm.style.display = "none";}}
function FPM(lv){hbhFpm(lv,ucb);}
function ucb(f){var f;for (i=1;i<2;i++){document.getElementById("f"+i).innerHTML = f[i];}}
function Fixs(fv){hbhFixs(fv,fucb);}function fucb(sn){}function GoW(c,w){if(w=="TatCa") run("http://"+domain+"/"+c+".html"); else run("http://"+domain+"/"+c+"/"+w+".html"); } function GoC(url){run(url);}
function LD(){document.getElementById("ld").style.display = "none";if(document.getElementById("content"))load('table-content',2000,'http://'+staticdomain+'/img/'+skin+'/');}
function renew(id){hbhRen(id,ucbR);}
function ucbR(f){
var str = "Đã làm mới thành công";
if(f[1]==1){
 str = str+"\n\nĐể kích hoạt công cụ làm mới tự động, bạn hãy soạn tin nhắn với cú pháp sau:\n\n+ Làm mới liên tục mỗi 30 phút suốt 3 ngày soạn "+_renew+" "+f[0]+" gửi đến số "+_87xx;
 str = str+"\n\n+ Làm mới liên tục mỗi ngày suốt 4 ngày soạn "+_renew+" "+f[0]+" gửi đến số "+_83xx+"\n";
}
alert(str);
}
function classiF(){document.getElementById("post").innerHTML = "Đăng tin rao vặt";run("http://"+domain+"/vn/raovat.html");}
function del(url){if (confirm("Bạn chắc chắn muốn xoá tin rao vặt này?\n + Đồng ý xoá nhấp vào OK. \n + Không xoá nhấp vào Cancel ")) {run(url);}else {alert ("Thao tác đã được hũy !");}}
function black(url){var win=window.open(url,"black_list","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=400,height=100,screenX=150,screenY=150,top=150,left=150");win.focus();}
function eM(url){var win=window.open("http://"+domain+"/vn/mail.html?id="+url,"Email"+url,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=500,height=500,screenX=150,screenY=150,top=150,left=150");win.focus();}
function eMm(url){var winm=window.open("http://"+mail+"/vn/mail.html?mem="+url,"Email"+url,"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=no,width=500,height=500,screenX=150,screenY=150,top=150,left=150");winm.focus();}
function Print(url){var win=window.open("http://"+domain+"/vn/print.html?"+domain+url,"123Print","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=650,height=500,screenX=50,screenY=50,top=50,left=50");win.focus();}document.writeln("<div id=P></div>"); var ie=document.all; var ns6=document.getElementById && !document.all; var eT=false; if (ie||ns6) var o=document.all? document.all["P"] : document.getElementById? document.getElementById("P") : ""; function ieo(){ return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body;}
function pT(e){;  if (eT){; var curX=(ns6)?e.pageX : event.clientX+ieo().scrollLeft; var curY=(ns6)?e.pageY : event.clientY+ieo().scrollTop; o.style.left=curX+15+"px"; o.style.top=curY+1+"px"; setTimeout("o.style.visibility=\"visible\"",500); } eT=false; } function hT(){ if (ns6||ie){ eT=false; o.style.visibility="hidden"; o.style.left="-1000px"; } }
function T(text1,text2,text3){ document.onmousemove=pT; if (ns6||ie){ if(Trim(text3)=="") o.innerHTML="<div>Ngày đăng "+text1+" đến "+text2+"</div>"; else o.innerHTML="<div>Ngày đăng "+text1+" đến "+text2+"</div><div>Liên hệ: "+text3+"</div>"; eT=true; return false; } } function T2(text){ document.onmousemove=pT; if (ns6||ie){ o.innerHTML=text; eT=true; return false; } }
function upload(url){var win=window.open(url,"upload","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=no,width=718,height=400,screenX=50,screenY=50,top=50,left=50");win.focus();}
function delimg(imageid){
document.getElementById(imageid).innerHTML="";
var d = document.getElementById('img_ins');
var olddiv = document.getElementById(imageid);
d.removeChild(olddiv);

}
function Favorites(author,title,url){titleFav = title +" - "+author+" - "+domain;if (window.sidebar){window.sidebar.addPanel(titleFav, url,"");}else if( window.external ){window.external.AddFavorite( url, titleFav);}else if(window.opera && window.print){return true;}}
function likeit(id){
alert("Cám ơn bạn đã thích tin này.");
//hbhLRc(id,u);
//Fetch_object("like").innerHTML = "";
}
function unlikeit(id){
alert("Bạn đã đánh dấu không thích.");
//hbhuLRc(id,u);
//Fetch_object("unlike").innerHTML = "";
}
function reply(id){
}
function tool(id,title,author,url){
document.writeln('<a href="#" onclick="Favorites(\''+author+'\',\''+title+'\',\''+url+'\'); return false;" title="Lưu bookmark tin đăng này"><div class="b bookmark"></div></a>');
document.writeln('<a href="#" onclick="Report(\''+id+'\',\''+title+'\',\''+author+'\'); return false;" title="Cảnh báo tin đăng xấu"><div class="b alert"></div></a>');
document.writeln('<a href="#" onclick="Like(\''+id+'\',\''+title+'\',\''+author+'\'); return false;" title="Đánh dấu tin đăng hữu ích"><div class="b like"></div></a>');
document.writeln('<a href="#" onclick="Up(\''+id+'\',\''+author+'\'); return false;" title="Đưa tin này lên vị trí cao nhất"><div class="b up"></div></a>');
}
function share_article(who,title,url){
if(url==''){
var url = document.location.href;
}
switch (who) {
  case 'yahoo':
    run('ymsgr:im?msg='+title+': '+url);
    break;
  case 'twitter':
    opennewwin('http://twitter.com/home?status='+title+': '+url);
    break;
  case 'facebook':
    opennewwin('http://www.facebook.com/sharer.php?u='+url+'&t='+title);
    break;
  case 'myspace':
    opennewwin('http://www.myspace.com/Modules/PostTo/Pages/?l=3&u='+url+'&t='+title+'&c=%3Cp%3EPowered+by+%3Ca+href%3D%22http%3A%2F%2F'+domain+'/%22%3E'+domain+'%3C%2Fa%3E%3C%2Fp%3E');
    break;
  case 'google':
    opennewwin('http://www.google.com/bookmarks/mark?op=edit&bkmk='+url+'&title='+title);
    break;
  case 'url':
    var answer = prompt ("Hãy copy và gửi địa chỉ bên dưới để chia sẻ với bạn bè nhé bạn",url);
    break;
}
}
function share(title,url){
document.writeln('<div style="width:158px;padding:6px 0px 0px 0px;">Chia sẻ với bạn bè qua:</div>');
document.writeln('<span onclick="share_article(\'url\',\''+title+'\',\''+url+'\');" class="share_icons sharesurl"></span>');
document.writeln('<span onclick="share_article(\'yahoo\',\''+title+'\',\''+url+'\');" class="share_icons sharesyahoo"></span>');
document.writeln('<span onclick="share_article(\'twitter\',\''+title+'\',\''+url+'\');" class="share_icons sharestwitter"></span>');
document.writeln('<span onclick="share_article(\'facebook\',\''+title+'\',\''+url+'\');" class="share_icons sharefacebook"></span>');
document.writeln('<span onclick="share_article(\'myspace\',\''+title+'\',\''+url+'\');" class="share_icons sharemyspace"></span>');
document.writeln('<span onclick="share_article(\'google\',\''+title+'\',\''+url+'\');" class="share_icons sharegoogle"></span>');
}
function Get_W(cid,defaultid){
hbhGW(lv,defaultid,ucbw);
}
function ucbw(f){

}

//-->

