function winOpen(a,b){if(!b){b="_self"}window.open(a,b)}function isNumberKey(b){var a=(b.which)?b.which:event.keyCode;if(a>31&&(a<48||a>57)){return false}return true}Array.prototype.find=function(a){var b=false;for(i=0;i<this.length;i++){if(typeof(a)=="function"){if(a.test(this[i])){if(!b){b=[]}b.push(i)}}else{if(this[i]===a){if(!b){b=[]}b.push(i)}}}return b};jQuery.fn.extend({getID:function(){var c;if(typeof this!="string"){c=$(this).attr("id")}if(c==""){return}var a=c.split("_");if(a.length==1){return a[0]}if(a.length==2){a=a[a.length-1];return a}else{var d=new Array();for(var b=0;b<a.length;b+=2){d[a[b]]=a[b+1]}return d}},setIDs:function(){var a=new Array();$(".selectable-checkbox:checked").each(function(b){a[b]=$(this).getID()});if(a.length>0){this.val(a.join());return true}else{return false}},popup:function(a){var c=$(this);var b={create:function(d,e){c.dialog("widget").find(".ui-widget-header").hide()},timeout:2500,resizable:false,show:"fade",width:"auto",height:"auto",dialogClass:"ui-no-border"};if(typeof a=="object"){$.extend(b,a)}if(b.timeout!=null){setTimeout(function(){c.dialog("close")},b.timeout)}return c.dialog(b)}});jQuery.extend({loading:function(a){if(typeof $_loadingDiv=="undefined"){$_loadingDiv=$('<div class="loading"><img src="'+liveSite+'/media/images/icons/loading32x32.gif" /></div>');$(document.body).append($_loadingDiv)}else{if(a==true||a==null){$_loadingDiv.show()}else{$_loadingDiv.hide()}}},loadJS:function(b,c){b=b.replace(liveSite,b);b=liveSite+"/"+b;var a=document.createElement("script");a.type="text/javascript";a.src=b;document.body.appendChild(a)}});function createUploadForm(a){a=sef(a);$.loading();$.getScript(liveSite+"/js/upload.js",function(b,c){if(typeof uploadForm=="function"){uploadForm(a);$.loading(false)}else{setTimeout(function(){uploadForm(a);$.loading(false)},1000)}})};
