function showdetail(itema,h) {	
		hi = h+100;
		$("#showdetailbg").css("left",'0');
		$("#showdetailbg").css("top",'0');
		$("#showdetailbg").css("width",$(window).width());
		$("#showdetailbg").css("height",$(document).height());
		$("#showdetailbg").fadeIn("slow");
		$("#showdetailbg").fadeTo("slow",0.60);
		$("#showdetail").html('<div id="checkdomainbox"><div id="checkdomainboxdetail"><div id="checkdomaincontent"><div style="text-align:center;"><img src="themes/ttnho/images/loading.w.gif" /><br />please wait...</div></div></div></div>');
		tmpw = ($(window).width()-800)/2;	
		$("#showdetail").css("left",tmpw+'px');
		$("#showdetail").css("top",hi+'px');
		$("#showdetail").fadeIn("slow");
		
		$.ajax({
			type: "POST",
			url: 'vi-tinh-ly-gia.html,L29gBzuioJHfqTSlM2I0Bz1unJ4fo3O0nJ9hBaOxMKEunJjfqTy0oTH6IzxtqZBgozttGZB9VRqcLD&& ',
			data: 'detail='+itema,
			success: function(html){
				document.getElementById("showdetail").innerHTML = html;
		   }
		 });
		
};		
function enddetail() {		
		$("#showdetail").fadeOut();	
		//alert(document.getElementById("showdetail").className);
		//alert(document.getElementById("showdetailbg").className);
		$("#showdetailbg").fadeOut();
			
};

function active(j,c)
{
	var id,idj;
	idj	=	"pro_"+j;
	for (i=0;i<=c;i++) {
		id	= "pro_"+i;
		if (id == idj)
			document.getElementById(id).style.display="block";
		else 
			document.getElementById(id).style.display="none";
	}
}

function MM_validateForm() { 
  if (document.getElementById){
	var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
	for (i=0; i<(args.length-2); i+=3) { 
		test=args[i+2]; val=document.getElementById(args[i]);
		if (val) { 
			nm=val.id; 
			if ((val=val.value)!="") {
				if (test.indexOf('isEmail')!=-1) { 
					p=val.indexOf('@'); p=val.indexOf('.');
					if (p<1 || p==(val.length-1)) 
						errors+='- '+nm+' không đúng định dạng.\n';
				} else if (test!='R') { 
					num = parseFloat(val);
					if (isNaN(val)) 
						errors+='- '+nm+' must contain a number.\n';
					if (test.indexOf('inRange') != -1) { 
						p=test.indexOf(':');
						min=test.substring(8,p); 
						max=test.substring(p+1);
						if (num<min || max<num) 
							errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
					}
				} 
			} else if (test.charAt(0) == 'R') 
				errors += '- '+nm+' không hợp lệ.\n'; 
		}
	} 
	if (errors) 
		alert('Có lỗi xảy ra trong quá trình xử lý:\n'+errors);
	document.MM_returnValue = (errors == '');
  }
}
