﻿// JScript File

// Prevent [ENTER] key from being used on page except for two text area controls.
function noenter(e) 
{ 
    //Get event.
    if (!e) 
    {        
        e = window.event;     
    }
    
    //Get HTML element calling the event.
    var node = (e.target) ? e.target : ((e.srcElement) ? e.srcElement : null); 
    
    //Only allow two text area controls to use the [ENTER] key.
    if (e.keyCode == 13)  
    {   
        if (node.id == "ctl00_cph_content_txt_comments")
        {
            //Allow
            e.returnValue = true;
        }
        else
        {
            //Disallow
            e.returnValue = false;
        }
    }  
}
