					var selectedImageID = 'id_0';
					function PreviewPhoto(url, url2, id)
					{
						var imgPhotoDetail = document.getElementById('abc');
						var hlPhoto = document.getElementById('abcd_show');
						var simgPhoto = document.getElementById(id);
						var sselectedImageID = document.getElementById(selectedImageID);
						imgPhotoDetail.src = url;
						hlPhoto.href= url2;
						simgPhoto.style.border = '2px solid #990000';
					}
					function OnmouseoutPhoto(id)
					{	
						document.getElementById(id).style.border = '2px solid #999999';
					}
function web_alert()
{
	Boxy.alert('Bạn chưa chọn sản phẩm nào !');
}

function form_show(id){
	if(id == "5")
		{
			document.getElementById('quydinh').style.display = "block";
		}
	else
		{
			document.getElementById('quydinh').style.display = "none";
		}
	if(id == "6")
		{
			document.getElementById('quydinh').style.display = "none";
		}

}	
function form_show_list(id){
	if(id == "5")
		{
			alert('ndson');	
			document.getElementById('send_list').style.display = "block";
		}
	else
		{
			document.getElementById('send_list').style.display = "none";
		}
	if(id == "6")
		{
			document.getElementById('send_list').style.display = "none";
		}

}	

function view_history(iData) {
// remote=window.open('<?=$lang_path?>view_learn.php?iData=" + iData,','timelineWin', 'width = 600, height = 300, alwaysLowered=0, alwaysRaised=0, channelmode=0, dependent=1, directories=0, fullscreen=0, hotkeys=1, location=0, menubar=0, resizable=1, scrollbars=1, status=0, titlebar=0, toolbar=0, z-lock=0');
 window.open("account_history_view.php?ord_id=" + iData, "","height=600,width=900,menubar=0,resizable=1,scrollbars=1,statusbar=0,titlebar=0,toolbar=0");
 if (!remote.opener) 
				remote.opener = self;
		 if (window.focus)
				remote.focus();  
}
//tab
// JavaScript Document
// JavaScript Document
//document.write('<div id="loadclickbanner"></div>');

function clickbanner(obj,id){
 //alert(obj.href);
//alert(obj.tar);
$.post("/vn/bannerclick.php", { record_id: id } ,
function(data){
	alert("Data Loaded: " + data);
   });
return false;
window.location.href=obj.href;
//window.open.target=tar.target;
return false;
}
function tabdetail(id,count){
	for(i=1;i<=count;i++){
		try{
			document.getElementById('detail_'+i).className='tab_nomal';
			document.getElementById('description_'+i).style.display='none';
		}
		catch(e){}			
	}
	document.getElementById('detail_'+id).className='tab_select';
	document.getElementById('description_'+id).style.display='block';
}
function tabhome(id,count){
	for(i=1;i<=count;i++){
		try{
			document.getElementById('home_'+i).className='n';
			document.getElementById('homecontent_'+i).style.display='none';
		}
		catch(e){}			
	}
	document.getElementById('home_'+id).className='s';
	document.getElementById('homecontent_'+id).style.display='block';
}
function tabhomenews(id,count){
	for(i=1;i<=count;i++){
		try{
			document.getElementById('homenews_'+i).className='n';
			document.getElementById('homecontentnews_'+i).style.display='none';
		}
		catch(e){}			
	}
	document.getElementById('homenews_'+id).className='s';
	document.getElementById('homecontentnews_'+id).style.display='block';
}
//end tab
function changtab(id,count){
	for(i=1;i<=count;i++){
		document.getElementById('tab_'+i).className='tab_nomal';
		document.getElementById('content_'+i).style.display='none';
	}
	document.getElementById('tab_'+id).className='tab_select';
	document.getElementById('content_'+id).style.display='block';
}
function tabdetail(id,count){
	for(i=1;i<=count;i++){
		document.getElementById('detail_'+i).className='tab_nomal';
		document.getElementById('description_'+i).style.display='none';
	}
	document.getElementById('detail_'+id).className='tab_select';
	document.getElementById('description_'+id).style.display='block';
}
function start(id){
		for(i=1;i<=5;i++){
			if(i<=id){
				document.write('<img src="/images/start2.gif" border="0" />');
			}else{
				document.write('<img src="/images/start0.gif" border="0" />');
			}
		}
}
function showmenu(mnname,mnlink,mnulever){
	if(mnulever==2){
		stm_aix("p2i0","p0i0",[0,mnname,"","",-1,-1,0,mnlink,"","","","","",0,0,0,"","",0,0,0,0,0,"#329dde",0,"#d9f0f5",0,"","",0,0,1,1,"#FFFFFF","#ffffff","#ffffff","#000000","12px Arial","12px Arial",0,0],150,20);
	}else{
		stm_bm(["",400,"","/images/space.gif",0,"","",0,0,140,0,20,0,0,0,""],this);
		stm_bp("p0",[1,0,0,0,0,3,0,0,100,"",-2,"",-2,0,0,0,"","","",0,0,0,""]);
		stm_ai("p0i0",[1,"<div class=\"menu_top\" align=center><a href='"+mnlink+"'>"+mnname+"</a></div>","","",-1,-1,0,"","","","","","",0,0,0,"","",0,0,0,0,1,"#FFFFF7",1,"#B5BED6",1,"","",0,0,0,0,"#FFFFF7","#000000","#FFFFFF","#FFCC00","","",0,0]);
		stm_bpx("p1","p0",[1,4,0,0,0,3,0,0,100,"",-2,"",-2,100,0,0,"#999999","#FFFFF7","",3,0,0]);
	}
}
function closemenu(){
	stm_ep();
	stm_ep();
	stm_sc(1,["transparent","transparent","","",3,3,0,0,"#FFFFF7","#000000","","",7,9,0,"","",7,9,0,0,200]);
	stm_em();
}
function fromtopsubmit(){
	urlreturn='/search-';	
	urlreturn+=document.getElementById('top_module').value;
	urlreturn+='/'+document.getElementById('top_iCat').value;
	keyword = document.getElementById('keyword_top').value;
	keyword = keyword.replace('/',' ');
	keyword = keyword.replace('/',' ');
	keyword = keyword.replace('/',' ');
	keyword = keyword.replace('/',' ');
	keyword = keyword.replace('/',' ');
	urlreturn+='/'+(keyword);
	window.location.href=urlreturn;
}
