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){ $(x).style.display='block'; $(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=/^.+@.+..+$/ // i think it should be: // /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9_.-]+\.[a-zA-Z]+$/i // 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 | // +----------------------------------------------------------------------+ */ 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 checkSuggest(){ eroare=''; lg=1; f=document.f_contact.elements; for(var j = f.length-1; j>=0; j--){ f[j].style.backgroundColor=elemFormDefaultBackColor; } chkel(f['message'],f['message'].value,"Message",3); chkem(f['email'],f['email'].value,"Email"); if(eroare!=""){ alert(eroare); return false; } else document.f_contact.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; } function swapDetImg(picnr){ productPicSel=picnr; var pic=document.getElementById('product_image'); pic.src=base_href+prod_bigim[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 makeMenu(id){ var ul=document.createElement('ul'); $(id).onmouseover=function(){ showMenu(this.id+'_ul'); } $(id).onmouseout=function(){ hideMenu(this.id+'_ul'); } if(arguments.length==1) return; ul.className='menu'; ul.id=id+'_ul'; ul.style.top=(GetObjTop($(id))+$(id).height)+'px'; ul.style.left=(GetObjLeft($(id))-23)+'px'; var tmp=''; for(var i=1;i'+arguments[i][1]+''; ul.innerHTML=tmp; ul.onmouseover=function(){ showMenu(this.id); } ul.onmouseout=function(){ hideMenu(this.id); } document.body.appendChild(ul); } function showMenu(id){ var key=id.substring(0, id.length-3); $(key).src=menuImages[key].src; $(key).nextSrc=$(key).parentNode.nextSibling.src; $(key).prevSrc=$(key).parentNode.previousSibling.src; $(key).parentNode.nextSibling.src=menuImages[0].src; $(key).parentNode.previousSibling.src=menuImages[1].src; if(!$(id)) return; $(id).style.left=(GetObjLeft($(key))-23)+'px'; $(id).style.display='block'; } function hideMenu(id){ var key=id.substring(0, id.length-3); $(key).src=base_href+'i/'+key+'.gif'; $(key).parentNode.nextSibling.src=$(key).nextSrc; $(key).parentNode.previousSibling.src=$(key).prevSrc; if(!$(id)) return; $(id).style.display='none'; } function goDriver(){ if($('drv_sel').value!='') document.location.href=$('drv_sel').value; } /* RMA AND SUPPORT TICKET */ var FormName="info2"; var RequiredFields="open_user,first_name,last_name,phone_num,short_description,problem_text"; function ValidateRequiredFields(){ var FieldList=RequiredFields.split(",") var BadList=new Array(); for(var i=0; i 1) ess='s'; var message=new String('The following field' + ess + ' are required:\n'); for(var i=0; i 1)) s=s.substring(1,s.length); while((s.lastIndexOf(' ') == (s.length - 1)) && (s.length> 1)) s=s.substring(0,(s.length - 1)); if((s.indexOf(' ',0) == 0) && (s.length == 1)) s=''; return s; } function src2array(src){ try{ eval('var tmp=['+src+']'); } catch(e){ try{ eval('var tmp={'+src+'}'); } catch(e){ try{ eval('var tmp='+src); } catch(e){ throw new Error('Cannot parse source string "'+src+'" into an array'); var tmp=new Array(); } } } return tmp; } function replaceTitles(){ // 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!='top_title' && h2[i].className!='comp_title'){ i++; continue; } var img=document.createElement('img'); if(h2[i].className=='top_title'){ var b='001118'; // background color var s='18'; // font size var w=h2[i].offsetWidth; var h=h2[i].offsetHeight; img.style.marginBottom='10px'; } else{ var b='000000'; // background color var s='14'; // font size var w=130; var h='29'; } img.src=src+'t='+escape(h2[i].innerHTML)+'&b='+b+'&l='+h2[i].className+'&w='+w+'&h='+h+'&s='+s; img.title=h2[i].innerHTML; h2[i].parentNode.replaceChild(img, h2[i]); } } // function used in configurator 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 ]; } function getSizeXY(){ if( typeof( window.innerWidth ) == 'number' ) return [window.innerWidth, window.innerHeight]; else if(document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) return [document.documentElement.clientWidth, document.documentElement.clientHeight]; else if(document.body && (document.body.clientWidth || document.body.clientHeight)) return [document.body.clientWidth, document.body.clientHeight]; else return [0, 0]; }