var ajaxBaseUrl = "";
$j(document).ready(function () {
	ajaxBaseUrl = $j("#ajaxBaseUrl").val(); GetRscShows(); $j("form#frmRscTheatreShows select#setCode").live("change", function () { 0 != $j("select#setCode").attr("selectedIndex") && document.getElementById("errorMsg") && $j("div#errorMsg").fadeOut("slow") }); $j("form#frmRscTheatreShows").submit(function () {
		$j("div#errorMsg").remove(); var a = []; 0 == $j("select#setCode").attr("selectedIndex") && a.push("Please select a show"); if (0 < a.length) {
			var b = '<div id="errorMsg" class="hide"><ul>'; for (i =
0; i < a.length; i++) b += "<li>" + a[i] + "</li>"; $j("#selectionBox").before(b + "</ul></div>"); $j("div#errorMsg").fadeIn("slow"); return !1
		} return !0
	})
}); function GetRscShows() { $j.ajax({ type: "GET", cache: !1, url: ajaxBaseUrl + "/theatre/GetRSCShowsForPartial?callback=ProcessRscShows", data: null, crossDomain: !0, dataType: "jsonp" }) }
function ProcessRscShows(a) {
	if (document.getElementById("setCode")) {
		var b = 0; if (0 == a.length) $j("select#setCode option").remove(), $j("#setCode").append("<option value=''>Select show</option>"), $j("#setCode").attr("disabled", "disabled"), $j("input#btnGo").attr("disabled", "disabled"); else {
			$j("select#setCode option").remove(); $j("#setCode").append("<option value=''>Select show</option>"); for (b = 0; a.length > b; b++) {
				var c = 25 < a[b].Value.length ? a[b].Value.substr(0, 25) + "..." : a[b].Value; $j("#setCode").append("<option value='" +
a[b].Key + "' title='" + a[b].Value + "'>" + c + "</option>")
			} 
		} 
	} 
};
