function actionSendContactMail(){var A=document.forms.sendContactMail;var B='<img src="img/default/ajax-loader.gif" class="loaderSendByMail" title="" alt="" />';if(CW_FormValidator.check(A)){document.getElementById("sendContact").style.display="none";document.getElementById("imgloader").style.display="block";CW_comwebAjax.sendRequestForm(CW_Action_User.SERVLET_URI,"actionSendContactMailCallback",null,"actionSendContactMail",A,null)}}function actionSendContactMailCallback(B,A){document.getElementById("sendContact").style.display="block";document.getElementById("imgloader").style.display="none";showDialog_information_correct()}function actionProfilMemberChangeBrowser(C,A){var B=document.getElementById("memberProfile_Tabs").getElementsByTagName("li");document.getElementById("browser_member_video").innerHTML="";document.getElementById("browser_member_photo").innerHTML="";switch(C){case CW_Action_Media.Media_TYPE_IMAGE:document.getElementById("browser_member_video").style.display="none";document.getElementById("browser_member_photo").style.display="block";B.item(0).className="tab";B.item(1).className="tabActive";if(CacheManager.getFlashPlayerVersion()>=8){setBrowserMemberMedia(A,CW_Action_Media.Media_TYPE_IMAGE,"browser_member_photo")}else{CW_comwebAjax.loadHtml("html/member/memberProfile_modules/memberProfile_browser_NoFlashPlugin.html","browser_member_photo")}break;default:document.getElementById("browser_member_video").style.display="block";document.getElementById("browser_member_photo").style.display="none";B.item(0).className="tabActive";B.item(1).className="tab";if(CacheManager.getFlashPlayerVersion()>=8){setBrowserMemberMedia(A,CW_Action_Media.Media_TYPE_VIDEO,"browser_member_video")}else{CW_comwebAjax.loadHtml("html/member/memberProfile_modules/memberProfile_browser_NoFlashPlugin.html","browser_member_video")}break}}function actionMemberSendMessage(A,B){showDialog_MemberSendMessage(A,B)}function actionMemberSuscribe(A){if(CW_config.hasConnectedUser()){var B=new HashTable();B.put("userId",A);CW_Action_Site.createSubscriptionByUid("actionMemberSuscribeCallback",A,CW_GlobalVar.ITEM_TYPE_USER,B)}else{showDialog_connected_error()}}function actionMemberSuscribeCallback(B,A){if(!B.hasError()){loadBrick_member_memberProfile_suscribe_disable(A.hashTableStore.get("userId"))}}function actionPlaylistSuscribe(A){if(CW_config.hasConnectedUser()){var B=new HashTable();B.put("uid",A);CW_Action_Site.createSubscriptionByUid("actionPlaylistSuscribeCallback",A,CW_GlobalVar.ITEM_TYPE_GROUP,B)}else{showDialog_connected_error()}}function actionPlaylistSuscribeCallback(B,A){if(!B.hasError()){loadBrick_playlist_suscribe_disable(A.hashTableStore.get("uid"))}}function actionPlaylistUnSuscribe(A){if(CW_config.hasConnectedUser()){var B=new HashTable();B.put("uid",A);CW_Action_Site.removeSubscription("actionPlaylistUnSuscribeCallback",A,CW_GlobalVar.ITEM_TYPE_GROUP,B)}else{showDialog_connected_error()}}function actionPlaylistUnSuscribeCallback(B,A){if(!B.hasError()){loadBrick_playlist_suscribe_enable(A.hashTableStore.get("uid"))}}function actionMemberUnsuscribe(A){if(CW_config.hasConnectedUser()){var B=new HashTable();B.put("userId",A);CW_Action_Site.removeSubscription("actionMemberUnsuscribeCallback",A,CW_GlobalVar.ITEM_TYPE_USER,B)}else{showDialog_connected_error()}}function actionMemberUnsuscribeCallback(B,A){if(!B.hasError()){loadBrick_member_memberProfile_suscribe_enable(A.hashTableStore.get("userId"))}}function actionMemberAddFriend(A,B){if(CW_config.hasConnectedUser()){if(B==1){showDialog_Information_Feedback("actions.msg.addFriend")}else{CW_Action_User.addFriend("goTo",A);try{loadBrick_member_memberProfile_friend_disable(A)}catch(C){}}}else{showDialog_connected_error()}}function actionMemberRemoveFriend(A,B){if(CW_config.hasConnectedUser()){CW_Action_User.rmvFriend("goTo",A);try{loadBrick_member_memberProfile_friend_enable(A,B)}catch(C){}}else{showDialog_connected_error()}}function actionMemberBlock(B,A){if(CW_config.hasConnectedUser()){if(A==1){showDialog_Information_Feedback("actions.msg.removeFriend")}else{CW_Action_User.blockUser("goTo",B);try{loadBrick_member_memberProfile_block_disable(B)}catch(C){}}}else{showDialog_connected_error()}}function actionMemberUnBlock(A){if(CW_config.hasConnectedUser()){CW_Action_User.unBlockUser("goTo",A);try{loadBrick_member_memberProfile_block_enable(A)}catch(B){}}else{showDialog_connected_error()}}function actionMediaAddFavor(){if(CW_config.hasConnectedUser()){CW_Action_Media.addFavMedia("goTo",PlayerFlash.flashMediaId);loadBrick_media_mediaPlay_actions_favor_disable()}else{showDialog_connected_error()}}function actionMediaRemFavor(){if(CW_config.hasConnectedUser()){CW_Action_Media.remFavMedia("goTo",PlayerFlash.flashMediaId);loadBrick_media_mediaPlay_actions_favor_enable()}else{showDialog_connected_error()}}function addNewComment(C){try{if(!CW_config.hasConnectedUser()){showDialog_connected_error()}else{var B=CW_util.getFormElement(C,"comment.value").value;if(B==null||B==""){showDialog_Information_Feedback("comments.addYourComment.warning",CW_internationalization.getValue("dialog.title.warning"));return false}else{if(!CW_Format.isValidAlphaDigitCPLX2(B)){showDialog_Information_Feedback("input.add.warning.carac",CW_internationalization.getValue("dialog.title.warning"),"carac="+CW_Format.getUnvalidCaracAlphaDigitCPLX2(B));return false}CW_util.getFormElement(C,"user.uid").value=CW_config.getConnectedUser().getUid();CW_util.getFormElement(C,"lang.uid").value=CW_internationalization.getUid();var A=C.filter_type.value;if(A==CW_Filter.Filter_MEDIA){var F=new Array();CW_util.getFormElement(C,"media.uid").value=C.item_uid.value;var E=new HashTable();E.put("form",C);E.put("mediaId",C.item_uid.value);E.put("autor",C.autor.value);C.appendChild(CW_util.createElementInputHidden("listing.nbre.elements",CacheManager.listingNb_comment));C.appendChild(CW_util.createElementInputHidden("listing.page",1));CW_comwebAjax.sendRequestForm(CW_Action_Media.SERVLET_URI,"addNewCommentMediaCallback",null,"addcomment",C,E)}else{if(A==CW_Filter.Filter_MEMBER){var F=new Array();CW_util.getFormElement(C,"user.target").value=C.target_uid.value;var E=new HashTable();E.put("form",C);E.put("userId",C.item_uid.value);E.put("autor",C.autor.value);C.appendChild(CW_util.createElementInputHidden("listing.nbre.elements",CacheManager.listingNb_comment));C.appendChild(CW_util.createElementInputHidden("listing.page",1));CW_comwebAjax.sendRequestForm(CW_Action_User.SERVLET_URI,"addNewCommentUserCallback",null,"addcomment",C,E)}else{if(A==CW_GlobalVar.ITEM_TYPE_GROUP){var E=new HashTable();E.put("form",C);E.put("commentId",C.item_uid.value);E.put("autor",C.autor.value);C.appendChild(CW_util.createElementInputHidden("listing.nbre.elements",CacheManager.listingNb_comment));C.appendChild(CW_util.createElementInputHidden("listing.page",1));CW_comwebAjax.sendRequestForm(CW_Action_Media.SERVLET_URI,"addNewCommentPlaylist",null,"addcomment",C,E)}}}}}}catch(D){CW_logger(CW_logger.LEVEL_ERROR,"addNewComment error:"+D);return false}return false}function addNewCommentPlaylist(D,A){var C=A.hashTableStore.get("form");var B=A.hashTableStore.get("autor");C.removeChild(CW_util.getFormElement(C,"listing.nbre.elements"));C.removeChild(CW_util.getFormElement(C,"listing.page"));CW_util.getFormElement(C,"comment.value").value="";if(B==2){showDialog_Information_Feedback("comments.addYourComment.result",CW_internationalization.getValue("dialog.title.information"))}else{displayPlaylistCommentsListingContent(D,A)}}function addNewCommentMediaCallback(D,A){var C=A.hashTableStore.get("form");var B=A.hashTableStore.get("autor");C.removeChild(CW_util.getFormElement(C,"listing.nbre.elements"));C.removeChild(CW_util.getFormElement(C,"listing.page"));CW_util.getFormElement(C,"comment.value").value="";if(B==2){showDialog_Information_Feedback("comments.addYourComment.result",CW_internationalization.getValue("dialog.title.information"))}else{try{var F=D.getSpecificChildren("list")[0].getTotalNbItem();PlayerFlash.comwebBeanMedia.changeValue("nbcomment",F);loadBrick_media_mediaPlay_title(PlayerFlash.comwebBeanMedia,"mediaTitleContainer")}catch(E){}A.hashTableStore.put("pagerFormName","media_comments");displayMediaCommentsListingContent(D,A)}}function addNewCommentUserCallback(D,A){var E=A.hashTableStore.get("userId");var C=A.hashTableStore.get("form");var B=A.hashTableStore.get("autor");CW_util.getFormElement(C,"comment.value").value="";C.removeChild(CW_util.getFormElement(C,"listing.nbre.elements"));C.removeChild(CW_util.getFormElement(C,"listing.page"));if(B==2){showDialog_Information_Feedback("comments.addYourComment.result",CW_internationalization.getValue("dialog.title.information"))}else{CW_Action_User.displayUser("addNewCommentUserCallbackCallback",E,null,false);A.hashTableStore.put("pagerFormName","user_comments");displayCommentsListingContent(D,A)}}function addNewCommentUserCallbackCallback(B,A){var C=B.getSpecificChildren("user")[0];loadBrick_member_memberProfile_stat(C,"memberStatsBarContainer")}function addNewTag(C){if(!CW_config.hasConnectedUser()){showDialog_connected_error()}else{try{var B=CW_util.getFormElement(C,"tag.text").value;if(B==null||B==""){showDialog_Information_Feedback("tag.addYourTag.warning",CW_internationalization.getValue("dialog.title.warning"));return false}else{B=testInuptTag(B);if(B==""){showDialog_Information_Feedback("tag.addYourTag.warning.lenght",CW_internationalization.getValue("dialog.title.warning"));return false}if(!CW_Format.isValidAlphaDigitCPLX2(B)){showDialog_Information_Feedback("input.add.warning.carac",CW_internationalization.getValue("dialog.title.warning"),"carac="+CW_Format.getUnvalidCaracAlphaDigitCPLX2(B));return false}var A=C.filter_type.value;CW_util.getFormElement(C,"tag.text").value=B;CW_util.getFormElement(C,"user.uid").value=CW_config.getConnectedUser().getUid();CW_util.getFormElement(C,"lang.uid").value=CW_internationalization.getUid();if(A==CW_Filter.Filter_MEDIA){CW_util.getFormElement(C,"tag.type").value=1;var E=new HashTable();E.put("form",C);E.put("userId",C.item_uid.value);E.put("autor",C.autor.value);CW_comwebAjax.sendRequestForm(CW_Action_Media.SERVLET_URI,"addNewTagMediaCallback",null,"addtag",C,E)}else{if(A==CW_Filter.Filter_MEMBER){var E=new HashTable();E.put("form",C);E.put("userId",C.item_uid.value);E.put("autor",C.autor.value);CW_comwebAjax.sendRequestForm(CW_Action_User.SERVLET_URI,"addNewTagUserCallback",null,"addtag",C,E)}else{if(A==CW_GlobalVar.ITEM_TYPE_GROUP){var E=new HashTable();E.put("form",C);E.put("userId",C.item_uid.value);E.put("autor",C.autor.value);CW_comwebAjax.sendRequestForm(CW_Action_Media.SERVLET_URI,"addNewTagPlaylistCallback",null,"addtag",C,E)}}}}}catch(D){CW_logger.log(CW_logger.LEVEL_ERROR,"addNewTag error:"+D);return false}}return false}function addNewTagPlaylistCallback(D,A){var E=A.hashTableStore.get("mediaId");var C=A.hashTableStore.get("form");var B=A.hashTableStore.get("autor");CW_util.getFormElement(C,"tag.text").value="";if(B==2){showDialog_Information_Feedback("tag.addYourTag.result",CW_internationalization.getValue("dialog.title.information"))}else{displayPlaylistTagsListingContent(D,A)}}function addNewTagMediaCallback(D,A){var E=A.hashTableStore.get("mediaId");var C=A.hashTableStore.get("form");var B=A.hashTableStore.get("autor");CW_util.getFormElement(C,"tag.text").value="";if(B==2){showDialog_Information_Feedback("tag.addYourTag.result",CW_internationalization.getValue("dialog.title.information"))}else{displayTagsListingContent(D,A)}}function addNewTagUserCallback(E,B){var A=B.hashTableStore.get("userId");var D=B.hashTableStore.get("form");var C=B.hashTableStore.get("autor");CW_util.getFormElement(D,"tag.text").value="";if(C==2){showDialog_Information_Feedback("comments.addYourComment.result",CW_internationalization.getValue("dialog.title.information"))}else{displayUserTagsListingContent(E,B)}}function goToChangeAvatar(A){CW_Action_User.changeAvatar("alertAvatarChange",A)}function alertAvatarChange(B,A){document.getElementById("status").innerHTML=CW_internationalization.getValue("media.option.avatarChanged")}function deleteMedia(G){var A=document.getElementById(G);var B=A.getElementsByTagName("input");var H=new Array();CW_logger.log(CW_logger.LEVEL_INFORMATION,"deleteMedia checkbox div:"+G+" nb input elements:"+B.length);for(var D=0;D<B.length;D++){var I=B.item(D);try{if((new String(I.type)).toLowerCase()=="checkbox"){if(I.id=="option_media_delete"&&I.checked){H.push(I.name)}}}catch(F){CW_logger.log(CW_logger.LEVEL_ERROR,"deleteMedia checkbox div:"+G+" error:"+F)}}if(H.length==0){showDialog_Information_Feedback("dialog.msg.select.media",CW_internationalization.getValue("dialog.title.warning"))}else{for(var E=0;E<H.length;E++){var C=H[E];if(E<(H.length-1)){CW_Action_Media.deleteMedia("goTo",C)}else{CW_Action_Media.deleteMedia("deleteMediaCallback",C)}}}}function deleteMediaCallback(B,A){showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));goToAllMediaUser()}function myScroonRmvFriends(B){var G=document.getElementById(B);var D=G.getElementsByTagName("input");var A=new Array();CW_logger.log(CW_logger.LEVEL_INFORMATION,"remove friend checkbox div:"+B+" nb input elements:"+D.length);for(var E=0;E<D.length;E++){var C=D.item(E);try{if((new String(C.type)).toLowerCase()=="checkbox"){if(C.id=="option_friend_add"&&C.checked){A.push(C.name)}}}catch(F){CW_logger.log(CW_logger.LEVEL_ERROR,"remove friend checkbox div:"+B+" error:"+F)}}if(A.length==0){showDialog_Information_Feedback("dialog.msg.select.media",CW_internationalization.getValue("dialog.title.warning"))}else{CW_Action_User.rmvFriendArray("rmvFriendsCallback",A)}}function rmvFriendsCallback(){showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));goToMyFriendsPage()}function myScroonRemoveFavorite(B){var G=document.getElementById(B);var D=G.getElementsByTagName("input");var A=new Array();CW_logger.log(CW_logger.LEVEL_INFORMATION,"deleteMedia checkbox div:"+B+" nb input elements:"+D.length);for(var E=0;E<D.length;E++){var C=D.item(E);try{if((new String(C.type)).toLowerCase()=="checkbox"){if(C.id=="option_media_delete"&&C.checked){A.push(C.name)}}}catch(F){CW_logger.log(CW_logger.LEVEL_ERROR,"deleteMedia checkbox div:"+B+" error:"+F)}}if(A.length==0){showDialog_Information_Feedback("dialog.msg.select.media",CW_internationalization.getValue("dialog.title.warning"))}else{CW_Action_Media.remFavMediaArray("rmvFavCallback",A)}}function rmvFavCallback(B,A){showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));goToMyFavoritePage()}function createMyPlaylist(){var A=document.forms.playlistInfoForm;if(CW_FormValidator.check(A)){CW_comwebAjax.sendRequestForm(CW_Action_User.SERVLET_URI,"createMyPlaylistCallback",null,"createPlaylist",A,null)}}function createMyPlaylistCallback(C,A){if(C.hasError()){var D=C.getSpecificChildren("error");var B=document.forms.playlistInfoForm;while(D.length>0){comwebBeanError=D.shift();switch(comwebBeanError.getUid()){case 30:CW_FormValidator.setErrorMessage(B,"pl.name",CW_internationalization.getValue("playlist.error.name"));window.scroll(0,0);break}}}else{showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));goToMyPlaylistsPage()}}function deletePlaylist(A){CW_Action_User.deletePlaylist("goToMyPlaylistsPage",A)}function addFavoriteInPlaylist(H){var A=document.getElementById(H);var C=A.getElementsByTagName("input");var I=new Array();var B=document.forms.selectUserPlayList;var E=null;var D=null;try{E=CW_util.getFormElement(B,"pl.name").value;D=CW_util.getFormElement(B,"page.type").value}catch(G){}CW_logger.log(CW_logger.LEVEL_INFORMATION,"addMediaInPlaylist checkbox div:"+H+" nb input elements:"+C.length);for(var F=0;F<C.length;F++){var J=C.item(F);try{if((new String(J.type)).toLowerCase()=="checkbox"){if(J.id=="option_media_delete"&&J.checked){I.push(J.name)}}}catch(G){CW_logger.log(CW_logger.LEVEL_ERROR,"deleteMedia checkbox div:"+H+" error:"+G)}}if(E!=null&&E!="null"&&E!=""){if(I.length==0){showDialog_Information_Feedback("dialog.msg.select.media",CW_internationalization.getValue("dialog.title.warning"))}else{CW_Action_Media.addMediaArrayInPlaylist("addMediaPlaylistCallback",E,I,D)}}else{showDialog_Information_Feedback("playlist.add.choose")}}function addMediaPlaylistCallback(){showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"))}function updateMyPlaylist(){var A=document.forms["	"];if(CW_FormValidator.check(A)){CW_comwebAjax.sendRequestForm(CW_Action_User.SERVLET_URI,"updateMyPlaylistCallback",null,"updatePlaylist",A,null)}}function updateMyPlaylistCallback(){showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));goToMyPlaylistsPage()}function removeFromPlaylist(G){var A=document.getElementById(G);var C=A.getElementsByTagName("input");var H=new Array();var B=document.forms.selectUserPlayList;var D=CW_util.getFormElement(B,"pl.name").value;var J=CW_util.getFormElement(B,"page.type").value;CW_logger.log(CW_logger.LEVEL_INFORMATION,"addMediaInPlaylist checkbox div:"+G+" nb input elements:"+C.length);for(var E=0;E<C.length;E++){var I=C.item(E);try{if((new String(I.type)).toLowerCase()=="checkbox"){if((new String(I.id)).indexOf("option_media_delete")==0&&I.checked){H.push(I.name)}}}catch(F){CW_logger.log(CW_logger.LEVEL_ERROR,"deleteMedia checkbox div:"+G+" error:"+F)}}if(H.length==0){showDialog_Information_Feedback("dialog.msg.select.media",CW_internationalization.getValue("dialog.title.warning"))}else{CW_Action_Media.rmvMediaArrayFromPLaylist("removeFromPlaylistCallback",D,H,J)}}function removeFromPlaylistCallback(){showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));goToMyPlaylistsPage()}function mycountEditMedia(C){var A=document.forms.mediaInfoForm;var B=new HashTable();B.put("mediaTypeId",C);if(CW_FormValidator.check(A)){CW_comwebAjax.sendRequestForm(CW_Action_Media.SERVLET_URI,"mycountEditMediaAfter",null,"editmedia",A,B)}}function mycountEditMediaAfter(B,A){var C=parseInt(A.hashTableStore.get("mediaTypeId"));showDialog_Information_Feedback("dialog.msg.information",CW_internationalization.getValue("dialog.title.information"));if(C==CW_Action_Media.Media_TYPE_IMAGE){CW_AjaxPage_Manager.displayPage("my_count_photo")}else{goToAllMediaUser()}}function voteMediaValue(A,B){if(CW_config.hasConnectedUser()){CW_Action_Stat.addMediaNote("voteMediaValueCallback",B,A)}else{showDialog_connected_error()}}function voteMediaValueCallback(C,B){if(C.hasError()){var A=C.getSpecificChildren("error")[0];if(A.getUid()==29){document.getElementById("mediaPlayVoteMenu").innerHTML=CW_internationalization.getValue("media.vote.msg.already")}}else{var D=C.getSpecificChildren("media")[0];loadBrick_media_mediaPlay_vote(D,"mediaPlayerVoteContainer");document.getElementById("mediaPlayVoteMenu").innerHTML=CW_internationalization.getValue("media.vote.msg.confirm")}}function addTagShow(A){var B=document.getElementById(A);if(B.style.display=="none"){B.style.display="block"}else{B.style.display="none"}}function addTagHide(A){var B=document.getElementById(A);B.style.display="none"};