/// <reference name="MicrosoftAjax.js"/>

Type.registerNamespace("MyShool");

MyShool.MyShool = function() {
    }

MyShool.MyShool.prototype = {
    initialize: function() {
    },
    dispose: function() {        
    }
}
//MyShool.MyShool.registerClass('MyShool.MyShool', Sys.UI.Control);

//if (typeof(Sys) !== 'undefined') Sys.Application.notifyScriptLoaded();
   function getKeystroke(e, ID) {
    var keynum;
    /* get keycode depending on IE vs. everyone else */
    keynum = (window.event) ? event.keyCode : e.keyCode;
    /* only interested in CTRL and ALT sequences */
    if ((e.ctrlKey == 1) || (e.altKey == 1)) {
        switch (keynum) {
            case 10:  /* enter key IE && Chrome */
            case 13:  /* enter key FF*/
                __doPostBack(ID, '');
                break;
        }
    }
}

//Section for Poll control
var children_Input;
function setRadioBtn()
{
	children_Input.attr('checked', true);
}
$(document).ready(function ()
{
	var pollCustom = $('#pollCustomChoice');
	if (pollCustom)
	{
		var pp = $('#pollCustomChoice').parent().parent();
		children_Input = pp.children().filter('input');
		if (children_Input.length == 0) return;

		pp.children().mouseup(function ()
		{
			if (!children_Input.attr('checked'))
			{
				setTimeout(function ()
				{
					$('#pollCustomChoice').focus();
				}, 50);
			}
		});
	}
});
