function HashTableContent(A,B){this.key=A;this.object=B}function HashTable(){this.storage=new Array()}HashTable.prototype.storage=null;HashTable.prototype={containsKey:function(B){var A=false;for(i=0;i<this.storage.length&&!A;i++){A=(this.storage[i].key==B)}return A},containsValue:function(B){var A=false;for(i=0;i<this.storage.length&&!A;i++){A=(this.storage[i].object==B)}return A},isEmpty:function(){return this.storage.length==0},put:function(A,B){this.storage.push(new HashTableContent(A,B))},remove:function(B){var C=new Array();while(this.storage.length>0){var A=this.storage.pop();if(A.key!=B){C.push(A)}}this.storage=C},get:function(B){var A=null;for(i=0;i<this.storage.length&&A==null;i++){if(this.storage[i].key==B){A=this.storage[i].object}}return A},getKey:function(B){var A=null;for(i=0;i<this.storage.length&&A==null;i++){if(this.storage[i].object==B){A=this.storage[i].key}}return A},toString:function(){var A="";for(i=0;i<this.storage.length;i++){A=A+this.storage[i].key+" "+this.storage[i].object+" , "}return A},getKeyArray:function(){var A=new Array();for(i=0;i<this.storage.length;i++){A.push(this.storage[i].key)}return A},toArray:function(){var A=new Array();for(i=0;i<this.storage.length;i++){A.push(this.storage[i].key+"="+this.storage[i].object)}return A}};function CW_util(){}CW_util.prototype={hideDiv:function(B){for(var C=0;C<arguments.length;C++){var A=arguments[C];try{document.getElementById(A).style.display="none"}catch(D){}}},showDiv:function(B){for(var C=0;C<arguments.length;C++){var A=arguments[C];try{document.getElementById(A).style.display="block"}catch(D){}}},encodeUTF8:function(B){B=B.replace(/\r\n/g,"\n");var A="";for(var D=0;D<B.length;D++){var C=B.charCodeAt(D);if(C<128){A+=String.fromCharCode(C)}else{if((C>127)&&(C<2048)){A+=String.fromCharCode((C>>6)|192);A+=String.fromCharCode((C&63)|128)}else{A+=String.fromCharCode((C>>12)|224);A+=String.fromCharCode(((C>>6)&63)|128);A+=String.fromCharCode((C&63)|128)}}}return A},decodeUTF8:function(A){if(A==null||A==""){return""}var B="";var C=0;var D=c1=c2=0;while(C<A.length){D=A.charCodeAt(C);if(D<128){B+=String.fromCharCode(D);C++}else{if((D>191)&&(D<224)){c2=A.charCodeAt(C+1);B+=String.fromCharCode(((D&31)<<6)|(c2&63));C+=2}else{c2=A.charCodeAt(C+1);c3=A.charCodeAt(C+2);B+=String.fromCharCode(((D&15)<<12)|((c2&63)<<6)|(c3&63));C+=3}}}return B},toNode:function(A){var J=new DOMImplementation();var I=new RegExp("<.+>","i");if(!I.test(A)){return document.createTextNode((J.unescapeString(A)))}var G;try{G=J.loadXML(A).getChildNodes().item(0)}catch(F){CW_logger.log("Error","CW_util.toNode: cant parse given content:"+F);return }var C=document.createElement(G.getNodeName());var H=G.getAttributes()._nodes;var D;for(E=0;E<H.length;E++){D=H[E];C.setAttribute(D.getName(),D.getValue())}var B=G.getChildNodes();for(var E=0;E<B.length;E++){try{C.appendChild(this.toNode(B.item(E).getXML()))}catch(F){}}return C},setSelectDateContent:function(C,G,A){var F=document.getElementById(G);var B=document.getElementById(C);for(var H=0;H<12;H++){F.appendChild(this.createElementOption(H,ComwebI18N_Manager.getMonth(H)))}var E=(new Date()).getFullYear();for(var D=0;D<90;D++,E--){B.appendChild(this.createElementOption(E,E))}this._setSelectDayContent(A,31)},createElementInputHidden:function(B,C){var A=document.createElement("input");A.setAttribute("name",B);A.setAttribute("value",C);A.setAttribute("type","hidden");return A},createElementOption:function(B,C){var A=document.createElement("option");A.setAttribute("value",B);if(C!=null&&C!=""){A.appendChild(document.createTextNode(C))}return A},createElementDivId:function(A){return CW_util.toNode("<div id='"+A+"'></div>")},buildSQLDateFormat:function(B,C,A){B=parseInt(B);C=parseInt(C)+1;A=parseInt(A);if(C<10){C="0"+C}if(A<10){A="0"+A}return B+"-"+C+"-"+A+" 00:00:00"},buildDateFromSqlDate:function(G){var A=new Date();try{var D=new RegExp("^[0]+","g");A.setFullYear(parseInt(G.substr(0,4)));A.setMonth(parseInt(G.substr(5,2).replace(D,""))-1);A.setDate(parseInt(G.substr(8,2).replace(D,"")));if(G.length>11){var B=G.substr(11,2);if(B=="00"){B=0}else{B=parseInt(B.replace(D,""))}A.setHours(B);var E=G.substr(14,2);if(E=="00"){E=0}else{E=parseInt(E.replace(D,""))}A.setMinutes(E);var C=G.substr(17,2);if(C=="00"){C=0}else{C=parseInt(C.replace(D,""))}A.setSeconds(C)}return A}catch(F){CW_logger.log("Error","ComwebBean.js parseDate cant parse the given date:"+G+" (normal format:2007-03-22 10:18:03)");return null}},isValidDate:function(C,E,A){C=parseInt(C);E=parseInt(E);A=parseInt(A);try{var B=new Date(C,E,A);return(B.getDate()==A)}catch(D){return false}},scroolToAnchor:function(A,B){try{window.scrollTo(0,(this.getElementAnchorInDivByName(A,"a",B)).offsetTop)}catch(C){}},scroolToDiv:function(A){try{window.scrollTo(0,document.getElementById(A).offsetTop)}catch(B){}},getElementDivByName:function(B){var C=document.getElementsByTagName("div");var A=(C.length);for(i=0;i<A;i++){if((C[i].getAttribute("name"))==B){return C[i]}}return null},getElementDivByNameFromParent:function(C,D){var B=C.getElementsByTagName("div");var A=(B.length);for(i=0;i<A;i++){if((B[i].getAttribute("name"))==D){return B[i]}}return null},getElementAnchorInDivByName:function(B,C,D){var A=document.getElementById("masterPage").getElementsByTagName("a");for(var E=0;E<A.length;E++){try{if(A.item(E).name==D){return A.item(E)}}catch(F){alert("Error:\n"+F)}}return null},setSelectedIndex:function(A,D){try{var B=A.options;for(var C=0;C<B.length;C++){if(B[C].value==D){A.selectedIndex=C;return }}}catch(E){}},getFormElementValue:function(B,A){try{this.getFormElement(B,A).value}catch(C){return null}},getFormElement:function(D,A){var B=D.elements;for(var C=0;C<B.length;C++){if(B[C].name==A){return B[C]}}return null},getDateShort:function(A){return ComwebI18N_Manager.convertDateInShortFormat(A)},describeError:function(B){var A="";A=A+"name: "+B.name;A=A+"|| description: "+B.description;A=A+"|| message: "+B.message;A=A+"|| number: "+B.number;return A},getImgNode:function(C,A){if(C.hasChildNodes()){var F=C.childNodes;var E=null;for(var B=0;B<F.length&&E==null;B++){E=this.getImgNode(F.item(B),A)}return E}else{try{if(C.nodeName=="img"||C.nodeName=="IMG"){CW_logger.log(CW_logger.LEVEL_INFORMATION,"loadBrick_video_searchImg , node.nodeName:"+C.nodeName);CW_logger.log(CW_logger.LEVEL_INFORMATION,"loadBrick_video_searchImg , node.attributes.getNamedItem(src).nodeValue:"+C.attributes.getNamedItem("src").nodeValue);if((new String(C.attributes.getNamedItem("src").nodeValue)).indexOf(A)>=0){return C}return null}}catch(D){}}return null},setCountryListContent:function(B,A){var C=new HashTable();C.put("selectCountryListId",A);C.put("formName",B);CW_Action_Site.displayCountryList("CW_util._displayCountryListContent",C)},_displayCountryListContent:function(B,G){var F=G.hashTableStore;var H=F.get("formName");var A=F.get("selectCountryListId");var E=CW_util.getFormElement(document.forms[H],A);var D=B.getSpecificChildren("country");var I=null;for(var C=0;C<D.length;C++){I=D[C];E.appendChild(this.createElementOption(I.getUid(),I.getCountryName()))}},setLangListContent:function(B,A){var C=new HashTable();C.put("selectLangListId",A);C.put("formName",B);CW_Action_Site.displayLangList("CW_util._displayLangListContent",C)},_displayLangListContent:function(B,H){var F=H.hashTableStore;var I=F.get("formName");var A=F.get("selectLangListId");var E=CW_util.getFormElement(document.forms[I],selectLangListId);var G=B.getSpecificChildren("lang");var D=null;for(var C=0;C<G.length;C++){D=G[C];E.appendChild(D.getUid(),D.getCountryName())}},setCategoryListContent:function(B,E,D,A){var C=new HashTable();C.put("selectCategoryListId",E);C.put("formName",B);C.put("selectedIndex",A);CW_Action_Site.displayCategoryList("CW_util._displayCategoryListContent",D,false,C)},_displayCategoryListContent:function(B,I){var H=I.hashTableStore;var K=H.get("formName");var A=H.get("selectedIndex");var D=H.get("selectCategoryListId");var G=CW_util.getFormElement(document.forms[K],D);var E=B.getSpecificChildren("category");var J=null;for(var C=0;C<E.length;C++){J=E[C];if(J.getTitle()=="null"||J.getTitle()==null||J.getTitle()==""){G.appendChild(this.createElementOption(J.getUid(),J.getUid()))}else{G.appendChild(this.createElementOption(J.getUid(),J.getTitle()))}}try{CW_util.setSelectedIndex(G,A)}catch(F){}},setUserPlaylistContent:function(C,B,A){var D=new HashTable();D.put("selectPlaylistListId",B);D.put("formName",C);D.put("selectedIndex",A);CW_Action_User.getUserPlaylist("CW_util._displayUserPLaylistContent",D)},_displayUserPLaylistContent:function(E,K){var J=K.hashTableStore;var L=J.get("formName");var C=J.get("selectedIndex");var B=J.get("selectPlaylistListId");var I=CW_util.getFormElement(document.forms[L],B);var A=E.getSpecificChildren("list");var H=A[0].getSpecificChildren("group");var D=null;for(var F=0;F<H.length;F++){D=H[F];if(D.getGroupName()=="null"||D.getGroupName()==null||D.getGroupName()==""){I.appendChild(this.createElementOption(D.getUid(),D.getUid()))}else{I.appendChild(this.createElementOption(D.getUid(),D.getGroupName()))}}try{CW_util.setSelectedIndex(I,C)}catch(G){}},_setSelectDayContent:function(A,E){var D=document.getElementById(A);var B="";E++;for(var C=1;C<E;C++){if(C<10){B="0"+C}else{B=C}D.appendChild(this.createElementOption(C,B))}}};var CW_util=new CW_util();function ComwebCookieHelper(){}ComwebCookieHelper.prototype={setCookie:function(B,C,E,D){var A=new Date();if(D){A.setTime(A.getTime()+D)}else{A.setTime(A.getTime()+(365*24*60*60*1000))}if(E){document.cookie=B+"="+escape(C)+";expires="+A.toGMTString()+";path="+E}else{document.cookie=B+"="+escape(C)+";expires="+A.toGMTString()}},delCookie:function(A){date=new Date;date.setFullYear(date.getFullYear()-1);document.cookie=A+"="+null+";expires="+date.toGMTString()},getCookieInfo:function(A){var F=A.length;var C=document.cookie;var E=C.length;var D=0;var G;while(D<E){var B=D+F;if(C.substring(D,B)==A){G=C.indexOf(";",B);if(G==-1){G=C.length}return unescape(C.substring(B+1,G))}D++}return null},setRefreshCookie:function(A,B,C){this.setCookie(CW_config.serviceId+"refresh","login="+A+"&password="+B,C)},getRefreshCookieValues:function(){return this.getConnectionValues(CW_config.serviceId+"refresh")},setAutoConnectCookie:function(A,B){this.setCookie(CW_config.serviceId+CW_Action_User.COOKIE_NAME_AutoConnect,"login="+A+"&password="+B)},getAutoConnectCookieValues:function(){return this.getConnectionValues(CW_config.serviceId+CW_Action_User.COOKIE_NAME_AutoConnect)},getConnectionValues:function(D){var B=(this.getCookieInfo(D));if(B==null){return null}else{if(B.indexOf("login=")>=0&&B.indexOf("&password=")>=0){var C=new String(B).toQueryParams();var A=new HashTable();A.put("login",C.login);A.put("password",C.password);return A}else{return null}}}};function Comweb_ArrayMulti(){this.initialize()}Comweb_ArrayMulti.prototype={initialize:function(){this.arrayMulti=new Array();this.lenght=0},push:function(A){this.arrayMulti.push(A);this.lenght=this.arrayMulti.length;return this.arrayMulti.length},item:function(A){return this.arrayMulti[A]},getLenght:function(){return this.arrayMulti.length},sort:function(B){for(var A=0;A<this.arrayMulti.length;A++){this.arrayMulti[A].setOrderFilter(B)}this.arrayMulti.sort()},reverse:function(){this.arrayMulti[i].reverse()},deleteRow:function(C,D){var A=-1;for(var B=0;B<this.arrayMulti.length&&A<0;B++){if(this.arrayMulti[B].getValue(C)==D){A=B}}if(A>=0){this.arrayMulti.splice(A,1)}this.lenght=this.arrayMulti.length},clear:function(){this.initialize()},join:function(C){if(C==null){C=", "}var A="";for(var B=0;B<this.arrayMulti.length;B++){A+=this.arrayMulti[B].toStringComplet()+C}return A}};function getDivElementByName(A){return CW_util.getElementDivByName(A)}function getElementDivByNameFromParent(A,B){return CW_util.getElementDivByNameFromParent(A,B)};