var CSS_EVENT_SELECTOR_RULE=new Array(
"DIV#box_best_selling_tours A:mousemove:showTip"
,"DIV#box_best_selling_tours A:mouseout:hideTip"
,"FORM#frmBookSv:submit:checkBookService"
,"A.about_item_1:click:showImage"/*lam thu popup*/
);
function showTip(evt){
	var tip = document.getElementById(this.getAttribute('_block_tip_id'));
	var cssTip=tip.style;
	var _body = document.documentElement;
/*cach lay toa do cua chuot luc xay ra su kien*/
/*@cc_on  @if(1)
	var x=window.event.clientX + _body.scrollLeft - _body.clientLeft;
	var y=window.event.clientY + _body.scrollTop - _body.clientTop;
	if(!this.getAttribute('_first_time')){
		cssTip.visibility='hidden';
		tip.filters.item(0).Apply();
	}
  @else@*/
	var x=evt.pageX;
	var y=evt.pageY;
/*@end@*/
	var top,left;
	if(y + tip.offsetHeight > _body.clientHeight + _body.scrollTop){ // outside of screen
		 top = Math.max(y - tip.offsetHeight + 10,_body.scrollTop + 10);
	}else{
		top = 10 + y;
	}
	if(x + tip.offsetWidth > _body.clientWidth + _body.scrollLeft){
		left = Math.max(x - tip.offsetWidth + 10,_body.scrollLeft + 10);
	}else{
		left = 10 + x;
	}
	if(top < y && y < top + tip.offsetHeight && left < x && x < left + tip.offsetWidth){ //mouse still inside the rectangle
		cssTip.top = y+10+'px';
		cssTip.left = x+10+'px';
	}else{
		cssTip.top = top + 'px';
		cssTip.left = left + 'px';
	}
/*@cc_on
	if(!this.getAttribute('_first_time')){
		cssTip.visibility='visible';
		tip.filters.item(0).Play();
		this.setAttribute('_first_time',1);
	}
 @*/
}
function hideTip(){
	var tip = document.getElementById(this.getAttribute('_block_tip_id'));
	if(tip){
		tip.style.top = '-20000px';
		tip.style.left = '-20000px';
		this.setAttribute('_first_time',0);
	}
}

/*lam thu popup*/
var gallery_link_active=document.getElementById('_gallery_link_active');
function showImage(){
	var p=document.getElementById('show_image_gallery');
	if(gallery_link_active!=null){
		gallery_link_active.className='about_item_1';
	}
/*@cc_on 
	p.style.visibility='hidden';
	p.filters.item(0).Apply();
@*/
	p.src=this.href;
/*@cc_on 
	p.style.visibility='visible';
	p.filters.item(0).Play();
@*/
	this.className='about_item_1 paging_active';
	gallery_link_active=this;
	return false;
}
