function loadForumPeek2(){var showResponse=function(originalRequest){$('#loadForumPeekHere2').html(originalRequest);};var showProgress=function(){$('#loadForumPeekHere2').html('loading...');}
var url=publicdomainobj+"ccForumPeek.xml.php";$.ajax({type:"POST",url:url,beforeSend:showProgress,success:showResponse});}
function addCalendarEntry(){var showResponse=function(originalRequest){if(originalRequest==""){$('#calendarEntryForm').each(function(){this.reset();});$('#progress').html("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').html(originalRequest);}
$('#addEvent').removeAttr("disabled");};var showProgress=function(){$('#progress').html('submitting...');$('#addEvent').attr("disabled","true");}
var err=0;if(trim($('#calendarTitle').val())==''){err++;$('#calendarTitle').parent().addClass('formError');}
else $('#calendarTitle').parent().removeClass('formError');if(trim($('#calendarStart').val())==''){err++;$('#calendarStart').parent().addClass('formError');}
else $('#calendarStart').parent().removeClass('formError');if(trim($('#calendarEnd').val())==''){err++;$('#calendarEnd').parent().addClass('formError');}
else $('#calendarEnd').parent().removeClass('formError');if(trim($('#calendarPlace').val())==''){err++;$('#calendarPlace').parent().addClass('formError');}
else $('#calendarPlace').parent().removeClass('formError');if(trim($('#calendarDescription').val())==''){err++;$('#calendarDescription').parent().addClass('formError');}
else $('#calendarDescription').parent().removeClass('formError');if(err!=0){alert('You have not filled out all the required fields correctly. \n\n Please submit the required information.');}else{parameter=$('#calendarEntryForm').serialize();var url=publicdomainobj+"cosmo-calendar/addEntry.xml.php";$.ajax({type:"POST",url:url,data:parameter,beforeSend:showProgress,success:showResponse});getAjaxClicks(chnnl+"/submit-entry");}}
function postConfession(){var showResponse=function(originalRequest){$('#tellForm').html(originalRequest);};var showProgress=function(){$('#tellMess').html('submitting...');$('#tellFormBt').attr("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').val())==''){$('#tellName').parent().addClass('formError');err++;}
else $('#tellName').parent().removeClass('formError');if(trim($('#tellAge').val())==''){$('#tellAge').parent().addClass('formError');err++;}
else $('#tellAge').parent().removeClass('formError');if(filter.test($('#tellEmail').val())){$('#tellEmail').parent().removeClass('formError');}
else{alert("The email address you entered is invalid. \n\nPlease enter a valid email address.");err++;$('#tellEmail').parent().addClass('formError');}
if(err!=0){alert('You have not filled out all the required fields correctly. \n\n Please submit the required information.');}else{parameter=$('#tellForm').serialize();var url=publicdomainobj+"cosmo-tell-all/submit.xml.php";$.ajax({type:"POST",url:url,data:parameter,beforeSend:showProgress,success:showResponse});getAjaxClicks(chnnl+"/post");}}
