var ComwebPageGlobal={NB_ELEMENT_BY_PAGE:16,NB_PAGE:5};function CW_Filter(){}CW_Filter.prototype={ORDER_LASTADD:0,ORDER_MOSTVIEWED:1,ORDER_MOSTPOPULAR:2,ORDER_MOSTCOMMENTED:3,ORDER_MOSTNOTATION:4,ORDER_LASTCONNECTED:5,ORDER_RANDOM:6,ORDER_ASCINGROUP:9,ORDER_DESCINGROUP:10,SINCE_ALL:0,SINCE_TODAY:1,SINCE_THISWEEK:2,SINCE_THISMONTH:3,Filter_ORDER_LASTADD_active:true,Filter_ORDER_MOSTVIEWED_active:true,Filter_ORDER_MOSTPOPULAR_active:true,Filter_ORDER_MOSTCOMMENTED_active:true,Filter_ORDER_MOSTNOTATION_active:true,Filter_ORDER_LASTCONNECTED_active:true,Filter_ORDER_RANDOM_active:true,Filter_MEDIA:1,Filter_MEMBER:2,Filter_PLAYLIST:3,Filter_MYSCROON:4,convertOrderIntToHistValue:function(A){switch(A){case this.ORDER_LASTADD:return"Last";case this.ORDER_MOSTVIEWED:return"Viewed";case this.ORDER_MOSTPOPULAR:return"Popular";case this.ORDER_MOSTCOMMENTED:return"Commented";case this.ORDER_MOSTNOTATION:return"Notation";case this.ORDER_LASTCONNECTED:return"Connected";case this.ORDER_RANDOM:return"Random";case this.ORDER_ASCINGROUP:return"Asc";case this.ORDER_DESCINGROUP:return"Desc";default:return"Last"}},convertSinceIntToHistValue:function(A){switch(A){case this.SINCE_ALL:return"All";case this.SINCE_THISMONTH:return"Month";case this.SINCE_TODAY:return"Today";case this.SINCE_THISWEEK:return"Week";default:return"All"}},convertHistValueToSinceInt:function(A){A=(new String(A)).toLowerCase();switch(A){case"all":return this.SINCE_ALL;case"month":return this.SINCE_THISMONTH;case"today":return this.SINCE_TODAY;case"week":return this.SINCE_THISWEEK;default:return this.SINCE_ALL}},convertHistValueToOrderInt:function(A){A=(new String(A)).toLowerCase();switch(A){case"last":return this.ORDER_LASTADD;case"viewed":return this.ORDER_MOSTVIEWED;case"popular":return this.ORDER_MOSTPOPULAR;case"commented":return this.ORDER_MOSTCOMMENTED;case"notation":return this.ORDER_MOSTNOTATION;case"connected":return this.ORDER_LASTCONNECTED;case"random":return this.ORDER_RANDOM;case"asc":return this.ORDER_ASCINGROUP;case"desc":return this.ORDER_DESCINGROUP;default:return this.ORDER_LASTADD}},setFiltersValue:function(B,A,C){this.setOrderFilterValue(B,A);this.setSinceFilterValue(B,C)},setOrderFilterValue:function(B,A){A.innerHTML="";switch(B){case this.Filter_MEDIA:if(this.Filter_ORDER_LASTADD_active){A.appendChild(CW_util.createElementOption(this.ORDER_LASTADD,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_LASTADD)))}if(this.Filter_ORDER_MOSTVIEWED_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTVIEWED,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_MOSTVIEWED)))}if(this.Filter_ORDER_MOSTPOPULAR_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTPOPULAR,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_MOSTPOPULAR)))}if(this.Filter_ORDER_MOSTCOMMENTED_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTCOMMENTED,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_MOSTCOMMENTED)))}if(this.Filter_ORDER_MOSTNOTATION_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTNOTATION,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_MOSTNOTATION)))}if(this.Filter_ORDER_RANDOM_active){A.appendChild(CW_util.createElementOption(this.ORDER_RANDOM,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_RANDOM)))}break;case this.Filter_MEMBER:if(this.Filter_ORDER_LASTADD_active){A.appendChild(CW_util.createElementOption(this.ORDER_LASTADD,ComwebI18N_Manager.getFilterMemberOrder(this.ORDER_LASTADD)))}if(this.Filter_ORDER_MOSTVIEWED_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTVIEWED,ComwebI18N_Manager.getFilterMemberOrder(this.ORDER_MOSTVIEWED)))}if(this.Filter_ORDER_MOSTPOPULAR_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTPOPULAR,ComwebI18N_Manager.getFilterMemberOrder(this.ORDER_MOSTPOPULAR)))}if(this.Filter_ORDER_MOSTCOMMENTED_active){A.appendChild(CW_util.createElementOption(this.ORDER_MOSTCOMMENTED,ComwebI18N_Manager.getFilterMemberOrder(this.ORDER_MOSTCOMMENTED)))}if(this.Filter_ORDER_LASTCONNECTED_active){A.appendChild(CW_util.createElementOption(this.ORDER_LASTCONNECTED,ComwebI18N_Manager.getFilterMemberOrder(this.ORDER_LASTCONNECTED)))}if(this.Filter_ORDER_RANDOM_active){A.appendChild(CW_util.createElementOption(this.ORDER_RANDOM,ComwebI18N_Manager.getFilterMemberOrder(this.ORDER_RANDOM)))}break;case this.Filter_PLAYLIST:if(this.Filter_ORDER_LASTADD_active){A.appendChild(CW_util.createElementOption(this.ORDER_LASTADD,ComwebI18N_Manager.getFilterMediaOrder(this.ORDER_LASTADD)))}default:break}},setSinceFilterValue:function(A,B){B.innerHTML="";if(A==this.Filter_PLAYLIST){A=this.Filter_MEDIA}switch(A){case this.Filter_MEDIA:B.appendChild(CW_util.createElementOption(this.SINCE_ALL,ComwebI18N_Manager.getFilterMediaSince(this.SINCE_ALL)));B.appendChild(CW_util.createElementOption(this.SINCE_TODAY,ComwebI18N_Manager.getFilterMediaSince(this.SINCE_TODAY)));B.appendChild(CW_util.createElementOption(this.SINCE_THISWEEK,ComwebI18N_Manager.getFilterMediaSince(this.SINCE_THISWEEK)));B.appendChild(CW_util.createElementOption(this.SINCE_THISMONTH,ComwebI18N_Manager.getFilterMediaSince(this.SINCE_THISMONTH)));break;case this.Filter_MEMBER:B.appendChild(CW_util.createElementOption(this.SINCE_ALL,ComwebI18N_Manager.getFilterMemberSince(this.SINCE_ALL)));B.appendChild(CW_util.createElementOption(this.SINCE_TODAY,ComwebI18N_Manager.getFilterMemberSince(this.SINCE_TODAY)));B.appendChild(CW_util.createElementOption(this.SINCE_THISWEEK,ComwebI18N_Manager.getFilterMemberSince(this.SINCE_THISWEEK)));B.appendChild(CW_util.createElementOption(this.SINCE_THISMONTH,ComwebI18N_Manager.getFilterMemberSince(this.SINCE_THISMONTH)));break;default:break}}};var CW_Filter=new CW_Filter();function CW_Action_Player(){}CW_Action_Player.prototype={SERVLET_URI:"/comweb/xmlplaylist",PlayerPath:"swf/playerBrowser/moviePlayer.swf",JWPlayerPath:"swf/playerBrowser/JW/player.swf",BrowserHPath:"swf/playerBrowser/browser_small.swf",hashtableEqualizerParam:null,getEmbedCode:function(G,F,B){if(F==null){F=280}if(B==null){B=320}var A="";A+="<embed type='application/x-shockwave-flash' src='"+CW_config.webappUri+this.PlayerPath+"' ";A+=" id='moviePlayer'  flashvars='homeURL="+CW_config.webappUri;var E=this.getEqualizerParams();var C=E.getKeyArray();for(var D=0;D<C.length;D++){A+="&amp;"+C[D]+"="+E.get(C[D])}A+="&amp;xmlMediaList="+CW_config.webappDomaine+this.SERVLET_URI+"?playmedia="+G+"'";A+=" align='top' height='"+B+"' width='"+F+"'></embed>";return A},getJWPlayerEmbedCode:function(E,C,A,D,B){if(C==null){C=280}if(A==null){A=320}if(B=="1"){B="video"}else{B="image"}var F="";F+="<embed src='"+CW_config.webappUri+this.JWPlayerPath+"' width='"+C+"'height='"+A+"' bgcolor=''";F+="allowscriptaccess='always' allowfullscreen='true'";F+="flashvars='file="+CW_config.webappDomaine+"/comweb/media?uid="+E+"&amp;type="+B+"&amp;image="+D+"&amp;logo="+CW_config.webappUri+"img/watermarkSmall.png'/>";return F},getEqualizerParams:function(){if(this.hashtableEqualizerParam==null){this.hashtableEqualizerParam=new HashTable();this.hashtableEqualizerParam.put("equalizerColor0","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor1","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor2","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor3","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor4","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor5","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor6","0xFF0000");this.hashtableEqualizerParam.put("equalizerColor7","0xFF0000");this.hashtableEqualizerParam.put("equalizerNumCols","8");this.hashtableEqualizerParam.put("equalizerNumPerCol","20");this.hashtableEqualizerParam.put("equalizerSpace","2")}return this.hashtableEqualizerParam}};CW_Action_Player=new CW_Action_Player();function CW_Action_Message(){}CW_Action_Message.prototype={SERVLET_URI:"/comweb/mbox",MSG_ALERT_TYPE_COMMON:0,MSG_ALERT_TYPE_COMMENT_INFO:1,MSG_ALERT_TYPE_COMMENT_VALID:2,MSG_ALERT_TYPE_TAG_INFO:3,MSG_ALERT_TYPE_TAG_VALID:4,MSG_ALERT_TYPE_SUBSCRIPTION_INFO:5,MSG_ALERT_TYPE_SUBSCRIPTION_VALID:6,MSG_ALERT_TYPE_SUBSCRIPTION_MSG:7,MSG_ALERT_TYPE_UPLOAD_SUCCESS:8,MSG_ALERT_TYPE_UPLOAD_FAILED:9,MSG_ALERT_TYPE_UPLOAD_DUPLICATE:10,MSG_ALERT_TYPE_FRIEND_INFO:11,MSG_ALERT_TYPE_FRIEND_VALID:12,BOX_ID_INBOX:1,BOX_ID_OUTBOX:2,BOX_ID_SAVED:3,displayBoxMessages:function(C,A){var B=new Array();B.push("action=opn.mb");B.push("listing.page=1");B.push("listing.nbre.elements=999999");B.push("mb.folder="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"getMessage_"+A,B,null)},openMessage:function(D,C,B){var A=new Array();A.push("action=rd.msg");A.push("msg.uid="+C);A.push("mb.folder="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"openMessage",A,null)},savedMessage:function(D,C,B){var A=new Array();A.push("action=arch.msg");A.push("msg.uid="+C);A.push("mb.folder="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"openMessage",A,null)},deleteMessage:function(D,C,B){var A=new Array();A.push("action=del.msg");A.push("msg.uid="+C);A.push("mb.folder="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"openMessage",A,null)},validSendedMessageMail:function(H,F){var C=CW_util.getFormElement(F,"target").value;var B=new RegExp("[.,;:/|\\'\"]","g");var A=new RegExp("[ ]+","g");var E=(new String(C)).toLowerCase();E=E.replace(B," ");E=E.replace(A," ");if(E.indexOf(" ")==0){E=E.substring(1)}if(E.indexOf(" ")==E.length-1){E=E.substring(0,E.length-1)}var G=E.split(" ");for(var D=0;D<G.length;D++){F.appendChild(CW_util.createElementInputHidden("rcv.name",G[D]))}CW_comwebAjax.sendRequestForm(this.SERVLET_URI,H,null,"login",F,null)}};var CW_Action_Message=new CW_Action_Message();function CW_Action_Tag(){}CW_Action_Tag.prototype={SERVLET_URI:"/comweb/tag",displayMemberDayTag:function(C,B){var A=new Array();A.push("action=tag.day");A.push('listing.order=0');A.push("item.type="+CW_GlobalVar.ITEM_TYPE_USER);A.push("listing.nbre.elements="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"membertagday",A,null)},displayMediaDayTag:function(D,A,C){var B=new Array();B.push("action=tag.day");B.push('listing.order=0');B.push("item.type="+CW_GlobalVar.ITEM_TYPE_MEDIA);B.push("media.type="+A);B.push("listing.nbre.elements="+C);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"membertagday",B,null)},displayMediaSinceAllTag:function(C,A){var B=new Array();B.push("action=tags");B.push("item.type="+CW_GlobalVar.ITEM_TYPE_MEDIA);B.push("media.type="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"membertagday",B,null)},displayMemberSinceAllTag:function(B){var A=new Array();A.push("action=tags");A.push("item.type="+CW_GlobalVar.ITEM_TYPE_USER);CW_comwebAjax.sendRequest(this.SERVLET_URI,B,null,"membertagday",A,null)}};var CW_Action_Tag=new CW_Action_Tag();function CW_Action_Stat(){}CW_Action_Stat.prototype={SERVLET_URI:"/comweb/stat",Stat_TYPE_VIEWED:1,Stat_TYPE_NOTATION:2,Stat_TYPE_FAVOURITE:3,incrementMediaVisualisation:function(C,B){var A=new Array();A.push("action=stat");A.push("stat.type.uid="+this.Stat_TYPE_VIEWED);A.push("item.uid="+B);A.push("item.type.uid=2");CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"mediavisulaisation",A)},incrementMemberVisualisation:function(C,A){var B=new Array();B.push("action=stat");B.push("stat.type.uid="+this.Stat_TYPE_VIEWED);B.push("item.uid="+A);B.push("item.type.uid=1");CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"mediavisulaisation",B)},addMediaNote:function(D,C,A){var B=new Array();B.push("action=stat");B.push("stat.type.uid="+this.Stat_TYPE_NOTATION);B.push("item.uid="+C);B.push("item.type.uid=2");B.push("stat.hit="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"mediavisulaisation",B)}};var CW_Action_Stat=new CW_Action_Stat();function CW_Action_Site(){}CW_Action_Site.prototype={SERVLET_URI_CATEGORY:"/comweb/CategoryServlet",SERVLET_URI_COUNTRY:"/comweb/country",SERVLET_URI_SUBSCRIPTION:"/comweb/subscri",ACTION_Categories:"categories",ACTION_Category:"category",ACTION_CountryList:"country.list",ArrayAbusId_Media:null,ArrayAbusId_Comment:null,ArrayAbusId_Playlist:null,SITE_USER_ID:null,MEDIA_OF_THE_DAY_GROUP_ID:null,setAbusSelectValue:function(D,C){var B=new Array();switch(D){case CW_GlobalVar.ITEM_TYPE_MEDIA:if(this.ArrayAbusId_Media==null){this.ArrayAbusId_Media=new Array();this.ArrayAbusId_Media.push(1);this.ArrayAbusId_Media.push(2);this.ArrayAbusId_Media.push(3);this.ArrayAbusId_Media.push(4);this.ArrayAbusId_Media.push(5);this.ArrayAbusId_Media.push(6);this.ArrayAbusId_Media.push(9)}B=this.ArrayAbusId_Media;break;case CW_GlobalVar.ITEM_TYPE_COMMENT:if(this.ArrayAbusId_Comment==null){this.ArrayAbusId_Comment=new Array();this.ArrayAbusId_Comment.push(2);this.ArrayAbusId_Comment.push(3);this.ArrayAbusId_Comment.push(4);this.ArrayAbusId_Comment.push(5);this.ArrayAbusId_Comment.push(8);this.ArrayAbusId_Comment.push(9)}B=this.ArrayAbusId_Comment;break;case CW_GlobalVar.ITEM_TYPE_USER:if(this.ArrayAbusId_Comment==null){this.ArrayAbusId_Comment=new Array();this.ArrayAbusId_Comment.push(2);this.ArrayAbusId_Comment.push(3);this.ArrayAbusId_Comment.push(4);this.ArrayAbusId_Comment.push(5);this.ArrayAbusId_Comment.push(7);this.ArrayAbusId_Comment.push(9)}B=this.ArrayAbusId_Comment;break;case CW_GlobalVar.ITEM_TYPE_GROUP:if(this.ArrayAbusId_Playlist==null){this.ArrayAbusId_Playlist=new Array();this.ArrayAbusId_Playlist.push(1);this.ArrayAbusId_Playlist.push(2);this.ArrayAbusId_Playlist.push(3);this.ArrayAbusId_Playlist.push(4);this.ArrayAbusId_Playlist.push(5);this.ArrayAbusId_Playlist.push(6);this.ArrayAbusId_Playlist.push(9)}B=this.ArrayAbusId_Playlist;break;default:break}var E;for(var A=0;A<B.length;A++){E=B[A];C.appendChild(CW_util.createElementOption(E,ComwebI18N_Manager.getInappropriateFlag(E)))}},displayCategoryHome:function(D,C,B,A){this._displayCategory(D,C,B,true,A)},displayCategoryList:function(D,C,B,A){this._displayCategory(D,C,B,false,A)},_displayCategory:function(G,C,B,F,A){var D=new Array();D.push("action="+this.ACTION_Categories);D.push("lang.uid="+CW_internationalization.getUid());D.push("media.type="+C);if(F==true||F=="true"){D.push("category.home=1")}var E=null;if(B){E="CategoryHome"}CW_comwebAjax.sendRequest(this.SERVLET_URI_CATEGORY,G,E,"categoryHome",D,A)},displaySingleCategory:function(D,C,A){var B=new Array();B.push("action="+this.ACTION_Category);B.push("category.uid="+C);B.push("lang.uid="+CW_internationalization.getUid());CW_comwebAjax.sendRequest(this.SERVLET_URI_CATEGORY,D,null,"category",B,A)},displayAllUser:function(E,D,B,A){var C=new Array();C.push("action=user.all");C.push("listing.order="+D);C.push("listing.order="+CW_Filter_SINCE);CW_comwebAjax.sendRequest(CW_Action_User.SERVLET_URI,E,null,"categoryHome",C)},displayCountryList:function(C,A){var B=new Array();B.push("action="+this.ACTION_CountryList);B.push("lang.uid="+CW_internationalization.getUid());B.push("language.uid="+CW_internationalization.getUid());CW_comwebAjax.sendRequest(this.SERVLET_URI_COUNTRY,C,null,"countrylist",B,A)},getMediaOfTheDayParamAction:function(B){var A=new HashTable();A.put("action",CW_Action_Media.ACTION_MEDIA_GROUP);A.put("user.uid",CW_Action_Site.SITE_USER_ID);A.put("group.uid",CW_Action_Site.MEDIA_OF_THE_DAY_GROUP_ID);A.put("group.type",2);A.put("media.type",B);A.put("votd",1);return A},displayShowcaseMedia:function(F,A,C,E,B){var D=new Array();D.push("action="+CW_Action_Media.ACTION_MEDIA_GROUP);D.push("user.uid="+CW_Action_Site.SITE_USER_ID);D.push("group.uid="+CW_Action_Site.MEDIA_OF_THE_DAY_GROUP_ID);D.push("group.type="+2);D.push("media.type="+A);D.push("votd="+1);D.push("listing.nbre.elements="+E);D.push("listing.page="+C);CW_comwebAjax.sendRequest(CW_Action_Media.SERVLET_URI,F,null,"displayShowcaseMedia_"+A,D,B)},createSubscriptionByName:function(E,B,D,A){var C=new Array();C.push("action=mk.sbsc1");C.push("itm.nme="+B);C.push("item.type="+D);CW_comwebAjax.sendRequest(this.SERVLET_URI_SUBSCRIPTION,E,null,"suscribe",C,A)},createSubscriptionByUid:function(E,D,C,A){var B=new Array();B.push("action=mk.sbsc");B.push("item.uid="+D);B.push("item.type="+C);CW_comwebAjax.sendRequest(this.SERVLET_URI_SUBSCRIPTION,E,null,"suscribe",B,A)},createSubscriptionByName:function(E,B,D,A){var C=new Array();C.push("action=mk.sbsc1");C.push("itm.nme="+B);C.push("item.type="+D);CW_comwebAjax.sendRequest(this.SERVLET_URI_SUBSCRIPTION,E,null,"suscribe",C,A)},removeSubscription:function(E,D,C,A){var B=new Array();B.push("action=rm.sbsc");B.push("item.uid="+D);B.push("item.type="+C);CW_comwebAjax.sendRequest(this.SERVLET_URI_SUBSCRIPTION,E,null,"suscribe",B,A)},displaySubscriptionList:function(C,A){var B=new Array();B.push("action=get.sbsc");CW_comwebAjax.sendRequest(this.SERVLET_URI_SUBSCRIPTION,C,null,"suscriptionListing",B,A)}};var CW_Action_Site=new CW_Action_Site();function CW_Action_User(){}CW_Action_User.prototype={inscription1_mail:null,inscription1_nickname:null,inscription1_pass:null,tmp:null,COOKIE_NAME_SESSION:"USESSION",COOKIE_NAME_AutoConnect:"AutoConnect",SERVLET_URI:"/comweb/user",ACTION_USER_LOGIN:"user.login",ACTION_USER_LOGOUT:"user.logout",ACTION_USER:"user",ACTION_USER_REGISTRATION:"user.registration",ACTION_USER_REGISTRATION_DETAILS:"user.registration.details",ACTION_REGISTER_KEY:"user.reg.valid",Error_REGISTRATION_DUPLICATE_USERNAME:9,Error_LOGIN_USER_NOT_FOUND:13,Error_LOGIN_WRONG_PASSWORD:14,Error_LOGIN_ACCOUNT_LOCKED_OUT:15,Error_LOGIN_ACCOUNT_BARRED:16,Error_REGISTRATION_CAPTCHA:12,Error_LOGIN_NO_CONFIRMATION:27,ERROR_REGISTRATION_DUPLICATE_EMAIL:28,loginCheckAutoConnect:function(D,A){var C=new Array();C.push("action=chk.sess");C.push("user.fullview=1");var B=new HashTable();B.put("originalCallback",D);B.put("formName",A);CW_comwebAjax.sendRequest(this.SERVLET_URI,"CW_Action_User._loginCheck",null,"regkey",C,B)},deconnect:function(){var A=new Array();A.push("action=user.win.ntfy");CW_comwebAjax.sendRequest(this.SERVLET_URI,"CW_Action_User._deconnect",null,"deconnect",A,null)},_deconnect:function(B,A){},logout:function(C){var B=new Array();B.push("action="+this.ACTION_USER_LOGOUT);var A=new HashTable();A.put("originalCallback",C);CW_comwebAjax.sendRequest(this.SERVLET_URI,"CW_Action_User._logoutCheck",null,"login",B,A)},_logoutCheck:function(comwebBean,requestResume){var cookieHelper=new ComwebCookieHelper();cookieHelper.delCookie(this.COOKIE_NAME_SESSION);CW_config.setConnectedUser(null);loadMainPage();eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")},validLogin:function(D,C){if(CW_FormValidator.check(C)){var B=CW_util.getFormElement(C,"action");if(B==null){C.appendChild(CW_util.createElementInputHidden("action",this.ACTION_USER_LOGIN))}else{B.value=this.ACTION_USER_LOGIN}C.appendChild(CW_util.createElementInputHidden("user.fullview",1));var A=new HashTable();A.put("originalCallback",D);A.put("formName",C.name);CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._loginCheck",null,"login",C,A)}},_loginCheck:function(comwebBean,requestResume){var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];while(errorChilds.length>0){comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){case 18:break;case 32:break;case this.Error_LOGIN_USER_NOT_FOUND:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorLogin());break;case this.Error_LOGIN_WRONG_PASSWORD:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorLoginPassword());break;case this.Error_LOGIN_ACCOUNT_LOCKED_OUT:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorLoginLockedAccount());break;case this.Error_LOGIN_ACCOUNT_BARRED:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorLoginBarredAccount());break;case this.Error_LOGIN_NO_CONFIRMATION:showDialog_confirmationRegMail();break;default:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{try{var comwebBean_session=comwebBean.getSpecificChildren("session")[0];var comwebBean_user=comwebBean.getSpecificChildren("user")[0];CW_config.setConnectedUser(comwebBean_user)}catch(e){CW_logger.log("Error","CW_Action_User._loginCheck: Error while getting comwebBean_session, comwebBean_user:"+e);var form=document.forms[requestResume.hashTableStore.get("formName")];CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorLogin());return }eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")}},validRegistrationMail:function(C,B){if(CW_FormValidator.check(B)){var A=new HashTable();A.put("originalCallback",C);A.put("formName",B.name);CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._registrationMailChecked",null,"mediadsended",B,A)}},_registrationMailChecked:function(comwebBean,requestResume){var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];while(errorChilds.length>0){comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){default:CW_FormValidator.setErrorMessage(form,"user.email",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")}},validMediaSendedFriend:function(C,B){if(CW_FormValidator.check(B)){var A=new HashTable();A.put("originalCallback",C);A.put("formName",B.name);CW_comwebAjax.sendRequestForm(CW_Action_Media.SERVLET_URI,"CW_Action_User._mediaSendedFriendCheck",null,"mediadsended",B,A)}},_mediaSendedFriendCheck:function(comwebBean,requestResume){var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];while(errorChilds.length>0){comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){case 5:if(CW_internationalization.getValue("general.form.error5")){CW_FormValidator.setErrorMessage(form,"rmail",CW_internationalization.getValue("general.form.error5"))}else{CW_FormValidator.setErrorMessage(form,"rmail",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()))}break;default:CW_FormValidator.setErrorMessage(form,"rmail",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")}},validPasswordLost:function(C,A){if(CW_FormValidator.check(A)){var B=new HashTable();B.put("originalCallback",C);B.put("formName",A.name);CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._passwordLostCheck",null,"passwordlost",A,B)}},_passwordLostCheck:function(comwebBean,requestResume){var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];document.getElementById("validDialogBox").innerHTML='<input type="button"  onclick="javascript:sendPasswordLost();" value="envoyer" class="validDialogBoxButton">';while(errorChilds.length>0){comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){case this.Error_LOGIN_USER_NOT_FOUND:CW_FormValidator.setErrorMessage(form,"user.email",ComwebI18N_Manager.getErrorLoginLostPassword());break;default:CW_FormValidator.setErrorMessage(form,"user.email",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")}},validInscription1:function(G,A){if(CW_FormValidator.check(A)){var B=CW_util.getFormElement(A,"action");if(B==null){A.appendChild(CW_util.createElementInputHidden("action",this.ACTION_USER_REGISTRATION))}else{B.value=this.ACTION_USER_REGISTRATION}var H=true;var D=CW_util.getFormElement(A,"user.nickname");if(D==null){H=false;A.appendChild(CW_util.createElementInputHidden("user.nickname",CW_util.getFormElement(A,"user.username").value))}this.inscription1_mail=CW_util.getFormElement(A,"user.email").value;this.inscription1_nickname=CW_util.getFormElement(A,"user.nickname").value;this.inscription1_pass=CW_util.getFormElement(A,"user.password").value;var C=new HashTable();C.put("originalCallback",G);C.put("nicknamePresent",H);C.put("formName",A.name);try{var I=document.getElementById("validFormInscription1");var F=document.getElementById("ajaxLoaderImg");if(I!=null&&F!=null){I.style.display="none";F.style.display="block"}}catch(E){}CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._inscription1Check",null,"inscription",A,C)}},_inscription1Check:function(comwebBean,requestResume){try{this.tmp=comwebBean.getSpecificChildren("session")[0].getValues("userUid")}catch(e){}var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){try{var ElementValidForm=document.getElementById("validFormInscription1");var ElementAjaxLoaderImg=document.getElementById("ajaxLoaderImg");if(ElementValidForm!=null&&ElementAjaxLoaderImg!=null){ElementValidForm.style.display="block";ElementAjaxLoaderImg.style.display="none"}}catch(e){}var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];while(errorChilds.length>0){comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){case this.Error_REGISTRATION_DUPLICATE_USERNAME:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorInscriptionDuplicatedUsername());break;case this.ERROR_REGISTRATION_DUPLICATE_EMAIL:CW_FormValidator.setErrorMessage(form,"user.email",ComwebI18N_Manager.getErrorInscriptionDuplicatedEMail());break;default:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{var nicknamePresent=requestResume.hashTableStore.get("nicknamePresent");if(nicknamePresent==false||nicknamePresent=="false"){var form=document.forms[requestResume.hashTableStore.get("formName")];form.removeChild(CW_util.getFormElement(form,"user.nickname"))}try{var comwebBean_session=comwebBean.getSpecificChildren("session")[0];var cookieHelper=new ComwebCookieHelper();cookieHelper.setCookie(this.COOKIE_NAME_SESSION,comwebBean_session.getUid(),"/comweb/")}catch(e){CW_logger.log("Error","CW_Action_User._inscription1Check: Error while getting comwebBean_session:"+e)}eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")}},validInscription2:function(H,G){if(CW_FormValidator.check(G)){if(ComWeb_navigator.isSafari()){CW_util.getFormElement(G,"user.dob").value=CW_util.buildSQLDateFormat(CW_util.getFormElement(G,"year").value,CW_util.getFormElement(G,"month").value,CW_util.getFormElement(G,"day").value)}var D=CW_util.getFormElement(G,"action");if(D==null){G.appendChild(CW_util.createElementInputHidden("action",this.ACTION_USER_REGISTRATION_DETAILS))}else{D.value=this.ACTION_USER_REGISTRATION_DETAILS}var B=CW_util.getFormElement(G,"user.uid");if(B==null){G.appendChild(CW_util.createElementInputHidden("user.uid",this.tmp))}var C=new HashTable();C.put("originalCallback",H);C.put("formName",G.name);try{var A=document.getElementById("validFormInscription2");var F=document.getElementById("ajaxLoaderImg");if(A!=null&&F!=null){A.style.display="none";F.style.display="block"}document.getElementById("inscription2Feedback").innerHTML=""}catch(E){}CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._inscription2Check",null,"inscription",G,C)}},_inscription2Check:function(comwebBean,requestResume){var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];var login=CW_util.getFormElement(form,"user.username").value;while(errorChilds.length>0){try{var ElementValidForm=document.getElementById("validFormInscription2");var ElementAjaxLoaderImg=document.getElementById("ajaxLoaderImg");if(ElementValidForm!=null&&ElementAjaxLoaderImg!=null){ElementValidForm.style.display="block";ElementAjaxLoaderImg.style.display="none"}var errorTranslated=CW_internationalization.getValue("inscription.inscription2.error.pleaseRetry");if(errorTranslated==null||errorTranslated==""){errorTranslated="Une erreur est survenue pendant la phase d'inscription. Veuillez retenter votre inscription. "}document.getElementById("inscription2Feedback").innerHTML=errorTranslated}catch(e){}comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){case this.Error_REGISTRATION_CAPTCHA:var formImgArea=form.getElementsByTagName("img");var validatorDivArray=new Array();var isFind=false;for(var i=0;i<formImgArea.length&&!isFind;i++){if((new String(formImgArea.item(i).src)).indexOf("comweb/CaptchaService")>0){isFind=true;formImgArea.item(i).src="/comweb/CaptchaService?captcha.width=200&captcha.height=100&captcha.background=FFFFFF&captcha.color=000000&user.login="+login+"&site.uid="+CW_config.serviceId+"&cache="+(new Date()).getTime()}}CW_FormValidator.setErrorMessage(form,"user.captcha",ComwebI18N_Manager.getErrorInscriptionCaptcha());break;default:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{eval(requestResume.hashTableStore.get("originalCallback")+"(comwebBean ,requestResume);")}},updateMyProfile:function(C,D){if(CW_FormValidator.check(C)){var B=CW_util.getFormElement(C,"action");if(B==null){C.appendChild(CW_util.createElementInputHidden("action","user.profile.update"))}else{B.value="user.profile.update"}var A=new HashTable();A.put("formName",C.name);A.put("originalCallback",D);CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._updateMyProfile",null,"modificationProfil",C,A)}},updateMyProfileDetail:function(C){if(CW_FormValidator.check(C)){var B=CW_util.getFormElement(C,"action");if(B==null){C.appendChild(CW_util.createElementInputHidden("action","user.profile.details"))}else{B.value="user.profile.details"}var A=new HashTable();A.put("formName",C.name);CW_comwebAjax.sendRequestForm(this.SERVLET_URI,"CW_Action_User._updateMyProfile",null,"modificationProfil",C,A)}},_updateMyProfile:function(comwebBean,requestResume){var errorChilds=comwebBean.getSpecificChildren("error");if(errorChilds.length>0){var comwebBeanError="";var form=document.forms[requestResume.hashTableStore.get("formName")];while(errorChilds.length>0){comwebBeanError=errorChilds.shift();switch(comwebBeanError.getUid()){default:CW_FormValidator.setErrorMessage(form,"user.username",ComwebI18N_Manager.getErrorUid(comwebBeanError.getUid()));break}}}else{var originalCallback=requestResume.hashTableStore.get("originalCallback");if(originalCallback!=null){eval(originalCallback+"(comwebBean ,requestResume);")}else{var feedback=document.getElementById("feedback");feedback.style.display="block";feedback.innerHTML=CW_internationalization.getValue("general.modif.comfirm")}}},validRegisterKey:function(A){var B=new Array();B.push("action="+this.ACTION_REGISTER_KEY);B.push("user.reg.key="+A);B.push("user.fullview=1");CW_comwebAjax.sendRequest(this.SERVLET_URI,"inscription4Load",null,"regkey",B,null)},displayUser:function(G,F,A,B,D){var C=new Array();C.push("action="+this.ACTION_USER);C.push("user.username="+F);C.push("user.fullview="+D);C.push("user.profil=1");var E="member";if(B==false||B=="false"){E=null}CW_comwebAjax.sendRequest(this.SERVLET_URI,G,E,"member",C,A)},displayLastUserList:function(F,E,C,A){var D=new Array();D.push("action=user.all");D.push("listing.since="+CW_Filter.SINCE_ALL);D.push("listing.order="+CW_Filter.ORDER_LASTADD);D.push("listing.nbre.elements="+E);D.push("listing.page=1");var B="lastUser_List";if(C==false||C=="false"){historyString=null}CW_comwebAjax.sendRequest(this.SERVLET_URI,F,historyString,"LastUserList",D,A)},displayMostUser:function(C,B){var A=new Array();A.push("listing.order="+CW_Filter.ORDER_MOSTVIEWED);A.push("listing.since="+CW_Filter.SINCE_ALL);A.push("listing.nbre.elements="+B);A.push("listing.page=1");A.push("action=user.all");CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"member",A)},displayUserTag:function(C,A){var B=new Array();B.push("action="+CW_Action_Media.ACTION_ITEM_TAG);B.push("user.uid="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"usertags",B)},displayUserStat:function(B){var A=new Array();A.push("action=user.stats");A.push("user.fullview=1");CW_comwebAjax.sendRequest(this.SERVLET_URI,B,null,"userstats",A)},changeAvatar:function(C,A){var B=new Array();B.push("media.uid="+A);B.push("action=user.avatar");CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"changeAvatar",B)},addFriend:function(C,A){var B=new Array();B.push("action=add.friend");B.push("user.uid="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"addFriend",B)},addFriendArray:function(D,A){var C=new Array();C.push("action=add.friend");if(A.length>0){for(var B=0;B<A.length;B++){C.push("user.uid="+A[B])}}CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"addFriendArray",C)},rmvFriendArray:function(D,A){var C=new Array();C.push("action=rem.friend");if(A.length>0){for(var B=0;B<A.length;B++){C.push("user.uid="+A[B])}}CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"addFriendArray",C)},rmvFriend:function(C,A){var B=new Array();B.push("action=rem.friend");B.push("user.uid="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"rmvFriend",B)},blockUser:function(C,A){var B=new Array();B.push("action=blk.usr");B.push("user.uid="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"blockUser",B)},unBlockUser:function(C,A){var B=new Array();B.push("action=unblk.usr");B.push("user.uid="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"unblockUser",B)},deletePlaylist:function(C,A){var B=new Array();B.push("action=del.pl");B.push("group.uid="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"deletePlaylist",B)},getUserPlaylist:function(C,A){var B=new Array();B.push("action=get.user.pl");CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"getUserPlaylist",B,A)},displayPlaylist:function(D,B,A){var C=new Array();C.push("action=get.grp");C.push("group.uid="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"getPlaylist",C,A)}};var CW_Action_User=new CW_Action_User();function CW_Action_Media(){}CW_Action_Media.prototype={SERVLET_URI:"/comweb/MediaServlet",ACTION_MEDIA:"media",ACTION_MEDIA_ALL:"media.all",ACTION_MEDIA_USER:"media.user",ACTION_MEDIA_GROUP:"media.group",ACTION_MEDIA_CATEGORY:"media.category",ACTION_MEDIA_TAG:"media.tag",ACTION_ITEM_COMMENT:"item.comment",ACTION_ITEM_TAG:"item.tag",ACTION_ADD_COMMENT:"add.comment",ACTION_ADD_TAG:"add.tag",ACTION_REMOVE_MEDIA:"remove.media",ACTION_REMOVE_COMMENT:"remove.comment",ACTION_REMOVE_TAG:"remove.tag",ACTION_ADD_MEDIAGROUP:"add.media.group",ACTION_REMOVE_MEDIAGROUP:"remove.media.group",Media_TYPE_VIDEO:1,Media_TYPE_MUSIC:2,Media_TYPE_IMAGE:3,deleteMedia:function(C,B){var A=new Array();A.push("action="+this.ACTION_REMOVE_MEDIA);A.push("media.uid="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"deletemedia_+mediaId",A)},deleteComment:function(D,A,C){var B=new Array();B.push("action="+this.ACTION_REMOVE_COMMENT);B.push("media.uid="+C);B.push("comment.uid="+A);B.push("listing.page=1");B.push("listing.nbre.elements=0");CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"deletecomment_"+C,B)},isFavMedia:function(C,B){var A=new Array();A.push("action=chk.favr");A.push("media.uid="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"isfav",A)},addFavMedia:function(C,B){var A=new Array();A.push("action=add.favr");A.push("media.uid="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"addfav",A)},remFavMedia:function(C,B){var A=new Array();A.push("action=rem.favr");A.push("media.uid="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"remfav",A)},remFavMediaArray:function(D,A){var C=new Array();C.push("action=rem.favr");if(A.length>0){for(var B=0;B<A.length;B++){C.push("media.uid="+A[B])}}CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"remfav",C)},displayMediaComments:function(F,D,C,E,A){if(C==null){C=1}if(E==null){E=6}var B=new Array();B.push("action="+this.ACTION_ITEM_COMMENT);B.push("media.uid="+D);B.push("listing.nbre.elements="+E);B.push("listing.page="+C);if(CW_config.hasConnectedUser()){B.push("user.uid="+CW_config.getConnectedUser().getUid())}else{B.push("user.uid=-1")}CW_comwebAjax.sendRequest(this.SERVLET_URI,F,null,"mediacomments",B,A)},displayMediaTag:function(D,C,A){var B=new Array();B.push("action="+this.ACTION_ITEM_TAG);B.push("media.uid="+C);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"mediatags",B,A)},displayPlaylistTag:function(D,B,A){var C=new Array();C.push("action=grp.tag");C.push("group.uid="+B);CW_comwebAjax.sendRequest(this.SERVLET_URI,D,null,"mediatags",C,A)},displayTagMediaList:function(F,C,E,B,A){var D=new Array();D.push("action="+this.ACTION_MEDIA_TAG);D.push("tag.uid="+C);D.push("listing.page=1");D.push("listing.nbre.elements="+E);D.push("media.type="+B);D.push("listing.order="+CW_Filter.ORDER_LASTADD);D.push("listing.since="+CW_Filter.SINCE_ALL);CW_comwebAjax.sendRequest(this.SERVLET_URI,F,null,"mediaTagList",D,A)},displayMediaSiteList:function(E,C,A,D){var B=new Array();B.push("listing.order="+C);B.push("listing.since="+A);B.push("media.type="+D);B.push("action="+this.ACTION_MEDIA_ALL);CW_comwebAjax.sendRequest(this.SERVLET_URI,E,"Media_Listing","medialisiting",B)},displayMediaCategoryList:function(B){var A=new Array();A.push("listing.order="+CW_Filter.ORDER_LASTADD);A.push("listing.since="+CW_Filter.SINCE_ALL);A.push("media.type="+CW_Action_Media.Media_TYPE_VIDEO);A.push("action="+this.ACTION_MEDIA_ALL);CW_comwebAjax.sendRequest(this.SERVLET_URI,B,"Media_Listing","medialisiting",A)},displayMedia:function(F,E,A,B){var C=new Array();C.push("media.uid="+E);C.push("action="+this.ACTION_MEDIA);var D="media";if(B==false||B=="false"){D=null}CW_comwebAjax.sendRequest(this.SERVLET_URI,F,D,"media",C,A)},displayMostViewedMedia:function(C,A){var B=new Array();B.push("listing.order="+CW_Filter.ORDER_LASTADD);B.push("listing.since="+CW_Filter.SINCE_ALL);B.push("listing.nbre.elements=1");B.push("listing.page=1");B.push("media.type="+A);B.push("action="+this.ACTION_MEDIA_ALL);CW_comwebAjax.sendRequest(this.SERVLET_URI,C,null,"mostViewed",B)},displayMediaList:function(H,G,E,B,D,A){var C=new Array();C.push("listing.since="+B);C.push("listing.order="+D);C.push("listing.nbre.elements="+G);C.push("listing.page=1");C.push("media.type="+E);C.push("action="+this.ACTION_MEDIA_ALL);var F="Media_List";if(A==false||A=="false"){F=null}CW_comwebAjax.sendRequest(this.SERVLET_URI,H,F,"LastMediaList",C)},displayLastMediaList:function(G,F,C,A,E){var B=new Array();B.push("listing.since="+CW_Filter.SINCE_ALL);B.push("listing.order="+CW_Filter.ORDER_LASTADD);B.push("listing.nbre.elements="+F);B.push("listing.page=1");B.push("media.type="+C);B.push("action="+this.ACTION_MEDIA_ALL);var D="Last_Media_List";if(A==false||A=="false"){D=null}CW_comwebAjax.sendRequest(this.SERVLET_URI,G,D,"LastMediaList",B,E)},displayAllMediaUser:function(E,A,C,D){var B=new Array();B.push("listing.page=1");B.push("listing.nbre.elements="+D);B.push("media.type="+A);B.push("user.uid="+C);B.push("action=media.user");CW_comwebAjax.sendRequest(this.SERVLET_URI,E,null,"mediaUser",B)},addMediaInPlayList:function(E,B,C,A){var D=new Array();D.push("action=add.media.group");D.push("group.uid="+B);D.push("media.uid="+C);D.push("media.type="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,E,null,"addMediaInPlaylist",D)},addMediaArrayInPlaylist:function(F,D,B,A){var E=new Array();E.push("action=add.media.group");E.push("group.uid="+D);E.push("media.type="+A);if(B.length>0){for(var C=0;C<B.length;C++){E.push("media.uid="+B[C])}}CW_comwebAjax.sendRequest(this.SERVLET_URI,F,null,"addMediaInPlaylist",E)},rmvMediaFromPlaylist:function(E,C,B,A){var D=new Array();D.push("action=remove.media.goup");D.push("group.uid="+C);D.push("media.uid="+B);D.push("media.type="+A);CW_comwebAjax.sendRequest(this.SERVLET_URI,E,null,"rmvMediaFromPlaylist",D)},rmvMediaArrayFromPLaylist:function(F,D,B,A){var E=new Array();E.push("action=remove.media.group");E.push("group.uid="+D);E.push("media.type="+A);if(B.length>0){for(var C=0;C<B.length;C++){E.push("media.uid="+B[C])}}CW_comwebAjax.sendRequest(this.SERVLET_URI,F,null,"addMediaInPlaylist",E)},displayMediaFromPlaylist:function(I,D,G,A,E,B,H,F){var C=new Array();C.push("action=media.group");C.push("group.uid="+D);C.push("user.uid="+G);C.push("media.type="+A);C.push("group.type=0");C.push("listing.page=1");C.push("listing.since="+E);C.push("listing.order="+B);if(H!=null){C.push("listing.nbre.elements="+H)}CW_comwebAjax.sendRequest(this.SERVLET_URI,I,null,"displayPlaylistMedias",C,F)},displaySimilarMedia:function(H,C,B,A,D,G,E){var F=new Array();F.push("action=media.similar");F.push("media.uid="+C);F.push("listing.page=1");F.push("isting.since="+A);F.push("listing.order="+D);F.push("listing.nbre.elements="+G);CW_comwebAjax.sendRequest(this.SERVLET_URI,H,null,"displaySimilarMedia",F,E)}};var CW_Action_Media=new CW_Action_Media();function CW_Page_Manager(){}CW_Page_Manager.prototype={getListingParam:function(F){var D=document.forms[F];var C=CW_util.getFormElement(D,"listing.page").value;var A=document.getElementById(D.pageDivId.value);var E=A.getElementsByTagName("form");var G="listing.page="+C+"&listing.nbre.elements="+D.nbElementByPage.value;for(var B=0;B<E.length;B++){if(E.item(B).name!=F){G+="&"+Form.serialize(E.item(B))}}return G},changePage:function(E,G){var D=document.forms[G];if(E!=null&&parseInt(E)!=NaN){CW_util.getFormElement(D,"listing.page").value=E}var A=document.getElementById(D.pageDivId.value);var F=A.getElementsByTagName("form");var H="_=1";for(var B=0;B<F.length;B++){H+="&"+Form.serialize(F.item(B))}var C=new HashTable();C.put("originalCallback",D.callbackDisplayContent.value);C.put("pagerDivId",D.pagerDivId.value);C.put("pagerFormName",G);CW_comwebAjax._sendRequestQueryString(D.servletURI.value,D.callbackDisplayContent.value,G,G,H,C)},changePageCheck:function(C,N){var O=N.hashTableStore.get("pagerFormName");var F=document.forms[O];CW_logger.log(CW_logger.LEVEL_INFORMATION,"CW_Page_Manager.changePageCheck() :"+O+", "+F);var J=document.getElementById(F.pagerDivId.value);var M=(new String(N.queryString)).replace("listing.page=","listing_page=").replace("listing.nbre.elements=","listing_nbre_elements=");var H=parseInt(M.toQueryParams().listing_page);var K=parseInt(M.toQueryParams().listing_nbre_elements);try{CW_util.getFormElement(F,"listing.page").value=H}catch(I){CW_logger.log(CW_logger.LEVEL_ERROR,"CW_Page_Manager.changePageCheck() :"+O+", can t change the listing.page input value")}var G=null;var L=J.getElementsByTagName("div");for(var E=0;E<L.length;E++){if(L.item(E).id=="pagercontent_dyn"){G=L.item(E)}}if(G==null){G=document.getElementById("pagercontent_dyn")}var D=C.getSpecificChildren("list")[0].getTotalNbItem();if((D%K)==0){maxpage=parseInt(D/K)}else{maxpage=parseInt(D/K)+1}writtedPage=H;if(((H)%ComwebPageGlobal.NB_PAGE)==0){writtedPage=(H-ComwebPageGlobal.NB_PAGE)+1}else{writtedPage=parseInt((H-((H)%ComwebPageGlobal.NB_PAGE))+1)}var B="<ul id='pager_id' class='pager'><li class='titlePager'>"+ComwebI18N_Manager.getPagerTitle()+"</li>";if(writtedPage>ComwebPageGlobal.NB_PAGE){B+="<li><a href='javascript:CW_Page_Manager.changePage("+(writtedPage-1)+',"'+O+"\")'>&lt;&lt;</a></li>"}for(var A=1;A<=ComwebPageGlobal.NB_PAGE;A++,writtedPage++){if(writtedPage<=maxpage){if(writtedPage==H){B+="<li class='currentElementPager'>"+writtedPage+"</li>"}else{B+="<li><a href='javascript:CW_Page_Manager.changePage("+writtedPage+',"'+O+"\")'>"+writtedPage+"</a></li>"}}}if(((writtedPage-1)*K)<=D){B+="<li><a href='javascript:CW_Page_Manager.changePage("+writtedPage+',"'+O+"\")'>&gt;&gt;</a></li>"}B+="</ul>";G.innerHTML=B;CW_logger.log(CW_logger.LEVEL_INFORMATION,"CW_Page_Manager.changePageCheck() (END):"+O+", "+F)}};var CW_Page_Manager=new CW_Page_Manager();function ComwebPager(E,B,D,C,A){this.initialize(E,B,D,C,A)}ComwebPager.prototype={pageDivId:null,callbackDisplayContent:null,pagerDivId:null,pagerName:null,hashtableRequestParameters:null,requestServletUri:null,initialize:function(E,B,D,C,A){this.pageDivId=E;this.callbackDisplayContent=D;this.pagerDivId=B;this.requestServletUri=C;this.hashtableRequestParameters=A;this.pagerName="pager_"+(new Date()).getTime()},setValues:function(pageDivId,pageContentDivId,callbackDisplayContent,pagerDivId,pageName){this.pageDivId=pageDivId;this.callbackDisplayContent=callbackDisplayContent;this.pagerDivId=pagerDivId;this.requestServletUri=eval("ComwebPager_"+pageName).servletURI;this.pagerName=pageName},display:function(){var contentForm="";var page=1;if(arguments.length==2){if(parseInt(arguments[0])!=NaN){page=arguments[0];if(arguments[1]!=null&&arguments[1] instanceof HashTable){this.hashtableRequestParameters=arguments[1]}else{this.hashtableRequestParameters=new HashTable()}var pagerObject=eval("ComwebPager_"+this.pagerName);this.hashtableRequestParameters.put("action",pagerObject.action);this.hashtableRequestParameters.put("listing.nbre.elements",pagerObject.nbElement);this.hashtableRequestParameters.put("listing.page",page)}}contentForm+="<form name='"+this.pagerName+"' >";contentForm+="<input type='hidden' disabled='disabled' name='pageDivId' value='"+this.pageDivId+"' />";contentForm+="<input type='hidden' disabled='disabled' name='callbackDisplayContent' value=\""+this.callbackDisplayContent+'" />';contentForm+="<input type='hidden' disabled='disabled' name='servletURI' value='"+this.requestServletUri+"' />";contentForm+="<input type='hidden' disabled='disabled' name='pagerDivId' value='"+this.pagerDivId+"' />";if(this.hashtableRequestParameters!=null){var keyArray=this.hashtableRequestParameters.getKeyArray();for(var i=0;i<keyArray.length;i++){contentForm+="<input type='hidden' name='"+keyArray[i]+"' value='"+this.hashtableRequestParameters.get(keyArray[i])+"' />";if(keyArray[i]=="listing.page"){page=this.hashtableRequestParameters.get(keyArray[i])}}}contentForm+="</form>";contentForm+="<div id='pagercontent_dyn'> </div>";document.getElementById(this.pagerDivId).innerHTML=contentForm;CW_Page_Manager.changePage(page,this.pagerName)}};function _ComwebPager(C,A,B){this.nbElement=C;this.action=A;this.servletURI=B}var ComwebPager_allmember={nbElement:5,action:"user.all",servletURI:CW_Action_User.SERVLET_URI};var ComwebPager_categorylist={nbElement:5,action:"media.category",servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_medialist={nbElement:5,action:CW_Action_Media.ACTION_MEDIA_ALL,servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_mediaofthedaylist={nbElement:5,action:CW_Action_Media.ACTION_MEDIA_GROUP,servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_mycount_video={nbElement:5,action:CW_Action_Media.ACTION_MEDIA_USER,servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_media_comments={nbElement:5,action:CW_Action_Media.ACTION_ITEM_COMMENT,servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_user_comments={nbElement:5,action:CW_Action_Media.ACTION_ITEM_COMMENT,servletURI:CW_Action_User.SERVLET_URI};var ComwebPager_mediataglist={nbElement:10,action:CW_Action_Media.ACTION_MEDIA_TAG,servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_membertaglist={nbElement:10,action:"user.tag",servletURI:CW_Action_User.SERVLET_URI};var ComwebPager_searchmember={nbElement:10,action:"",servletURI:"/comweb/search"};var ComwebPager_searchmedia={nbElement:10,action:"",servletURI:"/comweb/search"};var ComwebPager_top_medialist={nbElement:5,action:CW_Action_Media.ACTION_MEDIA_GROUP,servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_mycount_friends={nbElement:10,action:"user.friends",servletURI:"/comweb/user"};var ComwebPager_mycount_favorite={nbElement:10,action:"get.favr",servletURI:CW_Action_Media.SERVLET_URI};var ComwebPager_allplaylist={nbElement:5,action:"get.pl",servletURI:CW_Action_User.SERVLET_URI};var ComwebPager_mailbox={nbElement:999999,action:"opn.mb",servletURI:"/comweb/mbox"};var ComwebPager_mycount_playlist={nbElement:5,action:"get.user.pl",servletURI:CW_Action_User.SERVLET_URI};var ComwebPager_mycount_playlist_edit={nbElement:3,action:"media.group",servletURI:CW_Action_Media.SERVLET_URI};