// JavaScript Document
//mrBien
function demo()
{
//function demo: ham demo
   if(document.frmcontact.fullname.value==""){
	  alert('Hay nhap ho ten !');
	  document.frmcontact.fullname.focus();
	  return false;
   }
	if(!checkemail(document.frmcontact.email.value)) { alert('Email error !'); document.frmcontact.email.focus();return false;}
   if(document.frmcontact.comment.value==""){
	  alert('Hay nhap noi dung !');
	  document.frmcontact.comment.focus();
	  return false;
   }
}
function checkemail(which){
if (which.indexOf("@")!=-1&&which.indexOf(".")!=-1)
//alert("Good!")
return true
else
//alert("Quit fooling around and enter a valid email address!")
return false
}

function mypopup(url,w,h)
 {
		popUpWin = window.open(url,'','height='+w+',width='+h+',location=no, scrollbars=yes, menubars=yes,toolbars=yes,resizable=yes,top=400,left=345');
		if (!popUpWin.opener)
		popUpWin.opener = self;
	 // mywindow1.moveTo(0,0);
 }

function mypopup_2(url,w,h)
 {
		popUpWin = window.open(url,'','height='+w+',width='+h+',location=no, scrollbars=yes, menubars=yes,toolbars=yes,resizable=yes,top=400,left=345');
		if (!popUpWin.opener)
		popUpWin.opener = self;
	 // mywindow1.moveTo(0,0);
 }

function dialog(url){
		popUpWin = window.open(url,'','height=222, width=222, location=no, scrollbars=yes, menubars=yes,toolbars=yes,resizable=yes', 'center=yes;');
		if (!popUpWin.opener)
		popUpWin.opener = self;
}

