var CrmPath = 'engine/crm/images/'; var CrmBG1 = '#ECE9DA'; var CrmBG2 = '#F8F2E3'; var CrmBG3 = '#E0ECFF'; var CrmBG4 = '#F3F1E6'; var CrmBG5 = '#F7F5EC'; var CrmBG_TB = '#FCFAF5'; function number_format( number, decimals, dec_point, thousands_sep ) { var n = number, c = isNaN(decimals = Math.abs(decimals)) ? 2 : decimals; var d = dec_point == undefined ? "," : dec_point; var t = thousands_sep == undefined ? "." : thousands_sep, s = n < 0 ? "-" : ""; var i = parseInt(n = Math.abs(+n || 0).toFixed(c)) + "", j = (j = i.length) > 3 ? j % 3 : 0; return s + (j ? i.substr(0, j) + t : "") + i.substr(j).replace(/(\d{3})(?=\d)/g, "$1" + t) + (c ? d + Math.abs(n - i).toFixed(c).slice(2) : ""); } crm = new Object(); crm.CFG = new Array(); if(document.all){ crm.FrameHeight = (document.documentElement.clientHeight) + 'px'; }else{ crm.FrameHeight = (top.window.innerHeight-25) + 'px'; } crm.US = new Object(); crm.US.init = function(){ if(!top.document.getElementById('dsalkdslajgkeajkgda')){ var pageSize = new Array(); pageSize = agetPageSize(); crm.US.base = top.document.createElement("div"); crm.US.base.id = 'dsalkdslajgkeajkgda'; crm.US.base.style['background'] = '#E9EEF4'; crm.US.base.style['border'] = 'solid #C2CAD5 1px'; crm.US.base.style['position'] = 'absolute'; crm.US.base.style['left'] = (pageSize[0]-235)+'px'; crm.US.base.style['top'] = '3px'; crm.US.base.style['width'] = '230px'; var url = String(window.location); url = url.replace('go.live.php/crm_popup_open', ''); url = url.replace('go.live.php/crm_default_StarterForCrm.html', ''); tmp = top.document.createElement('iframe'); tmp.src = url + 'go.live.php/crm_users_default/userAcc'; tmp.frameborder = 0; tmp.style.border = '0px'; tmp.style['height'] = '22px'; tmp.style['width'] = '225px'; crm.US.base.appendChild(tmp); } } try{ if(crm_user_dialog_ok == 'true'){ crm.US.init(); } }catch(e){} crm.dsakfdsakjgheaj = 0; try{ crm.ID = parent; }catch(e){} try{ crm.ID2 = top.GetIFrame(top.document.getElementById('objPop_').getAttribute("owner")); crm.ID2 = crm.ID2.document.getElementById('crm_iframe').contentWindow; }catch(e){} try{ crm.IDFRAME = top.document.getElementById('iframe_for_popup_' + top.actual_window).contentWindow.document.getElementById('crm_iframe').contentWindow; }catch(e){} try{ crm.ID3 = top.document.getElementById('iframe_for_popup_'+top.actual_window).contentWindow; }catch(e){} crm.Go = function(obj, url){ obj.location.href = url; } crm.Go2 = function(txt){ txt = unescape(txt); alert(crm.Go.obj.document.body.innerHTML); crm.Go.obj.document.body.innerHTML = 'aaaaabbb'; } crm.CookieCreate = function(variable, value, time){ if(time){ var date = new Date(); date.setTime(date.getTime()+(time*24*60*60*100)); var expires = "; expires="+date.toGMTString(); }else{ var expires = ""; } document.cookie = variable+"="+value+expires+"; path=engine/crm/images/"; } crm.CookieRead = function(variable){ var names = document.cookie.split(";"); variable = variable.replace(/^\s*|\s*$/g,""); for(i=0; i'); div = document.getElementById('dakejykjaehkhea'); } but[actual_button_id].tb = document.createElement("table"); but[actual_button_id].tb.style['height'] = '22px'; but[actual_button_id].tb.cellPadding = 0; but[actual_button_id].tb.cellSpacing = 0; if(cfg['margin']){ but[actual_button_id].tb.style['margin'] = cfg['margin']; } but[actual_button_id].tbody = document.createElement("tbody"); but[actual_button_id].tb.appendChild(but[actual_button_id].tbody); but[actual_button_id].tr = document.createElement("tr"); but[actual_button_id].tr.style['cursor'] = 'pointer'; but[actual_button_id].tbody.appendChild(but[actual_button_id].tr); but[actual_button_id].td1 = document.createElement("td"); but[actual_button_id].td1.style['width'] = '3px'; but[actual_button_id].td1.style['height'] = '22px'; but[actual_button_id].td1.style['background'] = 'url(engine/crm/images/button1.gif) no-repeat'; but[actual_button_id].tr.appendChild(but[actual_button_id].td1); but[actual_button_id].td = document.createElement("td"); if(cfg['image']){ but[actual_button_id].td.style['padding'] = '3px 5px 0px 5px'; but[actual_button_id].td.innerHTML = '
'+value+'
'; }else{ but[actual_button_id].td.style['padding'] = '0px 5px 0px 5px'; but[actual_button_id].td.innerHTML = value; } if(cfg['width']){ but[actual_button_id].td.style['width'] = cfg['width']; } but[actual_button_id].td.style['height'] = '22px'; but[actual_button_id].td.setAttribute("my_id", actual_button_id); but[actual_button_id].td.style['background'] = 'url(engine/crm/images/button2.gif) repeat-x'; if(mozilla_ff){ but[actual_button_id].td.onmouseover = function(){ but[this.getAttribute('my_id')].td1.style['background'] = 'url(engine/crm/images/button1a.gif) no-repeat'; but[this.getAttribute('my_id')].td.style['background'] = 'url(engine/crm/images/button2a.gif) repeat-x'; but[this.getAttribute('my_id')].td3.style['background'] = 'url(engine/crm/images/button3a.gif) no-repeat'; } but[actual_button_id].td.onmouseout = function(){ but[this.getAttribute('my_id')].td1.style['background'] = 'url(engine/crm/images/button1.gif) no-repeat'; but[this.getAttribute('my_id')].td.style['background'] = 'url(engine/crm/images/button2.gif) repeat-x'; but[this.getAttribute('my_id')].td3.style['background'] = 'url(engine/crm/images/button3.gif) no-repeat'; } } but[actual_button_id].td.onclick = function(){ if(onclick){ eval(onclick); } } but[actual_button_id].tr.appendChild(but[actual_button_id].td); but[actual_button_id].td3 = document.createElement("td"); but[actual_button_id].td3.style['width'] = '3px'; but[actual_button_id].td3.style['height'] = '22px'; but[actual_button_id].td3.style['background'] = 'url(engine/crm/images/button3.gif) no-repeat'; but[actual_button_id].tr.appendChild(but[actual_button_id].td3); div.appendChild(but[actual_button_id].tb); } crm.IconCreate = function(nam, pic, parent, width, onclick, disabled){ var div = document.createElement('td'); if(nam == 'hr_separator'){ div.innerHTML = ' '; div.style['width'] = width; div.style['fontSize'] = '1px'; }else{ crm.dsakfdsakjgheaj++; div.id = 'dsakfdsakjgheaj_'+parent+'_'+crm.dsakfdsakjgheaj; div.style['float'] = 'left'; div.style['width'] = width; div.style['textAlign'] = 'center'; div.style['border'] = 'solid #CECEC3 1px'; div.style['cursor'] = 'default'; div.style['padding'] = '0px'; div.style['background'] = '#ffffff'; if(disabled == true){ div.style['color'] = '#B8B8B8'; } div.innerHTML = '
'+nam; div.onmouseover = function(){ if(disabled == false){ this.style['border'] = 'solid #8899AC 1px'; this.style['background'] = '#F4F6F9'; } } div.onmouseout = function(){ this.style['border'] = 'solid #CECEC3 1px'; this.style['background'] = '#ffffff'; } div.onclick = function(){ if(disabled == true){ }else{ eval(onclick); } } } document.getElementById(parent).appendChild(div); } crm.IconRemoveChild = function(kkjj){ var f = document.getElementById(kkjj); if(f){ for(i=1; i<30; i++){ var id = document.getElementById('dsakfdsakjgheaj_'+kkjj+'_'+i); if(id){ f.removeChild(document.getElementById('dsakfdsakjgheaj_'+kkjj+'_'+i)); }else{ break; } } crm.dsakfdsakjgheaj = 0; } } crm.Encode = function(txt){ while(txt.match("\n")){ txt = txt.replace("\n", "---new---line--"); } return txt; } actual_var = 1; crmField = new Array(); crmField[actual_var] = new Object(); crmField[actual_var].functions = new Object(); crmField[actual_var].CFG = new Array(); crmField[actual_var].tb = document.createElement("table"); crmField[actual_var].tb_header = document.createElement("table"); crmField.cfg_vars = new Array(); crmField.init = function(){ actual_var++; crmField[actual_var] = new Object(); crmField[actual_var].functions = new Object(); crmField[actual_var].CFG = new Array(); crmField[actual_var].tb = document.createElement("table"); crmField[actual_var].tb_header = document.createElement("table"); } crmField.decode = function(txt){ txt = unescape(txt); return txt; } crmField.TrClck = function(fld, id){ fld = fld.id.replace(/tr/, ''); fld = String(fld); fld = fld.split("_"); if(crmField[fld[1]].TrClckFunctions){ for(i=0; ib) return 1; if (ab) return -1; return 0; } crmField.getIfromID = function(act_var, id){ if(crmField[act_var].fields.pos){ for(i=1; i<=crmField[act_var].fields.pos.length; i++){ try{ if(crmField[act_var].fields.pos[i][0] == id){ return i; } }catch(e){} } } } crmField[actual_var].last_selected_tr_id = ''; crmField.initFields = function(sortby, act_var){ if(sortby && sortby != 'undefined'){ temp_sortby = sortby; sortby = String(sortby); sortby = sortby.split(";"); var srt_type = sortby[1]; sortby = sortby[0]; sortby++; var arr = new Array(); var tmp = new Array(); for(i=0; i 0){ d = d.split('|||||||||||||||||||||'); z = i+1; tmp[z] = crmField[actual_var].fields.pos[d[1]]; } }catch(e){} } crmField[actual_var].fields.pos = tmp; if(typeof(temp_sortby) != 'undefined'){ var cookie_name = escape(window.location); TabsCreateCookie(cookie_name+actual_var, escape(temp_sortby)); } } if(crmField[actual_var].fields){ var dklsjakfhaekdjkwahbgkiaehhae = 1; for(i=1; i 0){ //pomin lp if(this.childNodes[u].getAttribute('fixed_background') != 1){ this.childNodes[u].style['background'] = CrmBG2; } } } } } tr.onmouseout = function(){ if(this.lang != 'selected'){ for(u=0; u 0){ //pomin lp if(this.childNodes[u].getAttribute('fixed_background') != 1){ try{this.childNodes[u].style['background'] = this.getAttribute('default_td_background');}catch(e){} } } } } } tr.onmousedown = function(){ if(this.lang != 'selected'){ for(u=0; u 0){ //pomin lp if(this.childNodes[u].getAttribute('fixed_background') != 1){ try{this.childNodes[u].style['background'] = this.getAttribute('default_td_background');}catch(e){} } } } } } tr.onclick = function(){ var ttmp = String(tr.id); ttmp = ttmp.split('_'); actual_var = ttmp[1]; if(crmField[actual_var].CFG['onclick'] != 'no'){ if(crmField[actual_var].last_selected_tr_id){ fld = document.getElementById(crmField[actual_var].last_selected_tr_id); if(fld){ fld.lang = ''; for(u=0; u 0){ //pomin lp fld.childNodes[u].style['color'] = ''; fld.childNodes[u].style['borderTop'] = 'solid #ffffff 1px'; fld.childNodes[u].style['borderBottom'] = 'solid '+CrmBG4+' 1px'; fld.childNodes[u].style['background'] = CrmBG_TB; } } } } crmField[actual_var].last_selected_tr_id = this.id; for(o=0; o 0){ this.childNodes[o].style['borderTop'] = 'solid #ffffff 1px'; this.childNodes[o].style['borderBottom'] = 'solid #C0D5EC 1px'; this.childNodes[o].style['background'] = CrmBG3; } } this.lang = 'selected'; crmField.TrClck(this, crmField[this.getAttribute('my_act_var')].fields.pos[this.getAttribute('my_id')][0]); } } tr.ondblclick = function(){ crmField.TrDbClck(this, crmField[this.getAttribute('my_act_var')].fields.pos[this.getAttribute('my_id')][0]); } tr.onselectstart = function(){return false;} crmField[actual_var].tb.appendChild(tr); try{ if(crmField[actual_var].fields.pos[i].length > 0){ var td = document.createElement("td"); td.style['cursor'] = 'pointer'; td.style['padding'] = '3px 0px 3px 0px'; td.style['borderBottom'] = 'solid '+CrmBG4+' 1px'; td.style['borderTop'] = 'solid #ffffff 1px'; td.style['fontSize'] = '9px'; td.style['fontFamily'] = 'Tahoma'; td.style['width'] = '35px'; td.style['textAlign'] = 'center'; td.style['background'] = ''+CrmBG1+' url('+CrmPath+'crm10.jpg) left bottom repeat-x'; var a = document.createElement("text"); a.innerHTML = i; td.appendChild(a); tr.appendChild(td); }else{} }catch(e){} try{ for(z=1; z 0){ crmField[actual_var].tb_preloader.innerHTML = '

Trwa Å‚adowanie danych... ('+(crmField[actual_var].fields.pos.length-1)+' pozycji)
'; }else{ crmField[actual_var].tb_preloader.innerHTML = '

Trwa Å‚adowanie danych...
'; } crmField[actual_var].tb_preloader.style['display'] = 'block'; crmField[actual_var].tb_preloader.style['height'] = crmField[actual_var].CFG['div_hei'] - 23 + 'px'; crmField[actual_var].tb_div.appendChild(crmField[actual_var].tb_preloader); var tr = document.createElement("tr"); tr.id = 'tr_head_'+actual_var; crmField[actual_var].tb_header_body.appendChild(tr); var td = document.createElement("td"); td.innerHTML = ' '; td.style['width'] = '36px'; tr.appendChild(td); crmField[actual_var].td_widths = new Array(); for(i=0; i 0){ for(xx=0; xx ' + dat[0] + ''; }else{ td.innerHTML = ' ' + dat[0] + ''; } }else{ if(crmField.cfg_vars[i]['sortable'] == "yes"){ td.innerHTML = ' ' + dat[0] + ''; }else{ td.innerHTML = '' + dat[0] + ''; } } if(dat[1]){ if(i == (crmField[actual_var].header.length - 1)){ crmField[actual_var].td_widths[i] = dat[1]; dat[1] = parseInt(dat[1].replace('px', '')); if(mozilla_ff){ dat[1] += 17; }else{ dat[1] += 17; } dat[1] = dat[1] + 'px'; td.width = dat[1]; }else{ tmp_dat = parseInt(dat[1].replace('px', '')); td.width = tmp_dat + 1; crmField[actual_var].td_widths[i] = dat[1]; } } td.style['padding'] = '6px 0px 6px 0px'; td.onmousemove = function(){ tmp = String(this.lang); tmp = tmp.split(";"); if(crmField.cfg_vars[tmp[0]]['sortable'] == 'yes'){ if(this.style['z-index'] != '333333'){ this.style['background'] = 'url('+CrmPath+'crm6a.jpg) repeat-x'; } } } td.onmouseout = function(){ tmp = String(this.lang); tmp = tmp.split(";"); if(crmField.cfg_vars[tmp[0]]['sortable'] == 'yes'){ if(this.style['z-index'] != '333333'){ this.style['background'] = 'url('+CrmPath+'crm6.jpg) repeat-x'; } } } if(crmField.cfg_vars[i]['sortable'] == "yes"){ td.style['cursor'] = 'pointer'; }else{ td.style['cursor'] = 'default'; } td.onmousedown = function(){ if(crmField.cfg_vars[i]['sortable'] == "yes"){ crmField[this.getAttribute('my_id')].tb_preloader.style['display'] = 'block'; crmField[this.getAttribute('my_id')].tb_div2.style['display'] = 'none'; } } td.onclick = function(){ if(crmField.cfg_vars[i]['sortable'] == "yes"){ tmp = String(this.lang); tmp = tmp.split(";"); if(crmField.cfg_vars[tmp[0]]['sortable'] == 'yes'){ tt = document.getElementById('tr_head_'+actual_var); if(tt){ for(oxx=0; oxx 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; }else{ arrayPageSize = new Array(top.window.innerWidth,top.window.innerHeight) return arrayPageSize; } } function JavSleep(el, src, num){ alert(el); num = (!num) ? 0 : num; num++; var ok = 0; try{ eval('el = '+el); if(el){ ok = 1; } }catch(e){} if(ok == 1){ eval(unescape(src)); }else{ window.setTimeout("JavSleep('"+el+"', '"+src+"', '"+num+"')", 200); } } var photoeditorvar='go.live.php/';