function deleteMember(a){setWorking("members_div");x_deleteMember(a,members_cb)}function addClanGame(a){var b=document.getElementById("gameID");var c=b.options[b.selectedIndex].value;setWorking("games_div");x_addClanGame(a,c,games_cb)}function deleteClanGame(a,b){setWorking("games_div");x_deleteClanGame(a,b,games_cb)}function games_cb(a){document.getElementById("games_div").innerHTML=a}function demoteMember(a){setWorking("members_div");x_demoteMember(a,members_cb)}function promoteMember(a){setWorking("members_div");x_promoteMember(a,members_cb)}function members_cb(a){document.getElementById("members_div").innerHTML=a}function ajaxFileUploadLogo(a){_element="fileToUpload";$("#loading").ajaxStart(function(){$("#btnAdd").hide();$("#"+_element).hide();$(this).show()}).ajaxComplete(function(){$("#"+_element).show();$(this).hide()});$.ajaxFileUpload({url:"clanManagement.ajax?action=avUpload&clanID="+a,secureuri:false,fileElementId:_element,dataType:"json",success:function(c,b){if(typeof(c.error)!="undefined"){if(c.error!=""){alert(c.error)}else{document.getElementById(_element).value="";updateLogo(a);alert("Clan Logo Updated!")}}},error:function(c,b,d){alert(d)}});return false}function updateLogo(a){document.getElementById("teamLogo").src="images/clan_logos/logo_"+a+".png?"+(new Date()).getTime()};