  
function removeFavorite(zingid){
  $('li'+zingid).innerHTML = '<a href="javascript:reallyRemoveFavorite('+zingid+');">really remove</a> | <a href="javascript:dontRemove('+zingid+');" class="black">nope</a>';
}
function dontRemove(zingid){
  $('li'+zingid).innerHTML = '<a href="javascript:removeFavorite('+zingid+');"><img src="/images/v2/zingfolio/icon_delete.gif" alt="remove from favoritez" height="17" width="21" /></a><a href="javascript:removeFavorite('+zingid+');">remove this Zing</a>'
}
function reallyRemoveFavorite(zingid){
//  callAHAH('process/zingfolio_removefavorite.php','li'+zingid,'<img src="/images/v2/common/indicator.gif" />','Error:','removeDiv('+zingid+')');
  var postString = 'zingid='+zingid;
  new ajax('process/zingfolio_removefavorite.php', {postBody: postString, update: 'li'+zingid, onComplete: removeDiv(zingid)}); 
}
function deleteZing(zingid){
  $('liDelete'+zingid).innerHTML = '<a href="javascript:reallyDelete('+zingid+');"><img src="/images/v2/zingfolio/icon_delete.gif" alt="really delete" height="17" width="21" /></a><a href="javascript:reallyDelete('+zingid+');">really delete</a> | <a href="javascript:dontDelete('+zingid+');" class="black">don\'t delete</a>';
}
function dontDelete(zingid){
  $('liDelete'+zingid).innerHTML = '<a href="javascript:deleteZing('+zingid+')"><img src="/images/v2/zingfolio/icon_delete.gif" alt="delete this Zing" height="17" width="21" /></a><a href="javascript:deleteZing('+zingid+')">delete this Zing</a>';
}
function reallyDelete(zingid){
  var postString = 'zingid='+zingid;
  new ajax('process/zingfolio_deletezing.php', {postBody: postString, update: 'li'+zingid, onComplete: removeDiv(zingid)});
}
function pubPriv(zingid,pubpriv){
  var postString = 'zingid='+zingid+'&pubpriv='+pubpriv;
  new ajax('process/zingfolio_pubpriv.php', {postBody: postString, update: 'liPubPriv'+zingid});
//  $('liPubPriv'+zingid).innerHTML = '<a href="javascript:reallyRemoveFavorite('+zingid+');"><img src="/images/v2/zingfolio/icon_delete.gif" alt="really remove" height="17" width="21" /></a><a href="javascript:reallyRemoveFavorite('+zingid+');">really remove</a> | <a href="javascript:dontRemove('+zingid+');" class="black">don\'t remove</a>';
}
function removeDiv(zingid){
  var divid = 'master'+zingid;
  var anchor = document.getElementById(divid);
  var parent = anchor.parentNode;
  var removeChild = parent.removeChild(anchor);
}
function chgPassword(){
  $('loginmessage').innerHTML = '<img src="/images/v2/common/indicator.gif" border="0" />';
  var postString = '';
  new ajax('process/chgpassword.php', {postBody: postString, update: 'loginmessage', onComplete: expandLoginMessage});
}
function resetpwd(){
  var password = $('password').value.replace(/&/g, "%26");
  var confirmpassword = $('confirmpassword').value.replace(/&/g, "%26");
  var remember = $('remember').checked;  
  $('loginmessage').innerHTML = '<img src="/images/v2/common/indicator.gif" border="0" />';
  var postString = 'password='+password+'&confirmpassword='+confirmpassword+'&remember='+remember;
  new ajax('process/reset.php', {postBody: postString, update: 'loginmessage', onComplete: expandLoginMessage});  
}
/*-----------------myspace-----------------------*/

function postZing(zingid){
  var divid = 'post'+zingid;
  var url = 'popin/myspacezing.php?zingid='+zingid;
//  callAHAH(url,divid,'<img src="/images/v2/common/indicator.gif" />','Error:',expandMyspaceMessage(divid));
//  new ajax(url, {update: divid, onComplete: expandMyspaceMessage(divid)});
  new ajax(url, {update: divid, onComplete:function() {expandPostMessage(zingid)}});  
}
function expandPostMessage(zingid){
  var postdiv = 'post'+zingid;
  var logintoggle = new fx.Height(postdiv, {duration: 400, onComplete:function(){postHighlight(zingid)}});
  logintoggle.hide();
  logintoggle.toggle();
}
function postHighlight(zingid){
  var postcode = $('code'+zingid);
  postcode.focus();
  postcode.select();
}
function contractPostMessage(postdiv){
  var logintoggle = new fx.Height($(postdiv).parentNode, {duration: 400, onComplete:function(){$(postdiv).innerHTML='';}});
  logintoggle.toggle();
}
