             function CheckEmail(sEmail)
				  {
                     var re = /^([A-Za-z0-9\_\-]+\.)*[A-Za-z0-9\_\-]+@[A-Za-z0-9\_\-]+(\.[A-Za-z0-9\_\-]+)+$/;                     
                     if (sEmail.search(re) == -1)
					   {
					     return false;
			
		                }
	                 else
					   {
		                  return true;
					    }	  
    
                  }
             function Check_Login()
					   {
					       sUsername=document.form_login.txtUsername.value;
						   sPassword=document.form_login.txtPassword.value;
						   if(sUsername.length==0)
						      {
							     alert("Vui lòng nhập tên truy cập");
								 document.form_login.txtUsername.focus();
								 return false;
							  }
						   if(sPassword.length==0)
						      {
							     alert("Vui lòng nhập mật khẩu");
								 document.form_login.txtPassword.focus();
								 return false;
							  }	   
						   else	return true;
					   }	
			function open_popup(sLink,iWidth,iHeight)
	         {
		         window.open(sLink,"_blank","toolbar=0,menubar=0,width="+iWidth+",height="+iHeight+",scrollbars=1,resizable=1");
		         return false;
		     }	
		     
		   function ChangeWordDescription(sDescription)
			 {
			 	//alert(sDescription);
			 	if(sDescription != "")
				 	document.getElementById("divWordDescription").innerHTML = sDescription;
			 }	  	   	
		     
		    function CreateQuizFlash(divID, word, description, url)
		    {
		    	var html = "<object id='movie' classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0' viewastext='true' align='' height='21' width='100' onmouseover='ChangeWordDescription(\"" + description + "\")'>"
					+ "<param name='movie' value='../images/QuizAudio.swf'>"
					+ "<param name='menu' value='false'>"
					+ "<param name='FlashVars' value='snd=" + url + "&amp;title=" + word +"'>"
					+ "<param name='quality' value='high'>"
					+ "<param name='wmode' value='transparent'>"
					+ "<param name='bgcolor' value='#FFFFFF'>"
					+ "<embed src='../images/QuizAudio.swf' menu='false' quality='high' wmode='transparent' bgcolor='#FFFFFF' name='movie' type='application/x-shockwave-flash' pluginspage='http://www.macromedia.com/go/getflashplayer' flashvars='snd=" + url + "&amp;title=" + word +"' align='' height='21' width='100'>"
					+ "</object>";
				document.getElementById(divID).innerHTML = html;
		    } 		  
		    
		    function DisplayResult(iChoose)
		    {
		    	var iAnswer = document.getElementById("txtAnswer").value;
		    	var msg = "<font color=blue>CORRECT! PLEASE PROCEED TO THE NEXT QUESTION</font><br>";
		    	if(iChoose != iAnswer)
		    	{		    		
		    		msg = "<font color=red>INCORRECT! PLEASE WATCH AND LISTEN AGAIN</font><br>";
		    	}
		    	var html = "<table with=600 bgcolor=#006699 cellpadding=0 cellspacing=2 border=0><tr bgcolor=#ffffff><td><b>"
		    			 + "<table width=100%><tr><td height=10></td></tr><tr><td class=text>"
		    			 + msg + "</b></td></tr><tr><td height=5></td></tr>"
		    			 + "<tr><td align=center><input type=button value='OK' onclick='HideResult()' class=button></td></tr>"
		    			 + "<tr><td height=5></td></tr><table></td></tr></table>";
		    	document.getElementById("divShowResult").innerHTML = html;
		    	document.getElementById("divShowResult").style.display = "block";
		    	document.getElementById("divAudio").style.display = "none";		    

		    }
		    
		    function HideResult()
		    {
		    	document.getElementById("divShowResult").style.display = "none";
		    	document.getElementById("divAudio").style.display = "block";		
		    }
