  function updateDetails(pars){
    if ($('password').value == $('passwordConfirm').value){
      $('submit').hide();
      $('updating').show();
      new Ajax.Request('basicdetailsajax.php', {
        method: 'post',
        onSuccess: function(transport){
		$('updating').hide();
        notify("Information Updated!");
		},
        parameters: pars
      });
    }else{
      alert("Your new passwords don't match. Please re-type them.");
    }
  }
  
function updateInfoBox(section){

	var oEditor = FCKeditorAPI.GetInstance('informationBox') ;
	$('informationCopy').value = oEditor.EditorDocument.body.innerHTML;

	$('submit').hide();
	$('updating').appear({ duration: 0.3 });  
	$('notify').hide();

	new Ajax.Request('clientAjax.php?action=' + section, {
		method: 'post',
		onSuccess: function(transport){
			$('updating').hide();
			$('submit').show();
			notify("Information Updated!");
		},
		parameters: $('aboutVenue').serialize(true)
		});
	
	
}

function saveCustom(){

$('submit').hide();
$('updating').show();

var oEditor = FCKeditorAPI.GetInstance('informationBox') ;
$('informationCopy').value = oEditor.EditorDocument.body.innerHTML;

new Ajax.Request('clientAjax.php?action=customSave', {
	method: 'post',
	onSuccess: function(transport){
		$('updating').hide();
		$('submit').show();
	},
	parameters: $('customPage').serialize(true)
	});

}

function addPage(){
if ($('title').value!=""){
$('add').hide();
$('updating').show();
if ($('none')){
$('none').hide();
}

new Ajax.Request('clientAjax.php?action=addPage', {
	method: 'post',
	onSuccess: function(transport){
		$('updating').hide();
		$('add').show();
		$('title').value='';
		var response = transport.responseText;
		//alert(response);
		$('allLinks').innerHTML = response; 
	},
	parameters: $('newPage').serialize(true)
	});
}
}

function removePage(breedid){
	
var answer = confirm ("Are you sure you want to delete this custom page?")
if (answer){
	
	$('rmv_'+breedid).innerHTML='<b>Removing...</b>';
	new Ajax.Request('clientAjax.php?action=removePage&bid=' + breedid, {
		method: 'post',
		onSuccess: function(transport){
			$('e_'+breedid).hide();
		},
		parameters: {bid: breedid}
		});

}

}

function removeMenu(breedid){
	
var answer = confirm ("Are you sure you want to delete this menu?")
if (answer){
	
	$('rmv_'+breedid).innerHTML='<b>Removing...</b>';
	new Ajax.Request('clientAjax.php?action=removeMenu&bid=' + breedid, {
		method: 'post',
		onSuccess: function(transport){
			$('e_'+breedid).hide();
		},
		parameters: {bid: breedid}
		});

}

}

function removeDocument(breedid){
	
var answer = confirm ("Are you sure you want to delete this document?")
if (answer){
	
	$('rmv_'+breedid).innerHTML='<b>Removing...</b>';
	new Ajax.Request('clientAjax.php?action=removeDocument&bid=' + breedid, {
		method: 'post',
		onSuccess: function(transport){
			$('e_'+breedid).hide();
		},
		parameters: {bid: breedid}
		});

}

}


function removeEvent(breedid){
	
var answer = confirm ("Are you sure you want to delete this event?")
if (answer){
	
	$('rmv_'+breedid).innerHTML='<b>Removing...</b>';
	new Ajax.Request('clientAjax.php?action=removeEvent&bid=' + breedid, {
		method: 'post',
		onSuccess: function(transport){
			$('e_'+breedid).hide();
		},
		parameters: {bid: breedid}
		});

}

}

function removeEmail(id){
	
var answer = confirm ("Are you sure you want to delete this user?")
if (answer){
	
	$('rmv_'+id).innerHTML='<b>Removing...</b>';
	new Ajax.Request('clientAjax.php?action=removeEmail&bid=' + id, {
		method: 'post',
		onSuccess: function(transport){
			$('e_'+id).hide();
		},
		parameters: {id: id}
		});

}

}

function createUrl(){
if ($('title').value!="" && $('url').value!=""){
$('add').hide();
$('updating').show();
if ($('none')){
$('none').hide();
}

new Ajax.Request('clientAjax.php?action=addLink', {
	method: 'post',
	onSuccess: function(transport){
		$('updating').hide();
		$('add').show();
		$('title').value='';
		$('url').value='';
		var response = transport.responseText;
		//alert(response);
		$('allLinks').innerHTML = response; 
	},
	parameters: $('newLink').serialize(true)
	});
}
}

function removeLink(id){
	
var answer = confirm ("Are you sure you want to delete this event?")
if (answer){
	$('rmv_'+id).innerHTML='<b>Removing...</b>';
	new Ajax.Request('clientAjax.php?action=removeLink&bid=' + id, {
		method: 'post',
		onSuccess: function(transport){
			$('e_'+id).hide();
		},
		parameters: {bid: id}
		});

}

}

  
  function notify(message){ $('submit').show(); }
  
  function upFileShow(){
    $('addImageBtn').hide();
    $('addImage').appear({ duration: 0.3 });
  }
  
  function upImage(){
    $('addImage').hide();
    $('uploading').appear({ duration: 0.3 });
    alert($('aboutVenue').serialize(true))
    new Ajax.Request('aboutvenueajaxphoto.php', {
      method: 'post',
      onSuccess: function(transport){
        var response = transport.responseText;
        alert("Success! \n\n" + response);
      },
      parameters: {upFile: $('upFile').value}
      
    });
    }
	
