
$(document).ready(function()
{$('#deleteProjectLibrary').click(showDeleteProjectDlg);$('#btnDeleteProjectFirst').click(showDeleteProjectFinalDlg);$('#btnCancelDelete').click(cancelDeleteProject);$('#btnDeleteProjectFinal').click(deleteProject);$('#btnCancelDeleteFinal').click(cancelDeleteProjectFinal);});function showDeleteProjectDlg()
{$('#deleteProjectDlg').slideUp('fast');$('#deleteProjectDlg').css({'top':$(this).position().top,'right':$(window).width()-($(this).parent().position().left+($(this).parent().outerWidth()))}).slideDown('fast',function(){});}
function showDeleteProjectFinalDlg()
{$('#deleteProjectDlg').slideUp('fast');$('#deleteProjectFinalDlg').slideUp('fast');$('#deleteProjectFinalDlg').insertAfter('#deleteProjectDlg');$('#deleteProjectFinalDlg').css({'top':$('#deleteProjectLibrary').position().top,'right':$(window).width()-($('#deleteProjectLibrary').parent().position().left+($('#deleteProjectLibrary').parent().outerWidth()))}).slideDown('fast',function(){});}
function deleteProject()
{$('#deleteProjectFinalDlg').slideUp('fast');$('#deleteProjectLibrary a').text('Deleting...');$('#deleteProjectFinalDlg').slideUp('fast',function()
{$('#deleteProject').effect('pulsate',{times:2},500,function()
{$('#deleteProjectLibrary a').text('Deleted');});});var dSend={projectId:projectLibId};$.ajax({type:'POST',contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(dSend),url:_reposRoot+'/ProcessDefinition.asmx/DeleteProjectLibrary',success:function(data){onDeleteProject();}});return false;}
function onDeleteProject()
{$('#deleteProjectLibrary a').css('cursor','default');window.location.href=siteRoot;}
function cancelDeleteProject()
{$('#deleteProjectDlg').slideUp('fast');return false;}
function cancelDeleteProjectFinal()
{$('#deleteProjectFinalDlg').slideUp('fast');return false;}