function playFlash(clipData) { new FlashBox(clipData); } function playCGM(clipData) { new FlashBox(clipData, {cgm:true}); } function logPlayback(report_id, cc_text_ids, components_root) { alert("http://"+components_root+"/report_builder2/logClipPlay.php?report_id="+report_id+"&cc_text_ids="+cc_text_ids); //new Ajax.Request("http://"+components_root+"/report_builder2/logClipPlay.php?report_id="+report_id+"&cc_text_ids="+cc_text_ids); } function confirmPublish(mode, cost, numClips) { if(cost > 0) { var message = "The total cost for this report is $" +(cost*numClips)+" ($" + (cost) + " per clip), plus the cost of any deleted clips that had been previously published.\n Are you sure you want to publish?"; if(confirm(message)) { //saveReportAction(); //ignoreUnload = true; //document.reportForm.publish.value = mode; //document.reportForm.submit(); document.location = 'publishReport.php?mode='+mode; } } else { //saveReportAction(); //ignoreUnload = true; //document.reportForm.publish.value = mode; //document.reportForm.submit(); document.location = 'publishReport.php?mode='+mode; } } function saveReport() { if(!ignoreUnload) { saveReportAction(); } } function saveReportAction(refresh) { var params = $(reportForm).serialize(); var onSuccessFunc = function(){}; if(refresh == true) { onSuccessFunc = function(){location.reload(true);}; } //var f = function(transport){ alert(transport.responseText)}; new Ajax.Request('saveReport.php', {method: 'post', parameters: params, onSuccess:onSuccessFunc}); }