function test() { alert('test'); } function OpenOrdrPrsnttn(url) { return WindowOpen(url,'OrderingPresentation',700,550); } function WindowOpen(url) { var windowname = arguments[1] ? arguments[1] : '_blank'; var opt = ''; var p=''; if (arguments[2]) { opt += p+'width='+arguments[2]; p=','; } if (arguments[3]) { opt += p+'height='+arguments[3]; p=','; } opt += p+'toolbar='+(arguments[4] ? arguments[1] : 'no'); p=','; opt += ',location='+(arguments[5] ? arguments[5] : 'no'); opt += ',directories='+(arguments[6] ? arguments[6] : 'no'); opt += ',status='+(arguments[7] ? arguments[7] : 'no'); opt += ',menubar='+(arguments[8] ? arguments[8] : 'no'); opt += ',scrollbars='+arguments[9] ? arguments[9] : 'yes'; opt += ',resizable='+arguments[10] ? arguments[10] : 'yes'; opt += ',copyhistory'+arguments[11] ? arguments[11] : 'no'; // opt += arguments[] ? arguments[] : 'no'; // opt += arguments[] ? arguments[] : 'no'; return window.open(url,windowname,opt); } // ------------------------------------------------------------------------------- // Anchor Position // Umożliwia ustalenie x,y położenia objektu na stronie // Źródło: http://www.mattkruse.com/javascript/anchorposition/source.html // ------------------------------------------------------------------------------- function getAnchorPosition(anchorname) { // This function will return an Object with x and y properties var useWindow=false; var coordinates=new Object(); var x=0,y=0; // Browser capability sniffing var use_gebi=false, use_css=false, use_layers=false; if (document.getElementById) { use_gebi=true; } else if (document.all) { use_css=true; } else if (document.layers) { use_layers=true; } // Logic to find position if (use_gebi && document.all) { x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); } else if (use_gebi) { var o=document.getElementById(anchorname); x=AnchorPosition_getPageOffsetLeft(o); y=AnchorPosition_getPageOffsetTop(o); } else if (use_css) { x=AnchorPosition_getPageOffsetLeft(document.all[anchorname]); y=AnchorPosition_getPageOffsetTop(document.all[anchorname]); } else if (use_layers) { var found=0; for (var i=0; i"; res += "

"+sections[section_id]['text']+"

"; res += "

"; res += " "+ProductListConstructor( section_id ); res += ""; res += ""; res += ProductDetailsConstructor( section_id ); document.write( res ); } function ProductListConstructor( section_id ) { var res = ""; for ( product_no = 0; product_no < sections[section_id]['products'].length; product_no++ ) { m_out = "ProductDetailsView('"+sections[section_id]['products'][product_no]['id']+"',0);"; m_over = "ProductDetailsView('"+sections[section_id]['products'][product_no]['id']+"',1);"; m_click = "ProductDetailsView('"+sections[section_id]['products'][product_no]['id']+"',2);"; res += ""; res += ""; res += ""; res += ""; res += ""; res += "
" res += "
"; res += "
"; res += " "; res += "
"; res += "
"; res += "
"; res += "
"; res += sections[section_id]['products'][product_no]['name']; res += "
"; res += "
"; } return( res ); } function ProductDetailsConstructor( section_id, product_no ) { var res = ""; for ( product_no = 0; product_no < sections[section_id]['products'].length; product_no++ ) { href_zoom = "javascript:ProductImageZoom('"+section_id+"',"+product_no+");"; res += "
"; res += ""; res += ""; res += ""; res += ""; res += ""; res += "
" res += "
"+sections[section_id]['products'][product_no]['name']; if ( sections[section_id]['products'][product_no]['symb'] ) { res += " / "+sections[section_id]['products'][product_no]['symb']+""; } res += "
"; if ( sections[section_id]['products'][product_no]['size'] ) { res += " "+sections[section_id]['products'][product_no]['size']+""; } res += "
"; res += "
"+sections[section_id]['products'][product_no]['descr']+"
"; if ( sections[section_id]['products'][product_no]['more'] ) { res += " "+ProductDetailsMoreConstructor( section_id, product_no ); } res += " "; res += "
"; res += "
"; res += "
"; res += "
"; } return( res ); } function ProductImageZoom( section_id, product_no ) { //alert( section_id+","+product_no ); win=window.open('','ProductZoom','status=no,scrollbars=no,width=700,height=550,left=20,top=20'); code = ""; code += ""; code += ""+sections[section_id]['title']+" - "+sections[section_id]['products'][product_no]['name']+""; code += ""; code += ""; code += ""; code += ""; code += ""; code += ""; code += "
"; code += "
"; code += "
"; code += ""; code += ""; win.document.write(code); } function ProductDetailsMoreConstructor( section_id, product_no ) { var res = ""; for ( more_no = 0; more_no < sections[section_id]['products'][product_no]['more'].length; more_no++ ) { m_out = "ProductMoreView("+product_no+","+more_no+",0);"; m_over = "ProductMoreView("+product_no+","+more_no+",1);"; m_click = "ProductMoreView("+product_no+","+more_no+",2);"; res += "
"+sections[section_id]['products'][product_no]['more'][more_no]['name']+"
"; res += "
" res += sections[section_id]['products'][product_no]['more'][more_no]['text']; res += ""; res += "
"; } return(res); } var symb_select; var symb_select_prev; var more_select; function ProductDetailsView( symb, m_state ) { ProductDetailsObj = document.getElementById( "ProductDetails"+symb ); ProductPhotoMiniObj = document.getElementById( "ProductPhotoMini"+symb ); ProductNameListObj = document.getElementById( "ProductName"+symb ); if ( m_state == 0 || m_state == 1 ) { if ( symb != symb_select ) { ProductNameListObj.className = "productName"+m_state; ProductPhotoMiniObj.className = "productPhotoMini"+m_state; } return; } else if ( m_state == 2 ) { if ( symb_select_prev != undefined ) { // details (previous product) - hide ProductDetailsPrevObj = document.getElementById( "ProductDetails"+symb_select_prev ); ProductNameListPrevObj = document.getElementById( "ProductName"+symb_select_prev ); ProductPhotoMiniPrevObj = document.getElementById( "ProductPhotoMini"+symb_select_prev ); ProductDetailsPrevObj.style.display = "none"; ProductNameListPrevObj.className = "productName0"; ProductPhotoMiniPrevObj.className = "productPhotoMini0"; } symb_select_prev = symb; if ( symb == symb_select ) { // details - hide ProductDetailsObj.style.display = "none"; ProductNameListObj.className = "productName0"; symb_select = null; more_select = null; } else { // details - show ProductDetailsObj.style.display = "block"; ProductNameListObj.className = "productName2"; ProductPhotoMiniObj.className = "productPhotoMini2"; symb_select = symb; document.location = "#Details"+symb; } return; } } function ProductMoreView( product_no, more_no, m_state ) { ProductMoreObj = document.getElementById( "ProductMore"+product_no+""+more_no ); ProductMoreLinkObj = document.getElementById( "ProductMoreLink"+product_no+""+more_no ); if ( more_no != more_select ) { if ( m_state == 1 || m_state == 0 ) { ProductMoreLinkObj.className = "productMoreLink"+m_state; } else if ( m_state == 2 ) { // more - show ProductMoreObj.style.display = "block"; ProductMoreLinkObj.className = "productMoreLink2"; more_select = more_no; document.location = "#More"+product_no+""+more_no; } return; } else { if ( m_state == 2 ) { // more - hide ProductMoreObj.style.display = "none"; ProductMoreLinkObj.className = "productMoreLink0"; more_select = null; } return; } } function mouse_ctrl(nullz,nully) { return; } var moretxtarr=Array(); function more(id,targetElement,onmouseaction) { o=document.getElementById(id); obutt=document.getElementById(id+'_morebutt'); if (moretxtarr[id+'_moretext']==null) { moretxtarr[id+'_moretext']=obutt.innerHTML; } var onMouseOverData; var onMouseOutData; var onClickData; if (onmouseaction=="click" || onmouseaction==null) { onMouseOverData="window.status=''; return(true)"; onMouseOutData="window.status=''; return(true)"; onClickData="more('"+id+"')"; } else if (onmouseaction=="over") { if ( o.style.display=="block" ) { onClickData="void(null)"; onMouseOverData="more('"+id+"','','over'); window.status=''; return(true)"; onMouseOutData="window.status=''; return(true)"; } else { onClickData="void(null)"; onMouseOverData="window.status=''; return(true)"; onMouseOutData="more('"+id+"','','over'); window.status=''; return(true)"; } } onmouseaction="onMouseOver=\""+onMouseOverData+"\" onMouseOut=\""+onMouseOutData+"\" onClick=\""+onClickData+"\""; //alert( moretxtarr[id+'_moretext'] ); // Buttons HTML code butt_more=""+moretxtarr[id+'_moretext']+""; butt_close=""+moretxtarr[id+'_moretext']+""; // Buttons replace if ( o.style.display=="none" ) { o.style.display="block"; obutt.innerHTML=butt_close; } else { o.style.display="none"; obutt.innerHTML=butt_more; } } var tmp=Array(); function copyElement(from,to) { //alert(from+"->"+to); ofrom=document.getElementById(from); oto=document.getElementById(to); oto.innerHTML=ofrom.innerHTML; if (from==tmp['prevfrom']) { oto.style.display="none"; tmp['prevfrom']=null; } else { oto.style.display="block"; tmp['prevfrom']=from; } } var win=null; function imgzoom(w,h,imgurl,infotext) { // Detect browser NN=(document.layers)? true:false; IE=(document.all)? true:false; var infotext; if (w<200) { w=w+100; } if (win!=null) if (!win.closed) { win.window.close(); } win=window.open('','win','status=no,scrollbars=no,width='+w+',height='+h+',left=20,top=20'); Code="\n" +"\n" +"" +"Zoom\n" +"\n" +"\n" +"
" +"" +"
" +"" +"
\n"; if (infotext) { Code+="
"+infotext+"
" } else { Code+=""; } Code+="\n"; if (infotext) { Code+=""; //+""; Code+=""; } Code+=""; win.document.write(Code); //win.location.reload(); } // 123 function tooltip(mode,text) { //omode=document.getElementById('mode'); //omode.innerHTML=mode; var mouseX = event.clientX + document.body.scrollLeft; var mouseY = event.clientY + document.body.scrollTop; if (mode=="show") { otooltip=document.getElementById('tooltip'); otooltip.innerHTML=text; otooltip.style.visibility="visible"; otooltip.style.position="absolute"; otooltip.style.left=mouseX+10; otooltip.style.top=mouseY+10; } else if (mode=="move") { otooltip.style.left=mouseX+10; otooltip.style.top=mouseY+10; } else if (mode=="hide") { otooltip.style.visibility="hidden"; text=null; } } // Skrypt podświetlający linie produktową (link z logosem) function prodlineglow(elementid,mousestate) { element=document.getElementById(elementid); if (mousestate=="over") { element.className="prodlineover"; } else { element.className="prodline"; } }