function $(id){ return document.getElementById(id); } function showPicture(b,id){ var scr=window.open(b+'popups/pics.html?id='+id+'&pic=0','fullpic','width=850, height=800, resizable=1, scrollbars=yes'); scr.moveTo(0,0); scr.focus(); } function show3D(b,id,w,h){ var scr1=null; var params='scrollbars=no,status=no,innerWidth='+w+',width='+w+',height='+h; var scr1=window.open(b+'popups/3dview.html?id='+id,'trideewin'+id,params); scr1.moveTo(0,0); if(scr1.innerHeight){ scr1.resizeTo(w+(scr1.outerWidth-scr1.innerWidth),h+(scr1.outerHeight-scr1.innerHeight)); } scr1.focus(); } function showPicfeature(b,id){ scr=window.open(b+'popups/picsfeature.html?id='+id+'&pic=0','fullpic','width=850, height=400, resizable=1'); //scr.moveTo(screen.width/2-250,screen.height/2-200); scr.moveTo(0,0); scr.focus(); } function send_to_friend(url){ scr=window.open(url,'friend','width=500, height=450, resizable=1'); scr.moveTo(screen.width/2-250,screen.height/2-275); scr.focus(); } function compare(url){ get=''; pre='?'; if(document.forms['cmp'].elements['prods[]'].length>1){ for(i=0; i1){ for(i=0; i=4){ win.window.focus(); } } function SetCookie(cookieName,cookieValue,nDays) { var today = new Date(); var expire = new Date(); if(nDays==null || nDays==0) nDays=1; expire.setTime(today.getTime() + 3600000*24*nDays); document.cookie = cookieName+"="+escape(cookieValue)+";expires="+expire.toGMTString()+";path=/"; } function getCookie(name){ var dc = document.cookie; var prefix = name + "="; var begin = dc.indexOf("; " + prefix); if(begin == -1){ begin = dc.indexOf(prefix); if(begin!=0) return null; } else begin+=2; var end = document.cookie.indexOf(";", begin); if(end == -1) end = dc.length; return unescape(dc.substring(begin + prefix.length, end)); } function change_country(x,y){ document.getElementById(x).style.display = 'block'; document.getElementById(y).style.display = 'none'; } function change_same(x,y,z){ document.getElementById(x).style.display = 'block'; document.getElementById(y).style.display = 'none'; document.getElementById(z).style.display = 'block'; } function show_order(j,p){ for(var i=0;i=0) new_price=new_price.substr(0,n+3); vat_price=init_vat_price+totaladd; vat_price+=""; n1=vat_price.indexOf("."); if(n1>=0) vat_price=vat_price.substr(0,n1+3); document.prod_buy.new_price.value=new_price+' '; document.prod_buy.vat_price.value=vat_price+' '; } function check_review(){ eroare=''; lg=1; f=document.review_form.elements; for(var j=f.length-1; j>=0; j--) f[j].style.backgroundColor=elemFormDefaultBackColor; chkel(f['review_title'],f['review_title'].value,"Review Title",2); chkel(f['review_text'],f['review_text'].value,"Review Message",2); if(f['review_text'].value.length>1024) eroare+="The review must have maximum 1024 characters. You have written "+f['review_text'].value.length+".\r\n"; if(f['permit'].value==0) eroare+="You must be logged in order to add a review to this product."; if(eroare!=""){ alerter(eroare); return false; } else document.review_form.submit(); } //FORM.js lg=1; // limba 0=ro, 1=en, 2=fr t1=new Array('Câmpul "', 'The "', ''); t2=new Array('" este necesar.', '" field is required.', ''); t3=new Array('" este prea scurt.', '" field is too short.', ''); t4=new Array('" conține caractere invalide.', '" field contains invalid characters.', ''); t5=new Array('" este invalid.', '" field is invalid.', ''); // BOI = Beginning Of Input // EOI = End Of Input // BOI, followed by one or more whitespace characters, followed by EOI. var reWhitespace = /^s+$/ // BOI, followed by one lower or uppercase English letter, followed by EOI. var reLetter = /^[a-zA-Z]$/ // BOI, followed by one or more lower or uppercase English letters, // followed by EOI. var reAlphabetic = /^[a-zA-Z]+$/ // BOI, followed by one or more lower or uppercase English letters // or digits, followed by EOI. var reAlphanumeric = /^[a-zA-Z0-9]+$/ // BOI, followed by one digit, followed by EOI. var reDigit = /^d/ // BOI, followed by one lower or uppercase English letter // or digit, followed by EOI. var reLetterOrDigit = /^([a-zA-Z]|d)$/ // BOI, followed by one or more digits, followed by EOI. var reInteger = /^d+$/ // BOI, followed by one of these two patterns: // (a) one or more digits, followed by ., followed by zero or more digits // (b) zero or more digits, followed by ., followed by one or more digits // ... followed by EOI. var reFloat = /^((d+(.d*)?)|((d*.)?d+))$/ // BOI, followed by one or more characters, followed by @, // followed by one or more characters, followed by ., // followed by one or more characters, followed by EOI. var reEmail = /^.+@.+..+$/ // VARIABLE DECLARATIONS // pt. a verifica daca este nume var elemFormDefaultBackColor ="#FFFFFF" var elemFormBackColor ="#D9E7E8" var reNamed="@-=[];,/\\~!#$%^&*()_+{}:\"<>?|1234567890" var reName="@=[];,/\\~!#$%^&*()_+{}:\"<>?|" var digits = "0123456789"; var lowercaseLetters = "abcdefghijklmnopqrstuvwxyz" var uppercaseLetters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" // whitespace characters as defined by this sample code var whitespace = " \t\n\r"; // non-digit characters which are allowed in phone numbers var phoneNumberDelimiters = "()- "; // characters which are allowed in international phone numbers // (a leading + is OK) var validWorldPhoneChars = digits + phoneNumberDelimiters + "+"; // U.S. phone numbers have 10 digits. // They are formatted as 123 456 7890 or (123) 456-7890. var digitsInUSPhoneNumber = 10; // non-digit characters which are allowed in ZIP Codes var ZIPCodeDelimiters = "-"; // characters which are allowed in ZIP Code var validZIPCodeChars = digits + ZIPCodeDelimiters // U.S. ZIP codes have 5 or 9 digits. // They are formatted as 12345 or 12345-6789. var digitsInZIPCode1 = 5 var digitsInZIPCode2 = 9 // non-digit characters which are allowed in credit card numbers var creditCardDelimiters = " " function isInteger(sIn){ return reInteger.test(sIn); } function isEmpty(s,n){ if((s == null) || (s.length == 0) || (s.length < n)){ return true; } else return false; } function chkem(fname,a,nume){ // verifica o adresa de e-mail, a=valoarea adresei, nume=numele campului // nu tre sa contina caracterele din ero, tre sa le contina pe ned if(isEmpty(a,4)){ eroare+=t1[lg]+nume+t3[lg]+"\n"; set_error_form(fname); } else if(!reEmail.test(a)){ eroare+=t1[lg]+nume+t5[lg]+"\n"; set_error_form(fname); } } function chknm(fname,s,nume,size){ // verifica un nume, s=valoarea campului, nume=numele campului, cum va fi afisat // verifica daca e mai mic de "size" caractere si daca nu contine caractere invalide // perfecte pt un nume if(isEmpty(s,size)===true){ eroare+=t1[lg]+nume+t3[lg]+"\n"; set_error_form(fname); } else{ z=0; for(j=0; j<=reName.length-1; j++) if(s.indexOf(reName.substring(j,j+1))!=-1) z=1; if(z==1){ eroare+=t1[lg]+nume+t4[lg]+"\n"; set_error_form(fname); } } } function chkel(fname,s,n,l){ // verifica un element, s=valoarea campului, n=numele lui, l=lungimea minima // il verifica daca e mai mic de 4 sau nul if(isEmpty(s,l)){ eroare+=t1[lg]+n+t2[lg]+"\n"; set_error_form(fname); } } function chkph(fname,s,n){ // verifica un numar de telefon, s=valoarea, n=numele // verifica sa contina doar anumite caractere // sa fie mai mare de 2 si sa nu fie nul if(isEmpty(s,2)){ eroare+=t1[lg]+n+t2[lg]+"\n"; set_error_form(fname); } else{ z=0; for(j=0; j<=validWorldPhoneChars.length-1; j++) if(validWorldPhoneChars.indexOf(s.substring(j,j+1))==-1) z=1 if(z==1){ eroare+=t1[lg]+n+t4[lg]+"\n"; set_error_form(fname); } } } function chkcheckbox(fname,nume){ //pt checkbox. verifica daca este checkuit if(!fname.checked){ eroare+=t1[lg]+nume+t2[lg]+"\n"; set_error_form(fname); } } function isUSZIPCode(fname,s,n){ //verifica zip code US. if(isEmpty(s,5)){ eroare+=t1[lg]+n+t2[lg]+"\n"; set_error_form(fname); } else if(!isInteger(s) && s.length!=digitsInZIPCode1){ eroare+=t1[lg]+n+t4[lg]+"(only digits allowed)\n"; set_error_form(fname); } } function isCAZIPCode(fname,s,n){ //verifica zip code CA. if(isEmpty(s,5)){ eroare+=t1[lg]+n+t2[lg]+"\n"; set_error_form(fname); } else if(!s.match(/^[a-z][0-9][a-z] ?[0-9][a-z][0-9]$/ig)){ eroare+=t1[lg]+n+t4[lg]+"\n"; set_error_form(fname); } /* else if(s.length==6 && ('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(0))<0 || '0123456789'.indexOf(s.charAt(1))<0 || 'ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(2))<0 || '0123456789'.indexOf(s.charAt(3))<0 || 'ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(4))<0 || '0123456789'.indexOf(s.charAt(5))<0 )){ eroare+=t1[lg]+n+t4[lg]+"\n"; set_error_form(fname); } else if('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(0))<0 || '0123456789'.indexOf(s.charAt(1))<0 || 'ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(2))<0 || s.charAt(3)!=' ' || '0123456789'.indexOf(s.charAt(4))<0 || 'ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(5))<0 || '0123456789'.indexOf(s.charAt(6))<0){ alert('ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(0))+' '+'0123456789'.indexOf(s.charAt(1))+' '+'ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(2))+' '+s.charAt(3)+' '+'0123456789'.indexOf(s.charAt(4))+' '+'ABCDEFGHJKLMNPQRSTUVWXYZ'.indexOf(s.charAt(5))+' '+'0123456789'.indexOf(s.charAt(6))); eroare+=t1[lg]+n+t4[lg]+"\n"; set_error_form(fname); } */ } function alerter(eroare){ //afiseaza eroarea, asa cum este ea. alert (eroare); } function set_error_form(nameform){ //afiseaza eroarea, asa cum este ea. nameform.style.backgroundColor=elemFormBackColor; nameform.focus; } function checkCAEmail(a){ if(isEmpty(a,4)){ alert('Please input a valid e-mail address.'); return false; } else if(!reEmail.test(a)){ alert('Please input a valid e-mail address.'); return false; } return true; } //LIVESEARCH.js /* // +----------------------------------------------------------------------+ // | Copyright (c) 2004 Bitflux GmbH | // +----------------------------------------------------------------------+ // | Licensed under the Apache License, Version 2.0 (the "License"); | // | you may not use this file except in compliance with the License. | // | You may obtain a copy of the License at | // | http://www.apache.org/licenses/LICENSE-2.0 | // | Unless required by applicable law or agreed to in writing, software | // | distributed under the License is distributed on an "AS IS" BASIS, | // | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | // | implied. See the License for the specific language governing | // | permissions and limitations under the License. | // +----------------------------------------------------------------------+ // | Author: Bitflux GmbH | // +----------------------------------------------------------------------+ */ var LShref=false; var liveSearchReq = false; var t = null; var liveSearchLast = ""; var LSMinimumCharacters=3; var isIE = false; // on !IE we only have to initialize it once if(window.XMLHttpRequest) { liveSearchReq = new XMLHttpRequest(); } function liveSearchInit(){ if(navigator.userAgent.indexOf("Safari") > 0){ document.getElementById('livesearch').addEventListener("keydown",liveSearchKeyPress,false); // document.getElementById('livesearch').addEventListener("blur",liveSearchHide,false); } else if(navigator.product == "Gecko"){ document.getElementById('livesearch').addEventListener("keypress",liveSearchKeyPress,false); document.getElementById('livesearch').addEventListener("blur",liveSearchHideDelayed,false); } else{ document.getElementById('livesearch').attachEvent('onkeydown',liveSearchKeyPress); document.getElementById('livesearch').attachEvent("onblur",liveSearchHide,false); isIE = true; } document.getElementById('livesearch').setAttribute("autocomplete","off"); } function liveSearchHideDelayed(){ window.setTimeout("liveSearchHide()",400); } function liveSearchHide() { document.getElementById("LSResult").style.display = "none"; var highlight=document.getElementById("LSHighlight"); if(highlight){ highlight.removeAttribute("id"); } } function liveSearchKeyPress(event){ //KEY DOWN if(event.keyCode == 40 ){ highlight=document.getElementById("LSHighlight"); if(!highlight){ highlight=document.getElementById("LSShadow").firstChild.firstChild; } else{ highlight.removeAttribute("id"); highlight=highlight.nextSibling; } if(highlight){ highlight.setAttribute("id","LSHighlight"); } if(!isIE){ event.preventDefault(); } } //KEY UP else if(event.keyCode == 38 ) { highlight = document.getElementById("LSHighlight"); if(!highlight) { highlight = document.getElementById("LSResult").firstChild.firstChild.lastChild; } else { highlight.removeAttribute("id"); highlight = highlight.previousSibling; } if(highlight) { highlight.setAttribute("id","LSHighlight"); } if(!isIE) { event.preventDefault(); } } //ESC else if(event.keyCode == 27) { highlight = document.getElementById("LSHighlight"); if(highlight) { highlight.removeAttribute("id"); } document.getElementById("LSResult").style.display = "none"; } //BACKSPACE - required for IE else if(event.keyCode == 8 && isIE) { liveSearchStart(); } //RETURN else if(event.keyCode == 13 ) { return liveSearchSubmit(); } } function liveSearchStart() { if(t){ window.clearTimeout(t); } if(document.forms.searchform.q.value.length>=LSMinimumCharacters-1){ document.getElementById('LSLoading').className='LSLoadingOn'; } t = window.setTimeout("liveSearchDoSearch()",400); } function liveSearchDoSearch() { if(typeof liveSearchRoot == "undefined"){ liveSearchRoot = ""; } if(typeof liveSearchRootSubDir == "undefined"){ liveSearchRootSubDir = ""; } if(typeof liveSearchParams == "undefined"){ liveSearchParams2 = ""; } else { liveSearchParams2 = "&" + liveSearchParams; } if((liveSearchLast!=document.forms.searchform.q.value) && (document.forms.searchform.q.value.length>=LSMinimumCharacters)){ if(liveSearchReq && liveSearchReq.readyState < 4){ liveSearchReq.abort(); } if( document.forms.searchform.q.value == ""){ liveSearchHide(); liveSearchLast = ""; return false; } if(window.XMLHttpRequest) { // branch for IE/Windows ActiveX version } else if(window.ActiveXObject){ liveSearchReq = new ActiveXObject("Microsoft.XMLHTTP"); } liveSearchReq.onreadystatechange= liveSearchProcessReqChange; liveSearchReq.open("GET", base_href + "livesearch.php?q=" + document.forms.searchform.q.value + liveSearchParams2); liveSearchLast = document.forms.searchform.q.value; liveSearchReq.send(null); } else{ document.getElementById('LSLoading').className='LSLoadingOff'; } } function liveSearchProcessReqChange(){ if(liveSearchReq.readyState == 4){ var res = document.getElementById("LSResult"); res.style.display = "block"; var sh = document.getElementById("LSShadow"); sh.innerHTML = liveSearchReq.responseText; } document.getElementById('LSLoading').className='LSLoadingOff'; } function liveSearchSubmit() { var highlight = document.getElementById("LSHighlight"); if(highlight && highlight.firstChild){ window.location =highlight.firstChild.nextSibling.getAttribute("href"); return false; } else { return true; } } function preview(request){ // var previewNode = $('previewComment'); if(!previewNode) { var lastComment = $('bx_foo'); var previewNode = document.createElement("div"); previewNode.id = 'previewComment'; previewNode.className = 'post_content'; previewNode = lastComment.parentNode.insertBefore(previewNode,lastComment.nextSibling); } previewNode.innerHTML = request.responseText; } function previewSubmit(test) { var name = document.getElementById('name').value; var mail = document.getElementById('email').value; var uri = document.getElementById('openid_url').value; var text = document.forms['bx_foo']['comments'].value; var f = document.forms['commentForm']; if(typeof liveSearchRoot == "undefined") { var liveSearchRoot = "/"; } body = "mail=" + encodeURIComponent(mail) + "&uri="+ encodeURIComponent(uri) + "&text="+ encodeURIComponent(text) + "&name="+ encodeURIComponent(name); new ajax (liveSearchRoot + 'inc/bx/php/preview.php', { postBody: body, method: 'post', onComplete: preview }); return false; } document.onmousedown=function(){ if(LShref!=false && LShref!=null){ document.location=LShref; } } //AC_RunActiveContent.js //v1.7 // Flash Player Version Detection // Detect Client Browser type // Copyright 2005-2007 Adobe Systems Incorporated. All rights reserved. var isIE = (navigator.appVersion.indexOf("MSIE")!=-1) ? true : false; var isWin = (navigator.appVersion.toLowerCase().indexOf("win")!=-1) ? true : false; var isOpera = (navigator.userAgent.indexOf("Opera")!=-1) ? true : false; function ControlVersion() { var version; var axo; var e; // NOTE : new ActiveXObject(strFoo) throws an exception if strFoo isn't in the registry try{ // version will be set for 7.X or greater players axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7"); version = axo.GetVariable("$version"); } catch (e) { } if(!version) { try{ // version will be set for 6.X players only axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6"); // installed player is some revision of 6.0 // GetVariable("$version") crashes for versions 6.0.22 through 6.0.29, // so we have to be careful. // default to the first public version version = "WIN 6,0,21,0"; // throws if AllowScripAccess does not exist (introduced in 6.0r47) axo.AllowScriptAccess = "always"; // safe to call for 6.0r47 or greater version = axo.GetVariable("$version"); } catch (e) { } } if(!version) { try{ // version will be set for 4.X or 5.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = axo.GetVariable("$version"); } catch (e) { } } if(!version) { try{ // version will be set for 3.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3"); version = "WIN 3,0,18,0"; } catch (e) { } } if(!version){ try{ // version will be set for 2.X player axo = new ActiveXObject("ShockwaveFlash.ShockwaveFlash"); version = "WIN 2,0,0,11"; } catch(e) { version = -1; } } return version; } // JavaScript helper required to detect Flash Player PlugIn version information function GetSwfVer(){ // NS/Opera version>=3 check for Flash plugin in plugin array var flashVer = -1; if(navigator.plugins!=null && navigator.plugins.length > 0) { if(navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]) { var swVer2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : ""; var flashDescription = navigator.plugins["Shockwave Flash" + swVer2].description; var descArray = flashDescription.split(" "); var tempArrayMajor = descArray[2].split("."); var versionMajor = tempArrayMajor[0]; var versionMinor = tempArrayMajor[1]; var versionRevision = descArray[3]; if(versionRevision == "") { versionRevision = descArray[4]; } if(versionRevision[0] == "d") { versionRevision = versionRevision.substring(1); } else if(versionRevision[0] == "r") { versionRevision = versionRevision.substring(1); if(versionRevision.indexOf("d") > 0) { versionRevision = versionRevision.substring(0, versionRevision.indexOf("d")); } } var flashVer = versionMajor + "." + versionMinor + "." + versionRevision; } } // MSN/WebTV 2.6 supports Flash 4 else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1) flashVer = 4; // WebTV 2.5 supports Flash 3 else if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1) flashVer = 3; // older WebTV supports Flash 2 else if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1) flashVer = 2; else if( isIE && isWin && !isOpera ) { flashVer = ControlVersion(); } return flashVer; } // When called with reqMajorVer, reqMinorVer, reqRevision returns true if that version or greater is available function DetectFlashVer(reqMajorVer, reqMinorVer, reqRevision){ versionStr = GetSwfVer(); if(versionStr == -1 ) { return false; } else if(versionStr!=0) { if(isIE && isWin && !isOpera) { // Given "WIN 2,0,0,11" tempArray = versionStr.split(" "); // ["WIN", "2,0,0,11"] tempString = tempArray[1]; // "2,0,0,11" versionArray = tempString.split(","); // ['2', '0', '0', '11'] } else { versionArray = versionStr.split("."); } var versionMajor = versionArray[0]; var versionMinor = versionArray[1]; var versionRevision = versionArray[2]; // is the major.revision>=requested major.revision AND the minor version>=requested minor if(versionMajor > parseFloat(reqMajorVer)) { return true; } else if(versionMajor == parseFloat(reqMajorVer)) { if(versionMinor > parseFloat(reqMinorVer)) return true; else if(versionMinor == parseFloat(reqMinorVer)) { if(versionRevision>=parseFloat(reqRevision)) return true; } } return false; } } function AC_AddExtension(src, ext){ if(src.indexOf('?')!=-1) return src.replace(/\?/, ext+'?'); else return src + ext; } function AC_Generateobj(objAttrs, params, embedAttrs){ var str = ''; if(isIE && isWin && !isOpera){ str+=' '; } str+=''; } else{ str+='=0; j--){ f[j].style.backgroundColor=elemFormDefaultBackColor; } for(var j = 0; j<5; j++){ if(p['wishlist_email['+j+']'].value!=""){ chkem(p['wishlist_email['+j+']'],p['wishlist_email['+j+']'].value,"Friend Email"); v=1; } } if(v==0 && p['wishlist_comment']=='') eroare='You must insert at least one valid email address'; if(eroare!=""){ alerter (eroare); return false; } else document.send_wishlist.submit(); } function nl_subscribe(){ eroare=''; chkem(document.nl_subscribe.email,document.nl_subscribe.email.value,'Email'); chkel(document.nl_subscribe.name,document.nl_subscribe.name.value,'Name',3); if(eroare!='') alert(eroare); else document.nl_subscribe.submit(); } function accbox_submit(){ eroare=''; chkem(document.accboxform.email,document.accboxform.email.value,'Email'); if(eroare!='') alert(eroare); else document.accboxform.submit(); } function checkSubscribe(){ eroare=''; lg=1; f=document.subscribe.elements; for(var j = f.length-1; j>=0; j--){ f[j].style.backgroundColor=elemFormDefaultBackColor; } chkel(f['name'],f['name'].value,"Name",2); chkem(f['email'],f['email'].value,"Email"); if(eroare!=""){ alert(eroare); return false; } else document.subscribe.submit(); } function recover(cant){ eroare=''; lg=1; f=document.recover_pass.elements; if(cant==1){ f['cant_recover'].value=1; } for(var j = f.length-1; j>=0; j--){ f[j].style.backgroundColor=elemFormDefaultBackColor; } chkem(f['email'],f['email'].value,"Email Address"); if(eroare!=""){ alerter(eroare); return false; } else{ document.recover_pass.submit(); return false; } } function productDetails(tab, detdivpid){ SetCookie('detdiv'+detdivpid,tab,1); document.getElementById('product_tab_'+prod_tab_shown).className='prod_tab_contenth'; document.getElementById('product_tab_'+tab).className='prod_tab_content'; document.getElementById('product_t_'+prod_tab_shown).className=''; document.getElementById('product_t_'+tab).className='sel'; prod_tab_shown=tab; } var selpp=0; function swapDetImg(picnr){ productPicSel=picnr; var pic=document.getElementById('product_image'); pic.src=base_href+prod_bigim[picnr]; if(picnr!=selpp){ $('pp'+picnr).className='v'; $('pp'+selpp).className=''; selpp=picnr; } } function openAccountBox(){ if(document.getElementById('acc_closed').style.display=='none'){ document.getElementById('acc_closed').style.display=''; document.getElementById('acc_opened').style.display='none'; document.getElementById('account_plus').src=base_href+'i/bplus.jpg'; } else{ document.getElementById('acc_closed').style.display='none'; document.getElementById('acc_opened').style.display=''; document.getElementById('account_plus').src=base_href+'i/bminus.jpg'; } } function adjTempl(){ if(document.getElementById('div_right')){ var hright=document.getElementById('div_right').offsetHeight; var hleft=document.getElementById('div_left_cont').offsetHeight; if(hleft'+idx_news[idx_news_i].title+''; setTimeout('idxNews()',4000); } var featLbls=new Array; function featShow(id, w){ if(w==1){ $(id).style.display=''; if(featLbls[id]) clearTimeout(featLbls[id]); } else{ if(featLbls[id]) $(id).style.display='none'; else featLbls[id]=setTimeout('featShow(\''+id+'\')', 10); } } /* GALLERY */ var selImg=0; var fImg=0; var imgs=new Array(); var imgsActive=[0,1,2,3]; function initImgs(x){ if(x>-1) selImg=imgsActive[x]; var j=0; for(var i=0; i<4; i++){ if(fImg+i>=imgs.length) j=fImg+i-imgs.length; else j=fImg+i; document.images['img'+i].src='images/products/t/'+imgs[j]; imgsActive[i]=j; if(j==selImg){ document.images['bigimage'].src='images/products/b/'+imgs[j]; $('img'+i).className='sel'; } else $('img'+i).className=''; } } function moveImg(v){ fImg+=v; if(fImg==imgs.length) fImg=0; else if(fImg<0) fImg=imgs.length-1; initImgs(-1); } function showCartDet(pid, v){ $('ddet'+pid).style.display=(v==0?'':'none'); $('det'+pid).style.display=(v==1?'':'none'); if($('items'+pid)) $('items'+pid).style.display=(v==1?'':'none'); } function cartLogin(){ $('clform').style.display=$('clform').style.display=='none'?'':'none'; } function bonload(){ var hl=$('mleft').offsetHeight; var hr=$('content').offsetHeight-80; var pl=$('mleft').offsetTop; var pr=$('content').offsetTop; var hm=hl; if(hr>=hm) hm=hr; if(pl>190) pr=194; $('mlm').style.height=($('mlm').offsetHeight+hm-$('mleft').offsetHeight+pr-pl+100)+'px'; $('content').style.height=(hm+100)+'px'; $('dcart').style.paddingTop=0+'px'; // replace page title with an image /*var src=base_href+'templates/gdTTL/?'; var h2=document.getElementsByTagName('h2'); var i=0; while(h2.length>i){ if(h2[i].className=='conf_hd'){ i++; continue; } var img=document.createElement('img'); img.src=src+'t='+escape(h2[i].innerHTML)+'&l='+h2[i].className+'&w='+h2[i].offsetWidth+'&h='+h2[i].offsetHeight; img.title=h2[i].innerHTML; img.style.marginBottom='10px'; h2[i].parentNode.replaceChild(img, h2[i]); }*/ } var scrPad=0; window.onscroll=function(){ var tpos=$('dcart').offsetTop; var tscr=getScrollXY()[1]; /*if(tscr>tpos+70){ $('dcart').style.paddingTop=(tscr-tpos-70)+'px'; } else $('dcart').style.paddingTop='0px';*/ if(tscr>tpos+70) scrPad=tscr-tpos-70; else scrPad=0; padIt(); } function padIt(){ var tmp=parseFloat($('dcart').style.paddingTop); var dir=1; if(tmp>scrPad) dir=-1; $('dcart').style.paddingTop=(tmp+dir)+'px'; if(tmp+dir!=scrPad) setTimeout('padIt()', 20); } function getScrollXY(){ var scrOfX = 0, scrOfY = 0; if( typeof( window.pageYOffset ) == 'number' ) { //Netscape compliant scrOfY = window.pageYOffset; scrOfX = window.pageXOffset; } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) { //DOM compliant scrOfY = document.body.scrollTop; scrOfX = document.body.scrollLeft; } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) { //IE6 standards compliant mode scrOfY = document.documentElement.scrollTop; scrOfX = document.documentElement.scrollLeft; } return [ scrOfX, scrOfY ]; }