function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) curtop += obj.y; return curtop; } function video_change(t) { getId('v1').innerHTML=' ' } function change_div(did,act) { if(act==1) { $(did).getChildren('.tm1').set('class', 'tm1h fl'); $(did).getChildren('.tm2').set('class', 'tm2h fl'); $(did).getChildren('.tm3').set('class', 'tm3h fl'); } else { $(did).getChildren('.tm1h').set('class', 'tm1 fl'); $(did).getChildren('.tm2h').set('class', 'tm2 fl'); $(did).getChildren('.tm3h').set('class', 'tm3 fl'); } } function clock(cid) { ndate=$('boxclock-'+cid).get('html'); var d1=ndate.split(' '); var d=d1[0].split('-'); var t=d1[1].split(':'); var now = new Date().getTime()/1000; var dayend = new Date(d[0],d[1]-1,d[2],t[0],t[1],t[2]).getTime()/1000; var sec = Math.abs(now-dayend); var min = Math.floor(sec/60); var hours = Math.floor(min/60); var days = Math.floor(hours/24); var years = Math.floor(days/365); sec = Math.floor(sec-min*60); min = Math.floor(min-hours*60); hours = Math.floor(hours-days*24); days = Math.floor(days-years*365); var r=""; if(days>0) r=r+"dni: "+days; if(days==0) { if(hours>0) r=r+hours; if(min>0) r=r+":"+((min<10)?"0":"")+min; if(sec>=0) r=r+":"+((sec<10)?"0":"")+sec; } $('boxclock_show-'+cid).innerHTML =r; if (now↑", alpha:"Pole zawiera nie prawidłowe znaki! ", alphanum:"Pole zawiera nie prawidłowe znaki! ", integer:"Nieprawidłowe dane! ", real:"Nieprawidłowy numer! ", date:"Prawidłowy format daty to (mm/dd/rrrr)! ", dateISO8601:"Prawidłowy format daty to (mm/dd/rrrr)! ", dateEU:"Prawidłowy format daty to (mm/dd/rrrr)!) ", email:"Nieprawidłowy adres e-mail! ", phone:"Nieprawidłowy numer telefonu! ", url:"Nieprawidłowy adres URL! ", zip:"Nieprawidłowy format kodu pocztowego! ", confirm:"Nieprawidłowe hasło! "}}, msgClass: "rc_div_alert", msgContainerTag: "div", submitBt: "recommend_bt", fValidate_send:function(){ $('q_recommend').set('send', {onComplete: function(data) { rc_w.close_window(); salert('Powiadomienie zostało wysłane',5000,false,false,'none'); // definicja! close_window_out($('rc_window3'),1,5000); }}); $('q_recommend').send(); } }); } }); }); } }); $$('[id^=register_user_text]').each(function(el,i){ if ($(el.id)){ $(el.id).addEvent('click', function(e){ var rc_w=new rc_windows({ id:'rc_window0', container: $(document.body), useOverlay: true, width:600, height:700, title:'Rejestracja nowego Klienta', contentAJAX:'http://4mums.pl//ajax/register/index/', varAJAX:{"pid":1,"item":1}, contentHTML: 'http://4mums.pl//ajax/register/index/', onComplete: function(){ exV = new fValidator("f_register",{languageConfig:{l:{required:"To pole jest obowiązkowe! ",alpha:"Pole zawiera nie prawidłowe znaki! ",alphanum:"Pole zawiera nie prawidłowe znaki! ",integer:"Nieprawidłowe dane! ",real:"Nieprawidłowy numer! ",date:"Prawidłowy format daty to (mm/dd/rrrr)! ",dateISO8601:"Prawidłowy format daty to (mm/dd/rrrr)! ",dateEU:"Prawidłowy format daty to (mm/dd/rrrr)!) ",email:"Nieprawidłowy adres e-mail! ",phone:"Nieprawidłowy numer telefonu! ",url:"Nieprawidłowy adres URL! ",zip:"Nieprawidłowy format kodu pocztowego! ",confirm:"Nieprawidłowe hasło! "}}, msgClass: "rc_div_alert", msgContainerTag: "div", submitBt: "register_bt", fValidate_send:function(){ var email=$('customers_email').get('value'); $('f_register').set('send', {onComplete: function(data) { salert('Twoje konto zostało utworzone, a na Twój adres e-mail zostało wysłane hasło do konta.','10000',false,false,'none'); close_window_out($('rc_window0'),1,'10000'); }}); $('f_register').send(); } }); } }); }); } }); //login $$('[id^=login_user_text]').each(function(el,i){ if ($(el.id)){ $(el.id).addEvent('click', function(e){ var rc_w=new rc_windows({ id:'rc_window1', container: $(document.body), useOverlay: true, width:600, height:300, title:'Zaloguj się', contentAJAX:'http://4mums.pl//ajax/login/index/', varAJAX:{"pid":1,"item":1}, contentHTML: 'http://4mums.pl//ajax/login/index/', onComplete: function(){ var exV = new fValidator("f_login", { languageConfig:{l:{required:"To pole jest obowiązkowe! ",alpha:"Pole zawiera nie prawidłowe znaki! ",alphanum:"Pole zawiera nie prawidłowe znaki! ",integer:"Nieprawidłowe dane! ",real:"Nieprawidłowy numer! ",date:"Prawidłowy format daty to (mm/dd/rrrr)! ",dateISO8601:"Prawidłowy format daty to (mm/dd/rrrr)! ",dateEU:"Prawidłowy format daty to (mm/dd/rrrr)!) ",email:"Nieprawidłowy adres e-mail! ",phone:"Nieprawidłowy numer telefonu! ",url:"Nieprawidłowy adres URL! ",zip:"Nieprawidłowy format kodu pocztowego! ",confirm:"Nieprawidłowe hasło! "}}, msgClass: "rc_div_alert", msgContainerTag: "div", submitBt: "login_bt", fValidate_send:function(){ $('f_login').set('send', {onComplete: function(data) { rc_w.close_window(); window.location.reload(); }}); $('f_login').send(); } }); $('login').addEvent('keydown', function(event){if(event.key=='enter' && $('pass').get('value')!='') exV._onSubmit(event)}); $('pass').addEvent('keydown', function(event){if(event.key=='enter' && $('login').get('value')!='') exV._onSubmit(event)}); } }); }); } }); }); window.addEvent('load', function() { //rc-Carousel $$('.box_Carousel').each(function(el,i){ var box=el.id.split('-'); var box_config={}; if($('config-'+box[2])) { var as = $('config-'+box[2]).getElements('span'); as.each(function(el1,i){ box_config[el1.get('id')]=parseInt(el1.get('html')); }); } new RCCarousel(el.id, {width:box_config['config-opt-width-'+box[2]], height:box_config['config-opt-height-'+box[2]],duration:box_config['config-opt-duration-'+box[2]],delay:box_config['config-opt-delay-'+box[2]],box:box_config['config-opt-box-'+box[2]],autoplay:box_config['config-opt-autoplay-'+box[2]]}); }); }); function pass_help(){ if($('rc_window1')) { close_window_out($('rc_window1'),0) overlay=false; } else overlay=true; var rc_w=new rc_windows({ id:'rc_window2', container: $(document.body), useOverlay: overlay, width:600, height:300, title: 'Przypomnij hasło', contentAJAX:'http://4mums.pl//ajax/login/help/', varAJAX:{"pid":1,"item":1}, contentHTML: 'http://4mums.pl//ajax/login/help/', onComplete: function(){ var exV = new fValidator("f_help", { languageConfig:{l:{required:"To pole jest obowiązkowe! ",alpha:"Pole zawiera nie prawidłowe znaki! ",alphanum:"Pole zawiera nie prawidłowe znaki! ",integer:"Nieprawidłowe dane! ",real:"Nieprawidłowy numer! ",date:"Prawidłowy format daty to (mm/dd/rrrr)! ",dateISO8601:"Prawidłowy format daty to (mm/dd/rrrr)! ",dateEU:"Prawidłowy format daty to (mm/dd/rrrr)!) ",email:"Nieprawidłowy adres e-mail! ",phone:"Nieprawidłowy numer telefonu! ",url:"Nieprawidłowy adres URL! ",zip:"Nieprawidłowy format kodu pocztowego! ",confirm:"Nieprawidłowe hasło! "}}, msgClass: "rc_div_alert", msgContainerTag: "div", submitBt: "login_help_bt", fValidate_send:function(){ $('f_help').set('send', {onComplete: function(data) { salert('Hasło zostało przesłana na wskazany adres e-mail!','10000',false,false,'none'); close_window_out($('rc_window2'),1,'10000'); }}); $('f_help').send(); } }); $('login_email').addEvent('keydown', function(event){if(event.key=='enter' && $('token').get('value')!='') exV._onSubmit(event)}); $('token').addEvent('keydown', function(event){if(event.key=='enter' && $('login_email').get('value')!='') exV._onSubmit(event)}); } }); } /* new iMask({ onValid: function(event, obj) {obj.removeClass('rc_valid_no'); obj.addClass('rc_valid_ok')}, onInvalid: function(event, obj) {obj.removeClass('rc_valid_ok'); obj.addClass('rc_valid_no')} }); */