
$(document).ready(function(){if(window.parent.window._linktypename){$('#chkFilterToType').text('Filter: '+window.parent.window._linktypename).addClass('stchecked').show();_filterProcessType=window.parent.window._linktypeid;$('#ddlProcessType').val(_filterProcessType);filterChanged();}
else{$('#chkFilterToType').removeClass('stchecked').hide();}
$('#chkFilterToType').live('click',function(){filterChanged();});$("#procSelTabs").tabs();$('#btnCreateAndReturn').live('click',function(){$('#btnCreateAndReturn').slideUp('fast');$.ajax({type:'POST',contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify({newProcessNames:$('#txtNewProcess').val(),processType:$('#ddlProcessType').val(),tags:$('#txtTags').val()}),url:_reposRoot+'/ProcessDefinition.asmx/CreateProcesses',success:function(doc){if(doc.d.length>0){if(doc.d.length==1){ret="<a href='"+doc.d[0].PrettyUrl+"'>"+doc.d[0].ProcessName+"</a>";}
else{ret="<p>";for(var i=0;i<doc.d.length;i++){if(i>0)
{ret+="<br/>";}
ret=ret+"<a href='"+doc.d[i].PrettyUrl+"'>"+doc.d[i].ProcessName+"</a>";}
ret=ret+"</p>";}
CloseDlg(ret);}
else{$('#btnCreateAndReturn').slideDown('fast');}}});});});