function siteReportClose(elm) { var sr = $(elm); $('siteReportLoad').hide(); if(typeof Effect == 'undefined') { sr.hide(); } else { Effect.BlindUp(sr, { duration:1, afterFinish: function() { siteReportConfirmation('siteReportMsg'); } }); } }; function siteReportConfirmation(elm) { var msg = $(elm); if(typeof Effect == 'undefined') { msg.show(); } else { Effect.Appear(msg, {duration:1}); } }; // Submit Site Report function siteReportSubmit(formName) { if(valid.validate()) { var sRL = $('siteReportLoad'); if(typeof Effect == 'undefined') { sRL.show(); } else { Effect.Appear(sRL, {duration:1}); } var srBtn = $('siteReportSubmitBtn'); srBtn.disable(); var srPars = Form.serialize($(formName),true); var srUrl = 'http://www.gather.com/siteReport.jsp'; var srRes = new Ajax.Request( srUrl, { method: 'post', parameters: srPars, onFailure: function() { alert('We could not submit your report at this time. Please try again in a few minutes.');srBtn.enable(); }, onSuccess: function() { siteReportClose('siteReport'); } }); } };