var localeSelector;var offImgArray=new Array();var onImgArray=new Array();var staticPath=null;function initCommunity(){localeSelector=new YAHOO.widget.Overlay("otwLocaleSelector",{context:["ctx","tl","bl"],visible:false});localeSelector.render();}function showLocaleSelector(){localeSelector.show();}function hideLocaleSelector(){localeSelector.hide();
}function submitSearchByCategory(catId){document.getElementById("userContentCategory").value=catId;document.forms.CommunitySearchForm.submit();}function submitLocalAreaSearchByCategory(catId){document.getElementById("userContentCategory").value=catId;document.forms.LocalAreaPromotionsForm.submit();}function postUserComment(commentText,postBtnId,itemId,callback,type,weddingId){var comment=new Object();
if(commentText.trim()==""||commentText=="Write your comment..."){if(dlgConfirmationWW&&dlgConfirmationWW!=null){setConfirmationDialogToOk();showConfirmationDialogAlert("Please enter your comment.");}else{alert("Please enter your comment.");}return;}var postBtn=document.getElementById(postBtnId);if(type!=null&&type=="boardComment"){comment.commentsText=commentText;
postBtn.innerHTML='<img src="'+staticPath+'/images/community/post-comment-inactive.gif"/>';AjaxUserContent.createWeddingBoardComment(comment,itemId,weddingId,callback);}else{comment.commentText=commentText;postBtn.innerHTML='<img src="'+staticPath+'/images/community/post-comment-inactive.gif"/>';AjaxUserContent.createUserComment(comment,itemId,callback);
}}YAHOO.util.Event.addListener(window,"load",initCommunity);