function callDomain(id,val) {
	 inputDomain = $(id).attr('value');
	 if (inputDomain == '') {
	 	$(id).attr('value',val);
	 }
}
function v3s_active(id)
{
	document.getElementById(id).style.display="block";
}
function ClickToURL()
{
	var http=document.formURL.SltWeb.value;
	if (http!="")
		window.open(document.formURL.SltWeb.value);
}
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 kiemtrama(truoc,sau,idd)
{
	var ntruoc = truoc ;
	var nsau = sau;
	if(document.getElementById(ntruoc).value == document.getElementById(nsau).value)
	{	
		document.getElementById(idd).innerHTML = "Đúng!";
		document.getElementById('gui').disabled = false;
	}
	else
	{
		document.getElementById(idd).innerHTML = "Sai!";
		document.getElementById('gui').disabled = true;
	}
}
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+' phải là 1 số.\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 trong quá trình xử lý:\n'+errors);
		document.MM_returnValue = (errors == '');
  }
}
function v3s_mntop(id,name) {
var c='mt'+id;
document.getElementById(c).style.background='url(themes\/default\/images\/'+name+'.jpg) top no-repeat';
}
