if(!myApp)var myApp={};if(!myApp.kcssnone)myApp.kcssnone='none';if(!myApp.kcssinline)myApp.kcssinline='inline';if(!myApp.CONNECTED){x=myApp;x.CONNECTED=new Array();x.CONNECTED['conn']=x.CONNECTED['certif']=x.CONNECTED['mcertif']=x.CONNECTED['pcertif']=x.CONNECTED['trade']=0;x.CONNECTED['iframe']=false;};function gest_parent_params(){alert(parent.myApp.kislocalsite+' x-x '+parent.myApp.klang+' - '+parent.myApp.klangdoc+' - '+parent.myApp.kcountry);};function gest_alert(arr){if(!arr['test']){alert(arr['str']);return(true);};if(myApp&&!myApp.debug)return(false);var msg=(arr['fct']?'fct:'+arr['fct']+',':'');msg+=(arr['line']?'line:'+arr['line']+'\n\n':'')+arr['str'];var len=250;if(msg.length>len){var newmsg='';for(var i=0;i>=msg.length+len;i++){newmsg+=msg.substr(i,len)+'\n';i=i+len;};if(newmsg)msg=newmsg;};alert('\n debug \n'+msg);};function gest_set_outdoor(certif){var fct='str_common-d.js/gest_set_outdoor(certif)',o,certif;var o=$Prot('id_outdoor');if(o){certif=parseInt(certif);o.style.display=(certif?myApp.kcssinline:myApp.kcssnone);o=$Prot('id_globalcertif');if(o){o.disabled=(certif?true:false);if(!o.disabled)o.value='';};str_jsfct_iframeexec_intoiframe('certif,'+certif);}};function gest_outcertificate(jsonResponse){if(!jsonResponse||!jsonResponse['return'])return(false);var fct='str_common-d.js/gest_outcertificate',o;if(!confirm(jset['are_you_sure_disconnect_your_certificate']))return(false);myApp.CONNECTED['certif']=0;myApp.CONNECTED['mcertif']=0;myApp.CONNECTED['pcertif']=0;gest_set_outdoor(0);gest_alert({'fct':fct,'line':54,'str':jset['your_certificate_is_disconnected']});};function gest_jset(text){if(jset)return(jset[text]);else return(parent.jset[text]);};function gest_certificate(jsonResponse){var fct='str_common-d.js/gest_certificate',o,certif;if(!jsonResponse||!jsonResponse['return'])return(false);myApp.CONNECTED['certif']=certif=parseInt(jsonResponse['certif']);myApp.CONNECTED['mcertif']=parseInt(jsonResponse['mcertif']);myApp.CONNECTED['pcertif']=parseInt(jsonResponse['pcertif']);gest_set_outdoor(certif);gest_alert({'fct':fct,'line':81,'str':jset['your_certificate_is_connected']});};function gest_success_goprotajaxwithoutform(jsonResponse){var o;switch(jsonResponse['demand']){case'certificate':gest_certificate(jsonResponse);break;case'outcertificate':gest_outcertificate(jsonResponse);break;case'cookieread':o.$Prot('mastercookies');if(o)o.style.display=myApp.kcssnone;break;case'biorythmuser':$Prot('biorythmuser').src=jsonResponse['file'];break;default:}};function goprotajaxwithoutform(params){var fct='str_common-d.js/goprotajaxwithoutform(params)',o;var x,datasform='',arr=['demand','value','div','php','jslang','serv','iappli'];for(var i=0;i0){var encodedParams="?",parts=url.split("?"),params=parts[1].split("&");for(var i=0;i0)encodedParams+="&";if(params[i].indexOf("=")>0){p=params[i].split("=");encodedParams+=(p[0]+"="+escape(encodeURI(p[1])));}else encodedParams+=params[i];};url=parts[0]+encodedParams;};return(url);};function openPopupWindow(url,name,width,height){var fct='str_common-d.js/openPopupWindow(url,name,width,height)';name=name.replace(/\/|\-|\./gi,"");var encodeurl=(url?encodeUrl(url):url),whitespace=new RegExp("\\s","g");name=name.replace(whitespace,"");if(encodeurl&&myApp.PopupWindow&&!myApp.PopupWindow.closed&&myApp.PopupWindow.location)myApp.PopupWindow.location.href=encodeurl;else {myApp.PopupWindow=window.open(encodeurl,name,"charset=utf-8,location=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,width="+width+",height="+height);if(encodeurl&&!myApp.PopupWindow.opener)myApp.PopupWindow.opener=self;};if(window.focus){myApp.PopupWindow.focus();}};function test_form_biorythm(demand,value,thisform){var fct='str_common-d.js/test_form_biorythm(demand,value,thisform)';var o,test=true,datasform='';if(demand=='biorythmuser'){o=$Prot(value);var x=o.value.split('/'),y,t=jset['use_the_date_format']+' : jj/mm/aaaa';if(x.length!=3){gest_alert({'fct':fct,'line':232,'str':t});o.style.background='red';return(false);};if(!parseInt(x[0])||!parseInt(x[1])||!parseInt(x[2])){gest_alert({'fct':fct,'line':239,'str':t});o.style.background='red';return(false);};o.style.background='white';return(o.value);}};function goajaxhtmlcontentforthisform(demand,value,thisform){var fct='goajaxhtmlcontentforthisform';var params={'demand':demand,'value':value,'php':'../../strangers/common/str_updatepageapplication.php.php','jslang':'fr','serv':'empty4i','iappli':'empty4i','div':'divbiorythm00'};var x=goprotajaxwithoutform(params);};function str_jsfct_iframevideo(thiss,demand,idimg,idvideo,tdidvideo){var o;switch(demand){case'onload':var img=$Prot(idimg);if(img)img.style.display=myApp.kcssnone;o=$Prot(idvideo);if(o)o.style.visibility=myApp.kcsshidden;o=$Prot(tdidvideo);if(o)o.style.backgroundImage='';thiss.style.visibility=myApp.kcssvisible;break;case'onmouseover':var is_video_time=(is_video_time?is_video_time:true);if(is_video_time){is_video_playing=is_video_duration;};break;}};function str_jsfct_iframeexec_intoiframe(cmd){var fct='str_common-d.js/str_jsfct_iframeexec_intoiframe(cmd)',o,certif;var girlIframe0=false,iframe0='id_iframe0';if(window.frames[iframe0]){girlIframe0=window.frames[iframe0].document;button=girlIframe0.getElementById('communicate');button.value=cmd;button.click();}else {exe_cmd_from_parent(cmd);}};