$(document).ready(function(){$("#btnOK").click(function(){updateTradition()});$("#btnOK").show();updateColumnsHeight();});function updateColumnsHeight(){$("#LeftMenuMiddle").height("");$("#Col2").height("");$("#Col3Blank").height("");if(($("#Col1").height()>$("#Col2").height())&&($("#Col1").height()>$("#Col3").height())){$("#Col2").css({height:$("#Col1").height()});$("#Col3Blank").css({height:$("#Col1").height()-$("#Col3Area").height()});}if(($("#Col2").height()>$("#Col1").height())&&($("#Col2").height()>$("#Col3").height())){$("#LeftMenuMiddle").css({height:$("#Col2").height()-50});$("#Col3Blank").css({height:$("#Col1").height()-$("#Col3Area").height()});}if(($("#Col3").height()>$("#Col1").height())&&($("#Col3").height()>$("#Col2").height())){$("#LeftMenuMiddle").css({height:$("#Col3").height()-54});$("#Col2").css({height:$("#Col3").height()-4});}}function updateTradition(){if(TraditionSelectClientID.Value!=null){$("#btnOK").addClass("Message-ButtonWait");$("#btnOK").attr("disabled","disabled");$.ajax({type:"POST",url:getSiteUrl()+"/Services/Update-Tradition.asmx/btnUpdate_Click",contentType:"application/json; charset=utf-8",data:"{ "+"'TraditionID': "+TraditionSelectClientID.Value+" "+"}",success:function(a){if(a.ErrNumber==0){$("#pnlSelectTradition .Message-ButtonText").html(a.ErrDescription);location.reload();}else{$("#message p").html(data.ErrDescription);$("#message").dialog("open");$("#message div").vAlign();$("#btnOK").removeClass("Message-ButtonWait");$("#btnOK").addClass("Message-ButtonOK");$("#btnOK").removeAttr("disabled");}}});}else{$("#message p").html("Please select a tradition");$("#message").dialog("open");$("#message div").vAlign();}}
