function addCalendarEntry(){var showResponse=function(originalRequest){if(originalRequest.responseText==""){$('calendarEntryForm').reset();$('progress').innerHTML="You have successfully added your event!<br /><br />All events submitted are subject to the Cosmo.ph Team\'s review and approval.<br />Approved events will be displayed in the Cosmo Calendar.";}else{$('progress').innerHTML=originalRequest.responseText;}
$('addEvent').disabled=false;};var showProgress=function(){$('progress').innerHTML='submitting...';$('addEvent').disabled=true;}
var err=0;if(trim($('calendarTitle').value)==''){err++;Element.addClassName($('calendarTitle').parentNode,'formError');}
else Element.removeClassName($('calendarTitle').parentNode,'formError');if(trim($('calendarStart').value)==''){err++;Element.addClassName($('calendarStart').parentNode,'formError');}
else Element.removeClassName($('calendarStart').parentNode,'formError');if(trim($('calendarEnd').value)==''){err++;Element.addClassName($('calendarEnd').parentNode,'formError');}
else Element.removeClassName($('calendarEnd').parentNode,'formError');if(trim($('calendarPlace').value)==''){err++;Element.addClassName($('calendarPlace').parentNode,'formError');}
else Element.removeClassName($('calendarPlace').parentNode,'formError');if(trim($('calendarDescription').value)==''){err++;Element.addClassName($('calendarDescription').parentNode,'formError');}
else Element.removeClassName($('calendarDescription').parentNode,'formError');if(err!=0){alert('You have not filled out all the required fields correctly. \n\n Please submit the required information.');}else{parameter=Form.serialize('calendarEntryForm');var url=publicdomainobj+"cosmo-calendar/addEntry.xml.php";var myAjax=new Ajax.Request(url,{method:'post',parameters:parameter,onComplete:showResponse,onLoading:showProgress});getAjaxClicks(chnnl+"/submit-entry");}}
function postConfession(){var showResponse=function(originalRequest){$('tellForm').innerHTML=originalRequest.responseText;};var showProgress=function(){$('tellMess').innerHTML='submitting...';$('tellFormBt').disabled=true;}
var err=0;var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if(trim($('tellName').value)==''){Element.addClassName($('tellName').parentNode,'formError');err++;}
else Element.removeClassName($('tellName').parentNode,'formError');if(trim($('tellAge').value)==''){Element.addClassName($('tellAge').parentNode,'formError');err++;}
else Element.removeClassName($('tellAge').parentNode,'formError');if(filter.test($F('tellEmail'))){Element.removeClassName($('tellEmail').parentNode,'formError')}
else{alert("The email address you entered is invalid. \n\nPlease enter a valid email address.");err++;Element.addClassName($('tellEmail').parentNode,'formError')}
if(err!=0){alert('You have not filled out all the required fields correctly. \n\n Please submit the required information.');}else{parameter=Form.serialize('tellForm');var url=publicdomainobj+"cosmo-tell-all/submit.xml.php";var myAjax=new Ajax.Request(url,{method:'post',parameters:parameter,onComplete:showResponse,onLoading:showProgress});getAjaxClicks(chnnl+"/post");}}