var LANG_CODE = TabsReadCookie("LANG_CODE"); var lng = new Object(); lng.requiredminprice = "Minimalna wartość dla pola {#FIELD#} wynosi: {#MINPRICE#} PLN"; lng.requiredfield = "Wypełnij wymagane pole: {#FIELD#}"; lng.requiredmail = "Nie podałeś adresu e-mail"; lng.requiredmail2 = "Adresu e-mail jest niepoprawny"; function disableSelection(fld) { fld.onselectstart = function() { return false; }; fld.unselectable = "on"; fld.style.MozUserSelect = "none"; } function urlencode(txt){ try{txt = txt.replace(/ó/g, '-4lrklewj-');}catch(e){} try{txt = txt.replace(/Ó/g, '-4lrklewj2-');}catch(e){} txt = escape(txt); return(txt); } function Confirm(text,location){ if(confirm(text)) this.location.href=location; } function Confirm_(text,location,pswd) { var echo=prompt(text,""); if(echo != null && echo == pswd) {parent.location.href=location;} } function dslakflasgas(){ for(i=1; i<100; i++){ fld = document.getElementById('flassssshhhhh_'+i+''); if(fld){ dd = String(fld.innerHTML); dd = dd.replace('', ''); fld.innerHTML = dd; fld.style['display'] = 'block'; } } } if(document.all){ var mozilla_ff = false; }else{ var mozilla_ff = true; } CoreTooltip = new Object; CoreTooltip.init = function(){ CT = new Object(); CT.base = document.createElement('div'); CT.base.style['background'] = '#ffffff'; } CoreTooltip.init(); function debugTrace(txt){ if(document.getElementById('dsaljfahfkaejiogbaei')){ div = document.getElementById('dsaljfahfkaejiogbaei'); div.innerHTML = txt + div.innerHTML; }else{ div = document.createElement("div"); div.id = "dsaljfahfkaejiogbaei"; div.className = "quickCronNotifyDiv"; div.style['width'] = '300px'; div.style['height'] = '200px'; div.style['left'] = '150px'; div.style['top'] = '150px'; div.style['overflow'] = 'scroll'; div.style['fontSize'] = '9px'; div.style['fontFamily'] = 'Arial'; div.style['background'] = '#000000'; div.innerHTML = txt; } document.body.appendChild(div); } var AJAX_MUTUAL_EXCLUSION_PATCH_START_AGAIN = 0; var AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY = new Array(); var AJAX_MUTUAL_EXCLUSION_PATCH_STATUS = new Array(); AJAX_MUTUAL_EXCLUSION_PATCH_STATUS[1] = 'incomplete'; var AJAX_MUTUAL_EXCLUSION_PATCH_I = 0; var AJAX_MUTUAL_EXCLUSION_PATCH_ACTUAL = 1; var AJAX_CACHE_ARRAY = new Array(); var AJAX_CACHE_ARRAY_GO = 0; function AJAXMutualExclusionPatch(){ this.Go = function(url, func, vars){ var http; var varInt = 0; AJAX_MUTUAL_EXCLUSION_PATCH_START_AGAIN = 0; if(window.ActiveXObject){ http = new ActiveXObject("Microsoft.XMLHTTP"); if(http){ http.open("GET", url, true); http.onreadystatechange = function() { if(http.readyState == 4 && http.status == 200){ response = escape(http.responseText); window.setTimeout(''+func+'(\''+response+'\', \''+vars+'\')', 0); AJAX_CACHE_ARRAY_GO = 0; window.setTimeout('AJAX.GetFromCache()', 0); } } http.setRequestHeader('Accept','message/x-formresult') http.setRequestHeader('Content-Type','text/html; charset=utf-8') http.send(null); } }else if(window.XMLHttpRequest){ nw = new Date(); txtForQuickCron = ('
'+nw.getMinutes()+':'+nw.getSeconds()+':'+nw.getMilliseconds()+' START '+func+' link'); timeVal = nw.getTime(); http = new XMLHttpRequest(); http.open("GET", url, true); http.setRequestHeader('Accept','message/x-formresult') http.setRequestHeader('Content-Type','text/html; charset=utf-8') http.send(null); http.onreadystatechange = function(){ try{ if(http.readyState == 4){ if(http.status == 200){ nw = new Date(); timeVal2 = nw.getTime(); response = escape(http.responseText); eval(''+func+'(\''+response+'\', \''+vars+'\')'); AJAX_CACHE_ARRAY_GO = 0; window.setTimeout('AJAX.GetFromCache()', 0) // przyjmuj zlecenia na AJAXa co 500ms }else{ nw = new Date(); timeVal2 = nw.getTime(); varInt++; } }else{ nw = new Date(); timeVal2 = nw.getTime(); varInt++; } if(varInt >= 30){ } }catch(e){ } } } } this.Send = function(url, func, vars){ this.Go(url, func, vars); /* AJAX_MUTUAL_EXCLUSION_PATCH_I++; AJAX_CACHE_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I] = new Array(); AJAX_CACHE_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['url'] = url; AJAX_CACHE_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['func'] = func; AJAX_CACHE_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['vars'] = vars; AJAX_CACHE_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['completed'] = 0; window.setTimeout("AJAX.GetFromCache()", 0); */ /* AJAX_MUTUAL_EXCLUSION_PATCH_I++; AJAX_MUTUAL_EXCLUSION_PATCH_STATUS[AJAX_MUTUAL_EXCLUSION_PATCH_I] = 'incomplete'; AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I] = new Array(); AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['url'] = url; AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['func'] = func; AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[AJAX_MUTUAL_EXCLUSION_PATCH_I]['vars'] = vars; if(AJAX_MUTUAL_EXCLUSION_PATCH_I >= 1 || AJAX_MUTUAL_EXCLUSION_PATCH_START_AGAIN == 1){ AJAX_MUTUAL_EXCLUSION_PATCH_STATUS[AJAX_MUTUAL_EXCLUSION_PATCH_I] = 'ok'; this.Go(url, func, vars); }else{ } */ } this.GetFromCache = function(){ if(AJAX_CACHE_ARRAY_GO == 0){ for(i=1; i<=AJAX_CACHE_ARRAY.length; i++){ if(AJAX_CACHE_ARRAY[i] && AJAX_CACHE_ARRAY[i]['completed'] == 0){ AJAX_CACHE_ARRAY_GO = 1; AJAX_CACHE_ARRAY[i]['completed'] = 1; this.Go(AJAX_CACHE_ARRAY[i]['url'], AJAX_CACHE_ARRAY[i]['func'], AJAX_CACHE_ARRAY[i]['vars']); break; } } } /* var completed = 1; for(i=1; i<=AJAX_MUTUAL_EXCLUSION_PATCH_I; i++){ if(AJAX_MUTUAL_EXCLUSION_PATCH_STATUS[i] == 'incomplete'){ AJAX_MUTUAL_EXCLUSION_PATCH_STATUS[i] = 'ok'; AJAX_MUTUAL_EXCLUSION_PATCH_ACTUAL = i; this.Go(AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[i]['url'], AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[i]['func'], AJAX_MUTUAL_EXCLUSION_PATCH_ARRAY[i]['vars']); completed = 0; } } if(completed == 1){ AJAX_MUTUAL_EXCLUSION_PATCH_START_AGAIN = 1; } */ } } AJAX2 = new AJAXMutualExclusionPatch(); AJAX = new AJAXMutualExclusionPatch(); function JavEMail(mail){ mail = String(mail); mail = mail.replace("]xyXoOsxP[", "@"); parent.location.href = 'mailto:'+mail; } function JavChopField(fld, len, ret){ if(fld){ if(ret){ var kk = len - fld.value.length; if(kk < 0){kk = 0;} document.getElementById(ret).innerHTML = kk; } fld.setAttribute('maxlength', len); len -= 1; if(fld.value.length > len){ fld.value = fld.value.slice(0,len+1); } } } function JavShowTooltip(e, txt, vars){ var cfg = new Array(); if(vars){ vars = vars.split(";"); for(i=0; i 0){objTooltip.style.width = cfg['wid']+'px' ;} var pageScroll = new Array(); pageScroll = getPageScroll(); var pageSize = new Array(); pageSize = getPageSize(); offX = (e) ? e.pageX : event.clientX; offY = (e) ? e.pageY : event.clientY; if(!offX || !offY){ var offX = e.clientX + document.body.scrollLeft; var ScrollTop = (document.documentElement.scrollTop > 0) ? document.documentElement.scrollTop : document.body.scrollTop; var offY = e.clientY + ScrollTop; } if(cfg['hei'] > 0){ maxhei = pageSize[3] - cfg['hei'] - 50; if(offY > maxhei){ offY = offY - 30 - cfg['hei']; } }else{ maxhei = pageSize[3] - 200; if(offY > maxhei){ offY = offY - 50; } } if(cfg['inplace'] == '1'){ var sb = 0; var sc = 0; }else{ var sb = 15; var sc = 20; } var pageSize = new Array(); pageSize = getPageSize(); var referal = pageSize[0] - cfg['wid'] - 100; if(offX > referal){ objTooltip.style.position = 'absolute'; objTooltip.style.left = (offX - cfg['wid'] - sb) + 'px'; objTooltip.style.top = (offY + sc) + 'px'; }else{ objTooltip.style.position = 'absolute'; objTooltip.style.left = (offX + sb) + 'px'; objTooltip.style.top = (offY + sc) + 'px'; } document.body.appendChild(objTooltip); } } function JavShowTooltipHide(obj){ try{document.body.removeChild(objTooltip);} catch(e){} try{document.body.removeChild(obj);} catch(e){} } function GalJavDragDrop(e){ var ns4=document.layers var ie4=document.all var ns6=document.getElementById&&!document.all if(this){ objDrag = (e) ? e.target : window.event.srcElement; while(objDrag.tagName != "BODY" && objDrag.tagName != "HTML" && objDrag.id != this.id){ objDrag = ns6 ? objDrag.parentNode : objDrag.parentElement; } var pageSize = new Array(); pageSize = getPageSize(); offX = (e) ? e.pageX : event.clientX; offY = (e) ? e.pageY : event.clientY; tmpX = parseInt(gal.Base.style.left); tmpY = parseInt(gal.Base.style.top); dragApproved = true; document.onmousemove = function() { if(dragApproved == true){ objDrag.style['cursor'] = 'default'; offX2 = (e) ? e.pageX : event.clientX; offY2 = (e) ? e.pageY : event.clientY; var doDrag = 1; if(offX2 <= 10){ doDrag = 0; } if(offY2 <= 10){ doDrag = 0; } if(offX2 > pageSize[0]){ doDrag = 0; } if(offY2 > pageSize[1]){ doDrag = 0; } if(doDrag == 1){ gal.Base.style.position = 'absolute'; dragLeft = tmpX + offX2 - offX; dragRight = tmpY + offY2 - offY; gal.Base.style.left = dragLeft + 'px'; gal.Base.style.top = dragRight + 'px'; } } } document.onmouseup = function() { dragApproved = false; if(gal.Base.style.display == 'block'){ objDrag.style['cursor'] = 'move'; var left = gal.Base.style.left; var top = gal.Base.style.top; left = left.replace("px", ""); top = top.replace("px", ""); TabsCreateCookie('_dragPositionX_' + objDrag.id, left); TabsCreateCookie('_dragPositionY_' + objDrag.id, top); } } } } function JavImgPopup(picUrl, picWid, picHei, picAlt){ if(document.all){ } try{objImage.src = 'none';} catch(err){} var pageScroll = new Array(); pageScroll = getPageScroll(); var pageSize = new Array(); pageSize = getPageSize(); var maxSize = pageSize[2] - 100; var maxSize2 = pageSize[3] - 50; if(picWid > maxSize){ picHei = maxSize * picHei/picWid; picWid = maxSize; } if(picHei > maxSize2){ picWid = maxSize2 * picWid/picHei; picHei = maxSize2; } picHei = Math.round(picHei); picWid = Math.round(picWid); var cookie_x = parseInt(TabsReadCookie('_dragPositionX_objClose_')); var cookie_y = parseInt(TabsReadCookie('_dragPositionY_objClose_')); var centerW = (((arrayPageSize[0] - 20 - picWid) / 2) + 'px'); var centerH = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - picHei) / 2) + 'px'); var centerW2 = (((arrayPageSize[0] - 20 - picWid) / 2) + 'px'); var centerH2 = (arrayPageScroll[1] + ((arrayPageSize[3] - 35 - picHei) / 2) + 'px'); if(cookie_x){ } if(cookie_y){ } var mainBody = document.body.childNodes; gal = new Object(); gal.Width = picWid; gal.Height = picHei; gal.Ext = (document.all) ? 'gif' : 'png'; try{ if(document.getElementById('dsaljgkaehgeafdakgeajhkhae')){ document.body.removeChild(document.getElementById('dsaljgkaehgeafdakgeajhkhae')); } }catch(e){} gal.Base = document.createElement('div'); gal.Base.id = 'dsaljgkaehgeafdakgeajhkhae'; gal.Base.style['position'] = 'absolute'; gal.Base.style['left'] = centerW; gal.Base.style['top'] = centerH; gal.Base.style['zIndex'] = '9999'; document.body.insertBefore(gal.Base, document.body.nextSibling); table = document.createElement("table"); table.cellPadding = 0; table.cellSpacing = 0; gal.Base.appendChild(table); tb = document.createElement("tbody"); table.appendChild(tb); tr = document.createElement("tr"); tb.appendChild(tr); td = document.createElement("td"); td.width = '8px'; td.height = '8px'; td.style['background'] = 'url(engine/core/images/bglt.'+gal.Ext+') repeat-x'; tr.appendChild(td); td = document.createElement("td"); td.height = '8px'; td.width = gal.Width+'px'; td.style['background'] = 'url(engine/core/images/bgtop.'+gal.Ext+') repeat-x'; tr.appendChild(td); td = document.createElement("td"); td.width = '8px'; td.height = '8px'; td.style['background'] = 'url(engine/core/images/bgrt.'+gal.Ext+') repeat-x'; tr.appendChild(td); table = document.createElement("table"); table.cellPadding = 0; table.cellSpacing = 0; gal.Base.appendChild(table); tb = document.createElement("tbody"); table.appendChild(tb); tr = document.createElement("tr"); tb.appendChild(tr); td = document.createElement("td"); td.width = '8px'; td.style['background'] = 'url(engine/core/images/bgleft.'+gal.Ext+') repeat-y'; tr.appendChild(td); td = document.createElement("td"); td.width = gal.Width+'px'; td.height = '20px'; td.style['background'] = '#f0f0f0 url(engine/core/images/popup_bg.jpg) repeat-x'; td.setAttribute("align", "right"); td.setAttribute("valign", "middle"); tr.appendChild(td); ico1 = document.createElement("img"); ico1.src = "engine/core/images/popup_save.gif"; ico1.onmousedown = function(){ JavShowTooltipHide(); var loc = picUrl; loc = loc.replace("ShowSelfPicture", "SavePicture"); JavGalleryClose(gal.Base); parent.location.href=loc; } td.appendChild(ico1); sep = document.createElement("textNode"); sep.innerHTML = '   '; sep.style['cursor'] = 'default'; td.appendChild(sep); ico1 = document.createElement("img"); ico1.src = "engine/core/images/close.gif"; ico1.onmousedown = function(){ JavShowTooltipHide(); JavGalleryClose(gal.Base); } td.appendChild(ico1); td = document.createElement("td"); td.width = '8px'; td.style['background'] = 'url(engine/core/images/bgright.'+gal.Ext+') repeat-y'; tr.appendChild(td); table = document.createElement("table"); table.cellPadding = 0; table.cellSpacing = 0; gal.Base.appendChild(table); tb = document.createElement("tbody"); table.appendChild(tb); tr = document.createElement("tr"); tb.appendChild(tr); td = document.createElement("td"); td.width = '8px'; td.style['background'] = 'url(engine/core/images/bgleft.'+gal.Ext+') repeat-y'; tr.appendChild(td); td = document.createElement("td"); td.style['background'] = '#ffffff'; td.width = gal.Width+'px'; td.height = gal.Height+'px'; tr.appendChild(td); iframe = document.createElement("iframe"); iframe.width = gal.Width; iframe.height = gal.Height; iframe.setAttribute("frameborder", "0"); iframe.style['display'] = 'none'; td.appendChild(iframe); preloader = document.createElement("div"); var a = (gal.Height / 2); preloader.innerHTML = ''; preloader.width = gal.Width; preloader.height = gal.Height; preloader.align = 'center'; td.appendChild(preloader); image = document.createElement("img"); image.width = gal.Width; image.height = gal.Height; image.style['display'] = 'none'; image.style['position'] = 'absolute'; image.style['left'] = '8px'; image.style['top'] = '28px'; image.onmousedown = function(){ JavGalleryClose(gal.Base, image); } image.onload = function(){ preloader.style['display'] = 'none'; image.style['display'] = 'block'; iframe.style['display'] = 'block'; try{divb.style['display'] = 'block';}catch(e){} } td.appendChild(image); image.src = picUrl; if(picAlt){ divb = document.createElement("divb"); divb.style['position'] = 'absolute'; divb.style['text-align'] = 'left'; divb.style['display'] = 'none'; divb.style['float'] = 'left'; td.appendChild(divb); div = document.createElement("div"); div.innerHTML = picAlt; div.style['position'] = 'relative'; div.style['left'] = '0px'; div.style['text-align'] = 'left'; div.style['top'] = '-44px'; div.style['padding'] = '5px'; div.style['margin'] = '0px 8px 0px 0px'; div.style['background'] = '#ffffff'; div.style['color'] = '#222222'; div.style['fontSize'] = '9px'; div.style['fontFamily'] = 'Verdana'; div.style['fontWeight'] = 'bold'; div.style['MozOpacity'] = '0.7'; div.style['border'] = 'solid #444444 1px'; divb.appendChild(div); } td = document.createElement("td"); td.width = '8px'; td.style['background'] = 'url(engine/core/images/bgright.'+gal.Ext+') repeat-y'; tr.appendChild(td); table = document.createElement("table"); table.cellPadding = 0; table.cellSpacing = 0; gal.Base.appendChild(table); tb = document.createElement("tbody"); table.appendChild(tb); tr = document.createElement("tr"); tb.appendChild(tr); td = document.createElement("td"); td.width = '8px'; td.height = '8px'; td.style['background'] = 'url(engine/core/images/bglb.'+gal.Ext+') repeat-x'; tr.appendChild(td); td = document.createElement("td"); td.height = '8px'; td.width = gal.Width; td.style['background'] = 'url(engine/core/images/bgbottom.'+gal.Ext+') repeat-x'; tr.appendChild(td); td = document.createElement("td"); td.width = '8px'; td.height = '8px'; td.style['background'] = 'url(engine/core/images/bgrb.'+gal.Ext+') repeat-x'; tr.appendChild(td); } function JavGalleryClose(obj){ document.body.removeChild(obj); } function getPageScroll(){ var yScroll; if(self.pageYOffset) { yScroll = self.pageYOffset; }else if(document.documentElement && document.documentElement.scrollTop){ yScroll = document.documentElement.scrollTop; }else if(document.body) { yScroll = document.body.scrollTop; } arrayPageScroll = new Array('',yScroll) return arrayPageScroll; } function getPageSize(){ var xScroll, yScroll; if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; } else if (document.body.scrollHeight > document.body.offsetHeight){ xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } else { xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } var windowWidth, windowHeight; if (self.innerHeight) { windowWidth = self.innerWidth; windowHeight = self.innerHeight; } else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } if(yScroll < windowHeight){ pageHeight = windowHeight; } else { pageHeight = yScroll; } if(xScroll < windowWidth){ pageWidth = windowWidth; } else { pageWidth = xScroll; } arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight) return arrayPageSize; } function CheckAllCheckbox(intGroup, check, table){ var object = document.getElementById(intGroup); if(table){ dat = table.split(";"); for(i=0; i 0){ fld = document.getElementById(id); fld.scrollTop += vr; } } function daskljgekajihaeha(id,file,wid,hei,roll,przekazywanyURL) // hei2 używane przy rollplayer { fld = document.getElementById('dlasjgkaehfkioaejheq' + id); rect = document.getElementById('bannerrect' + id); if(mozilla_ff) { fld2 = document.createElement("embed"); fld2.id = 'sdkahfaeiohdioahioghaeiogjaiegea'+id; fld2.setAttribute("wmode", "transparent"); fld2.setAttribute("width", wid); fld2.setAttribute("height", hei); fld2.src = file; if (roll == 1) { fld2.src += '?clickTag=' + przekazywanyURL; rect.appendChild(fld2); } else { fld.appendChild(fld2); } } else { if (roll == 1) { rect.innerHTML = ''; } else { fld.innerHTML = ''; } } } function dfklvjfndjgdfjnfjbfj(id, txt) { var elForm = document.forms['jgjfgdfshgygvjgj_' + id]; if(elForm) { if(elForm.f_search_query_id298821.value == '') { alert(txt); return false; } else { return true; } } } function Gofkdasjtgek(url) { url = url; window.open(url); } /* ************************** */ /* moduł Learning - time test */ /* ************************** */ function timeTestLoadNextQuestion(test_id) { $("#testContent").load("?launch_macro=timeTestAjax&command=nextQuestion&test_id="+test_id); } function timeTestGiveAnswer(test_id,question_id, answer) { $("#testContent").load("?launch_macro=timeTestAjax&command=giveAnswer&test_id="+test_id+"&question_id="+question_id+"&answer="+answer); } function timerDown(tid,qid) { if (timeRemaining > 0) { timeRemaining--; document.getElementById('czasNaOdpowiedz').innerHTML = timeRemaining; } if (timeRemaining == 0) { clearInterval(refreshIntervalId); this.disabled='disabled'; timeTestGiveAnswer(tid,qid,document.getElementById('answer_id').value); } } /* ---------------------- */ var photoeditorvar='go.live.php/';