function _r(a){a+=(a.indexOf("?")>0)?"":"?"+_VERSION+_SUBV;IncludeHelper.register(a)}function _inc(a){a+=(a.indexOf("?")>0)?"":"?"+_VERSION+_SUBV;_i(a)}function _icss(a){a+=(a.indexOf("?")>0)?"":"?"+_VERSION+_SUBV;IncludeHelper._includeCss(a)}function _i(a){document.write("<script type='text/javascript' src='"+a+"'><\/script>")}if(inDev){_inc("utils/base.js");_inc("utils/errorManager.js");_inc("utils/utils.js");_inc("utils/nodeUtil.js");_inc("utils/IncludeHelper.js");_inc("utils/consoleHelper.js");_inc("utils/LoaderHelper.js");_inc("utils/orientationHelper.js");_inc("utils/listBuilder.js")}var _UNIT_SPEED="";function getUnitSpeed(){if(_UNIT_SPEED==""){_UNIT_SPEED=countsIn1ms()}return _UNIT_SPEED}function isCPUSlow(){if(document.location.search.indexOf("cpuslow")>0){return true}return getCategorieCPUSpeed()=="SLOW"}function getCategorieCPUSpeed(){return(getUnitSpeed()<SPEED_LIMIT)?"SLOW":"FAST"}function getCubeSpeed(){return(isCPUSlow()?CUBE_SPEED_SLOW:CUBE_SPEED)+"ms"}var status="";var cube="";var gCube="";var advManager="";var breakStart=false;var running=false;var isFastApplication=false;function ResponseListener(b,a){this.responseFct=b;this.faillureFct=a}ResponseListener.prototype={response:function(a){this.responseFct(a)},faillure:function(){this.faillureFct()}};function registerAllJs(){if(inDev){_r("utils/ui/dom.js");_r("utils/ui/cssmanager.js");_r("utils/ui/layer.js");_r("utils/ui/ButtonHelper.js");_r("utils/ui/gCube.js");_r("utils/ui/Slider.js");_r("utils/ui/imageManager.js");_r("utils/ui/popup.js");_r("utils/HashMap.js");_r("utils/json2.js");_r("data/PropertieManager.js");_r("data/OrangeClient.js");_r("data/model/categorie.js");_r("data/model/genre.js");_r("data/model/webApp.js");_r("data/DataMapper.js");_r("data/GalleryModel.js");_r("view/pageManager.js");_r("view/ViewHelper.js");_r("view/gCubeManager.js");_r("view/advManager.js");_r("view/detailProps.js");_r("view/imLoader.js");_r("view/mainPage.js");_r("view/WAListProvider.js");_r("view/SearchComp.js");_r("view/SearchView.js")}}initTimer();function load(){window.scrollTo(0,1);dashcode.setupParts();targetStat(START);targetStat(getCategorieCPUSpeed()+"_"+START,true);$("imgWelcome").onload=function(){registerAllJs();$("imgWelcome").style.display="block";_icss("utils/ui/popup.css");if(inDev){_icss("view/footer.css");_icss("view/header.css");_icss("view/help.css");_icss("view/copyright.css");_icss("view/searchComp.css");_icss("view/wapp-list.css");IncludeHelper.includeRegistered(loadRealized)}else{loadRealized()}};$("imgWelcome").src="Images/loader_gallery.png";var b=function(){updateWidth()};var a=function(){updateWidth()};initOrientationListener(b,a,a,b);setInterval(checkWindowOrientation,2000);setTimeout(function(){if(running||breakStart){return}breakStart=true;targetStat("WEBSTORETIMEOUT",true);restartQuestion()},(isCPUSlow())?15000:10000)}function restartQuestion(b){if(!b){b=""}breakStart=true;var a=confirm("La connexion a été interrompue (réseau non disponible ou instable)."+b+" Voulez-vous reconnecter l'application ?");if(a){window.open(document.location,"_self")}else{$("activityIndicator").style.display="none";$("errorLoading").style.display="block"}}var updateWidth=function(){var b="2px";if(window.innerWidth>460){b="12%"}if(window.innerWidth>600){b="25%"}$("boxCat1").style.marginLeft=b;$("boxCat2").style.marginRight=b;var a=parseInt($("CounterBoxs").style.width)+parseInt($("CounterSite").offsetWidth);var c=(window.innerWidth-a)/2;$("CounterBoxContainer").style.left=c+"px"};function initComponents(){var a=function(d){try{if(breakStart){return false}if(document.cookie.indexOf("help")>0&&document.cookie.indexOf("off")>0){PropertieManager.set("help","off")}PropertieManager.initUserProps();var e=new DataMapper(getGModel());e.buildModel(d);gCube=new GCubeManager();initALaUnePage();createGenreList();var k=getGModel().getWebApps().length;var m=""+k;digit=m.length;for(var h=0;h<digit;h++){var l=!UAgent.isIphoneDevice();var g="CounterBox"+((l==true)?"":"Reflect");var j=_c("div",g,"c"+h);var o=_c("div","CounterBoxLine");var f=_c("div","CounterTxt","t"+h,m.charAt(h));j.appendChild(f);j.appendChild(o);$("CounterBoxs").appendChild(j)}$("CounterBoxs").style.width=(digit*54)+"px";updateWidth()}catch(n){targetStat("WEBSTOREDATALOADEDFAILLURE",true);restartQuestion()}};var c=function(){log("FAILLURE ",true);targetStat("WEBSTOREDATALOADINGFAILLURE",true);restartQuestion()};var b=new ResponseListener(a,c);loadContent(URL_PHP,URL_PARAM,true,b)}function displayMainView(){initHeight();initViews();initBottomListeners();_hdg().addEventListener("webkitTransitionEnd",function(c){if(_hdg().toOpacity){_hdg().style.display="none";_hdg().activateUser=false;_hdg().toOpacity=false}},false);_hdg().style.opacity=0;_hdg().style.display="none";_hdg().style.top=(window.pageYOffset+window.innerHeight-($("HelpImg").height+2))+"px";displayHelpApplicationDialog(false);window.scrollTo(0,1);$("activityIndicator").src="Images/ActivityIndicatorBlack.png";if(parseInt($("envComp").style.height)<1200){var b=getUnitSpeed();var a=(b<75)?1200:800;setTimeout(function(){initHeight()},a)}targetStat(MAINPAGE)}function initHeight(){var a=parseInt(computePageListHeight($("genreList")));$("GenrePage").style.height=a;var b=getHeight("boxFooter")+a+getHeight("boxTopUne")+getHeight("headerTopMainView");if(b<1500){b=1595}$("envComp").style.height=(b+22)+"px";$("MPView").style.height=(b+22)+"px";$("trashComp").appendChild($("activityIndicator"));$("trashComp").appendChild($("initView"))}var timeoutHelpD="";function _hdg(){return $("HelpComp")}function closeHDialog(){if(_hdg().onClose){return}if(timeoutHelpD!=""){clearTimeout(timeoutHelpD);timeoutHelpD=""}_hdg().onClose=true;_hdg().style.opacity=0;_hdg().toOpacity=true;PropertieManager.set("help","off")}function openHDialog(){displayHelpApplicationDialog(true)}function displayHelpApplicationDialog(a){if(!a){a=false}if(timeoutHelpD!=""){clearTimeout(timeoutHelpD);timeoutHelpD=""}_hdg().onClose=false;_hdg().toOpacity=false;var d=false;if(UAgent.isIphoneDevice()){d=true}var c=false;var b=PropertieManager.get("help");if(d&&(a||b!="off")){c=true}PropertieManager.set("help","off");if(c){_hdg().style.opacity=1;_hdg().style.display="block";_hdg().style.WebkitTransition="1600ms ease-out";if(a){setTimeout(function(){_hdg().style.top=(window.pageYOffset+window.innerHeight-($("HelpImg").height+2))+"px"},500)}timeoutHelpD=setTimeout(function(){_hdg().style.opacity=0;_hdg().toOpacity=true},6000)}}function fireButtonMail(){targetStat(PARTAGERMAIL);var a="<html>Le WebStore, les meilleurs sites pour mon iPhone: ";a+='<a href="http://lewebstore.fr" target="_blank">www.lewebstore.fr</a>';window.location="mailto:?subject=Je te recommande www.lewebstore.fr&body="+a+"</html>"}function initBottomListeners(){$("footerAdd").addEventListener("click",function(a){if(!ButtonUtility.clickAccepted(a.currentTarget)){return}if(!_hdg().activateUser){targetStat(HPAJOUTER);_hdg().activateUser=true;_hdg().style.top=window.pageYOffset-$("HelpImg").height+"px";openHDialog()}});$("fshare").addEventListener("click",function(b){if(!ButtonUtility.clickAccepted(b.currentTarget)){return}targetStat(HPPARTAGER);var a='<center><a style="text-decoration:none;" href="javascript:{(new Popup())._hide();Layer.onclick = null;}"><span style=\'color:#e2e1dd;line-height:44px;\'>fermer</span></a></center>';a+=' <div onclick=fireButtonMail(); class="share_popup">Email</div>';a+='<a href="http://twitter.com/home?status=www.lewebstore.fr" target="_blank" style="text-decoration:none;" onclick="targetStat(PARTAGERTWEET);"><div class="share_popup">sur Twitter</div></a>';a+='<a href="http://www.facebook.com/share.php?u=www.lewebstore.fr" target="_blank" style="text-decoration:none;" onclick="targetStat(PARTAGERFB);"><div class="share_popup">sur Facebook</div></a>';openPopup(a,b.pageX,b.pageY-275)});$("fjoinus").addEventListener("click",function(b){if(!ButtonUtility.clickAccepted(b.currentTarget)){return}targetStat(REJOIGNEZNOUS);var a='<center><a style="text-decoration:none;" href="javascript:{(new Popup())._hide();Layer.onclick = null;}"><span style=\'color:#e2e1dd;line-height:44px;\'>fermer</span></a></center>';a+='<a href="http://www.twitter.com/le_webstore" target="_blank" style="text-decoration:none;" ><div class="share_popup">sur Twitter</div></a>';a+='<a href="http://touch.facebook.com/#/profile.php?id=301832335289" target="_blank" style="text-decoration:none;"><div class="share_popup">sur Facebook</div></a>';openPopup(a,b.pageX,b.pageY-225)});$("footerUOrange").href="http://mobile.orange.fr";$("footerUOrange").target="_blank";$("footerUOrange").onclik=function(a){targetStat(HPDECOUVREZ)};$("footerLaw").addEventListener("click",function(b){if(!ButtonUtility.clickAccepted(b.currentTarget)){return}targetStat(HPLEGALES);var a=createCopyrightPage();$("envComp").appendChild(a);$("envComp").previousSize=$("envComp").style.height;a.style.height=window.innerHeight+"px";$("envComp").style.height=getCompHeight(a)+"px";window.scrollTo(0,1);ViewHelper.slideToView("MPView",a.id,null,"toLeft")})}var popup="";function openPopup(c,a,g){if(popup==""){popup=new Popup()}var f=popup.getDomNode();f.style.left="0px";document.body.appendChild(f);popup.popup({arrow:"bottom",content:c,top:g});var b=320;if(a>b-40){posx=a-260;a=260;f.style.left=posx+"px"}var d=a-30;var e=b-d-63;$("bottomLeftBorderNode").style.width=d+"px";$("bottomRightBorderNode").style.width=e+"px"}var LOADER_TIMER=2500;var timeInit="";function initTimer(a){LOADER_TIMER=(!a)?3000:a;timeInit=new Date()}function loadRealized(){initComponents();var a=new Date();var b=a-timeInit;var c=LOADER_TIMER;if(b<LOADER_TIMER){c=LOADER_TIMER-b}setTimeout(function(){if(!breakStart){targetStat("WEBSTORESTARTED",true);targetStat(getCategorieCPUSpeed()+"_WEBSTORESTARTED",true);ViewHelper.gotToView("initView","MPView",true,displayMainView);running=true}},c)};