﻿// This is the function which is used to set the default button to be clicked for various controls
// Function Written By : R. Pavan Kumar on 12th June'2008.


function focusDefaultButton(btnId,controlId,e)
{
    if(navigator.appName.indexOf("Netscape") > (-1))
    {
        if (e.keyCode && e.keyCode == 13)
        {
            document.getElementById(btnId).focus();
            //document.getElementById(btnId).click();
            //return false;
        } 
//        else
//        {
//            document.getElementById(controlId).focus();
//            return true;
//        }
    }
    if (navigator.appName.indexOf("Microsoft Internet Explorer") > (-1))
    {
        if (event.keyCode == 13)
        {
            document.getElementById(btnId).focus();
            //document.getElementById(btnId).click();
            //return false;
        } 
//        else
//        {
//            document.getElementById(controlId).focus();
//            return true;
//        }
    }
}

