function add_favorite(site, idset, message) { jQuery.get('', {do_favorite_z: 1, command: 'add', idset: idset, site: site}, function(data, textStatus, jqXHR) { alert(message); }); } function delete_favorite(site, idset, message) { if (confirm('Do you want to delete?')) { jQuery.get('', {do_favorite_z: 1, command: 'delete', idset: idset, site: site}, function(data, textStatus, jqXHR) { alert(message); }); } } function jq_favorite(id, site, idset) { var command = $('#'+id).data('command'); if (command) { $('#'+id).find('[rms-favorite = '+command+']').hide(300); jQuery.get( '', {do_favorite_z: 1, command: command, idset: idset, site: site}, function(data, textStatus, jqXHR) { if (data == 'ok') { if (command == 'add') { $('#'+id).data({command: 'delete'}).find('[rms-favorite = delete]').show(200); } if (command == 'delete') { $('#'+id).data({command: 'add'}).find('[rms-favorite = add]').show(200); } } }); } } function openPopup(URL, oW, oH) { LeftPosition = (screen.width) ? (screen.width-oW)/2 : 0; TopPosition = (screen.height) ? (screen.height-oH)/2 : 0; var x = window.open(URL,'_blank','width='+oW+',height='+oH+',resizable=1,scrollbars=1, left='+LeftPosition+', top='+TopPosition+' '); if( !x ) { return true; } return false; } function member_update_data(field, value, callback) { jQuery.get('', {do_data_z: 1, field: field, value: value}, callback); }