﻿  
   
   function confirmXoaRecord()   
	    {
		    return confirm("Bạn thật sự muốn xoá?");  
	    }  
	    
   function handleEnter (field, event) {
            var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
            var cFocus;
            var parent;
           if (keyCode == 13 || keyCode == 40 ) {
                cFocus = document.activeElement;
                switch (cFocus.type.toUpperCase()){
                    case 'TEXTAREA':
                    case 'TREEVIEW':
                    case 'SUBMIT':
                        return true; 
                        break;       
                    default :
                        window.event.keyCode = 9; 
                        break;
                }
            } 
            else
            return true;
        }       
        
     var lastColor;    
     
     function clearText(thefield){
    if (thefield.defaultValue==thefield.value)
        thefield.value = "";
}

     function GrdView_changeBackColor(row, highlight)    
    {    
        if (highlight)    
        {    
            row.style.cursor='hand'
            lastColor = row.style.backgroundColor;
            row.style.backgroundColor='#AFDBF6';
        }    
        else    
           row.style.backgroundColor = lastColor;    
    }   
		function Xemct(t)
			{
				window.open(t, '_blank', 'width=600,height=420, left=0, top=0, location=0, fullscreen=0, resizable=0, status=0, scrollbars=0, toolbar=0, menubar=0');
				//win.document.open();
				//win.document.close();
				//win.resizeTo(960,800);
				//return true;
		    } 
