﻿                function ValidatorHookupEvent(control, eventType, functionPrefix) 
                {
                    // Get the current handler for the event on the control,
                    // and clear the event.                    
                    var ev = control[eventType];
                    control[eventType] = "";
                    var func;

                    if (Sys.Browser.name.toLowerCase().indexOf('explorer') > -1) {
                        func = new Function(functionPrefix);
                    } else {
                        func = new Function("event", functionPrefix);
                    }              
                    // Register events using not jquery :)
                    $addHandler(control,eventType.substr(2),func);
    
                    if(ev)
                    {
                        $addHandler(control,eventType.substr(2),ev);
                    }
              }