function $(eid){ return document.getElementById(eid); } function loadExternalImages(){ $('cnt_pricegrabber').innerHTML = 'PriceGrabber User Ratings for MemoryC'; $('cnt_scanalert').innerHTML = 'HACKER SAFE certified sites prevent over 99.9% of hacker crime.'; $('cnt_siteseal').innerHTML=$('cnt_siteseal_src').innerHTML; } var slider=''; var slide_bound_min=0; var slide_bound_max=0; var slide_amount=0; var slider_interval=false; var slider_timeout=false; var slide_limit=0; var slide_speed=5; //less is more if(isIE) slide_speed=3; var slide_type='h'; //h for horizontal and v for vertical function startSlide(slider_id, slider_mid, slider_zero, slider_type){ try{ clearTimeout(slider_timeout); } catch(e){} if(slider==slider_id) return; slider=slider_id; absPos($(slider+'_slide')); slide_type=slider_type; if(slide_type=='h'){ slide_limit=-($(slider+'_slide_tbl').offsetWidth-$(slider+'_slide').offsetWidth); slide_bound_min=$(slider_id+'_slide').absLeft+slider_mid-slider_zero; slide_bound_max=$(slider_id+'_slide').absLeft+slider_mid+slider_zero; } else{ slide_limit=-($(slider+'_slide_tbl').offsetHeight-$(slider+'_slide').offsetHeight); slide_bound_min=$(slider_id+'_slide').absTop+slider_mid-slider_zero; slide_bound_max=$(slider_id+'_slide').absTop+slider_mid+slider_zero; } } function startStopSlide(){ try{ clearTimeout(slider_timeout); } catch(e){} slider_timeout=setTimeout("stopSlide()", 300); } function stopSlide(){ slider=''; } function slideInit(){ if(slider==''){ try{ clearInterval(slider_interval); } catch(e){} return; } var mouse=0; if(slide_type=='h') mouse=document.mouseX; else mouse=document.mouseY+document.body.scrollTop+document.documentElement.scrollTop; slide_amount=0; if(slide_bound_min>mouse) slide_amount=slide_bound_min-mouse; else if(mouse>slide_bound_max) slide_amount=slide_bound_max-mouse; else return; slide_amount=Math.round(slide_amount/slide_speed); if(slide_type=='h'){ if(isNaN(parseInt($(slider+'_slide_tbl').style.marginLeft))) $(slider+'_slide_tbl').style.marginLeft='0px'; } else{ if(isNaN(parseInt($(slider+'_slide_tbl').style.marginTop))) $(slider+'_slide_tbl').style.marginTop='0px'; } try{ clearInterval(slider_interval); } catch(e){} slideMove(); slider_interval=setInterval("slideMove()",50); } function slideMove(){ if(slider=='') return; if(slide_type=='h'){ if(((parseInt($(slider+'_slide_tbl').style.marginLeft)+slide_amount)<=0) && ((parseInt($(slider+'_slide_tbl').style.marginLeft)+slide_amount)>=slide_limit)) $(slider+'_slide_tbl').style.marginLeft=(parseInt($(slider+'_slide_tbl').style.marginLeft)+slide_amount)+'px'; else if(slide_amount>0) $(slider+'_slide_tbl').style.marginLeft='0px'; else if(slide_amount<0) $(slider+'_slide_tbl').style.marginLeft=slide_limit+'px'; } else{ if(((parseInt($(slider+'_slide_tbl').style.marginTop)+slide_amount)<=0) && ((parseInt($(slider+'_slide_tbl').style.marginTop)+slide_amount)>=slide_limit)) $(slider+'_slide_tbl').style.marginTop=(parseInt($(slider+'_slide_tbl').style.marginTop)+slide_amount)+'px'; else if(slide_amount>0) $(slider+'_slide_tbl').style.marginTop='0px'; else if(slide_amount<0) $(slider+'_slide_tbl').style.marginTop=slide_limit+'px'; } } var menuAccountTimeout=0; function menuAccount(show){ if(show==1){ clearTimeout(menuAccountTimeout); $('menuaccount').style.display=''; } else menuAccountTimeout=setTimeout("menuAccountClose()", 200); } function menuAccountClose(){ $('menuaccount').style.display='none'; clearTimeout(menuAccountTimeout); } 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 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(0,0); 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){ $(x).style.display = 'block'; $(y).style.display = 'none'; $(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 pdShowTool(id, hide, e){ var div=$('pdtool_'+id); if(hide) div.style.display='none'; else{ var posx = 0; var posy = 0; if(!e) var e=window.event; if(e.pageX || e.pageY){ posx = e.pageX; posy = e.pageY; } else if(e.clientX || e.clientY){ posx=e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft; posy=e.clientY+document.body.scrollTop+document.documentElement.scrollTop; } div.style.left=posx-150+'px'; div.style.top=posy-130+'px'; div.style.display=''; } } function pdCapacities(type_id){ $('pdmemsize').innerHTML=getFile(base_href+'ajax_prod_det.php?type=memsize&type_id='+type_id); } function pdSimilarMatch(startlink){ var elem=document.forms['pdsf'].elements; var j=0; for(var i=0; i=0; i--) e[i].style.backgroundColor=elemFormDefaultBackColor; if(e['rate'].value=='0') eroare+="Please click a star to rate this product\r\n"; chkel(e['review_title'],e['review_title'].value,"Review Title",2); chkel(e['review_text'],e['review_text'].value,"Review Message",2); if(e['review_text'].value.length>1024) eroare+="The review must have maximum 1024 characters. You have written "+e['review_text'].value.length+".\r\n"; if(e['permit'].value==0) eroare+="You must be logged in order to add a review to this product"; if(eroare!=""){ alerter(eroare); return; } if(preview){ if(e['rate'].value!='0') $('pdra_pv_r').src='i/pdrating'+e['rate'].value+'.gif'; $('pdra_pv_t').innerHTML=e['review_title'].value; $('pdra_pv_c').innerHTML=e['review_text'].value.replace(/\n/g, '
'); if(e['anonymous'][0].checked){ $('pdra_pv_anon').style.display='none'; $('pdra_pv_nanon').style.display=''; } else{ $('pdra_pv_anon').style.display=''; $('pdra_pv_nanon').style.display='none'; } $('pdra_pv').style.display=''; return; } var pk=new Array(); var pv=new Array(); for(var i=0; i=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. s=s.toUpperCase(); if(isEmpty(s,5)){ eroare+=t1[lg]+n+t2[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 || '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); } } 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) { $('livesearch').addEventListener("keydown",liveSearchKeyPress,false); // $('livesearch').addEventListener("blur",liveSearchHide,false); } else if(navigator.product == "Gecko") { $('livesearch').addEventListener("keypress",liveSearchKeyPress,false); $('livesearch').addEventListener("blur",liveSearchHideDelayed,false); } else { $('livesearch').attachEvent('onkeydown',liveSearchKeyPress); $('livesearch').attachEvent("onblur",liveSearchHide,false); isIE = true; } $('livesearch').setAttribute("autocomplete","off"); } function liveSearchHideDelayed() { window.setTimeout("liveSearchHide()",400); } function liveSearchHide() { $("LSResult").style.display = "none"; var highlight = $("LSHighlight"); if(highlight) { highlight.removeAttribute("id"); } } function liveSearchKeyPress(event) { if(event.keyCode == 40 ) //KEY DOWN { highlight = $("LSHighlight"); if(!highlight) { highlight = $("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 = $("LSHighlight"); if(!highlight) { highlight = $("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 = $("LSHighlight"); if(highlight) { highlight.removeAttribute("id"); } $("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) $('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=" + escape(document.forms.searchform.q.value) + liveSearchParams2); liveSearchLast = document.forms.searchform.q.value; liveSearchReq.send(null); } else{ $('LSLoading').className='LSLoadingOff'; } } function liveSearchProcessReqChange() { if(liveSearchReq.readyState == 4) { var res = $("LSResult"); res.style.display = "block"; var sh = $("LSShadow"); sh.innerHTML = liveSearchReq.responseText; } $('LSLoading').className='LSLoadingOff'; } function liveSearchSubmit() { var highlight = $("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 = $('name').value; var mail = $('email').value; var uri = $('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 compet_submit(){ eroare=''; lg=1; f=document.competf.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 Address"); chkel(f['answer'],f['answer'].value,"Answer",5); if(f['email'].value!=f['remail'].value) eroare+='"E-mail" and "Retype E-mail" must be the same.'+"\n"; if(eroare!= ""){ alerter(eroare); return false; } else document.competf.submit(); } function displayVat(val){ SetCookie('display_vat',val,90); window.location.reload(true); } function compet_submit(){ eroare=''; lg=1; f=document.competf.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 Address"); chkel(f['answer'],f['answer'].value,"Answer",5); if(f['answer'].value.length>50) eroare+='"Answer" has a limit of 50 characters. You have entered '+f['answer'].value.length+' characters.'+"\n"; if(f['email'].value!=f['remail'].value) eroare+='"E-mail" and "Retype E-mail" must be the same.'+"\n"; if(eroare!= ""){ alerter(eroare); return false; } else document.competf.submit(); } // AJAX, baby! function getFile(url, callback, post_keys, post_values, xml){ try{ var xmlHttp=new XMLHttpRequest(); } // Firefox, Opera 8.0+, Safari catch (e){ // Internet Explorer try{ var xmlHttp=new ActiveXObject('MSXML2.XMLHTTP.3.0'); } catch(e){ try{ var xmlHttp=new ActiveXObject('MSXML3.XMLHTTP'); } catch(e){ try{ var xmlHttp=new ActiveXObject('Msxml2.XMLHTTP'); } catch(e){ try{ var xmlHttp=new ActiveXObject('Microsoft.XMLHTTP'); } catch(e){ throw new Error("Could not find an XMLHttpRequest alternative."); } } } } } var post_string=''; if(post_keys){ if(!post_values){ for(var i in post_keys) post_string+=escape(i)+'='+post_keys[i]+'&'; } else for(var i=0;i-1?2:0; addEvent(document, 'mousemove', function(evt){ if(!evt) evt=event; document.mouseX=evt.clientX-dumbIE2pxDiff; document.mouseY=evt.clientY-dumbIE2pxDiff; if(slider!='') slideInit(); } ); var iconTooltipDiv=null; function iconTooltip(img, hide){ if(hide){ iconTooltipDiv.style.display='none'; return; } if(!iconTooltipDiv){ iconTooltipDiv=document.createElement('div'); iconTooltipDiv.style.cssText="position: absolute; background-color: #fff; border: 2px #64a4cb solid; padding: 5px 10px; max-width: 300px; min-height: 31px"; document.body.appendChild(iconTooltipDiv); } if(!img.toolTip){ absPos(img); img.toolTip=''+img.title+'
'+img.alt; img.title=''; img.alt=''; } iconTooltipDiv.innerHTML=img.toolTip; iconTooltipDiv.style.display='block'; iconTooltipDiv.style.left=(img.absLeft+img.offsetWidth+5)+'px'; iconTooltipDiv.style.top=img.absTop+'px'; } function chPhoneCode(iid, sel){ var val=''; for(var i=0; i0?(val.length-1):val.length; } function PostCoderList(pc, show){ if(show){ //if(pcAddresses.length==0){ eval("pcAddresses="+getFile(base_href+'ajax_prod_det.php?type=postcoder&pc='+pc)); var t=''; for(var i in pcAddresses){ t+=''; } $('aa_pc_sel').innerHTML=t; //} $('aa_pc').style.display=''; } else{ $('aa_pc').style.display='none'; } } function PostCoderExpand(i){ $('pc_exp_'+i).style.display=($('pc_exp_'+i).style.display==''?'none':''); } function PostCoderAddress(i, j){ var f=document.shipment.elements; f['city'].value=pcAddresses[i].post_town; f['county1'].value=pcAddresses[i].county; f['company'].value=pcAddresses[i].premise[j].organisation; var isint = /^[0-9]+$/ if(isint.test(pcAddresses[i].premise[j].premise)) f['address1'].value=pcAddresses[i].premise[j].premise+(pcAddresses[i].dependent_street?', '+pcAddresses[i].dependent_street:'')+(pcAddresses[i].street?', '+pcAddresses[i].street:'')+(pcAddresses[i].double_dependent_locality?', '+pcAddresses[i].double_dependent_locality:'')+(pcAddresses[i].dependent_locality?', '+pcAddresses[i].dependent_locality:''); else{ f['address1'].value=pcAddresses[i].premise[j].premise; f['address2'].value=pcAddresses[i].dependent_street+(pcAddresses[i].street?(pcAddresses[i].dependent_street?', ':'')+pcAddresses[i].street:'')+(pcAddresses[i].double_dependent_locality?', '+pcAddresses[i].double_dependent_locality:'')+(pcAddresses[i].dependent_locality?', '+pcAddresses[i].dependent_locality:''); } $('aa_pc').style.display='none'; } function postcodeHolderChg(s, v){ if(s==1){ $('postcode_holder').innerHTML='Postcode (*)
'; } else{ v=v.toUpperCase(); postcode_code=v; if(document.shipment.zip.value!=v){ var tmp=getFile(base_href+'ajax_prod_det.php?type=postcoder_chg&pc='+v+'&pcz='+postcode_zid+'&pcs='+postcode_surcharge); if(tmp=='redirect') document.location.href=base_href+'buy/checkout.html?pcredir'; } document.shipment.zip.value=v; $('postcode_holder').innerHTML='Postcode (*)
'+v+'  [change]'; } } function postcodeHolderChgE(s, v){ if(s==1){ $('postcode_holder').innerHTML='Postcode (*)
'; } else{ v=v.toUpperCase(); postcode_code=v; document.shipment.zip.value=v; if(v=='') $('postcode_holder').innerHTML='Postcode (*)
'; else $('postcode_holder').innerHTML='Postcode (*)
'+v+'  [change]'; } } function chgAccType(t){ document.nf.acc_type.value=t; document.shipment.acc_type.value=t; $('acc_type_business').src=base_href+'i/business_off.jpg'; $('acc_type_personal').src=base_href+'i/personal_off.jpg'; $('acc_type_'+t).src=base_href+'i/'+t+'_on.jpg'; $('savebut').style.display=''; } function changeShippingCountry(){ var country=$('country_sel').value; try{ if(country=='GB' && $('postcode').value!='') cart_postcode=$('postcode').value; } catch(e){} var hasvatno_val=''; try{ if($('hasvatno_sel').value=='yes') hasvatno_val=$('hasvatno_val').value; } catch(e){} var tmp=getFile(base_href+'ajax_prod_det.php?type=shippingCountry&country='+country+'&postcode='+cart_postcode+'&vat_value='+hasvatno_val); tmp=tmp.split('|'); $('vat_text').innerHTML=tmp[0]; $('vat_text1').innerHTML=tmp[1]; eval("var cart_vats="+tmp[2]); if(tmp[3]!='' && tmp[3]!='undefined' && tmp[3]!='UNDEFI NED' && tmp[3]!='UNDEFINED') cart_postcode=tmp[3]; else cart_postcode=''; try{ $('postcode').value=cart_postcode; } catch(e){} for(var i in cart_vats) $('cart_vat_'+cart_vats[i].cid).innerHTML=cart_vats[i].txt; //if(country!='GB' || postcode!='') getShippingMethods(); } function changeHasVatNoSel(v){ $('hasvatno_yes').style.display=(v=='yes'?'':'none'); $('hasvatno_no').style.display=(v=='yes'?'none':''); if($('hasvatno_val').value!='') changeShippingCountry(); } function getShippingMethods(){ eval("shippingMethods="+getFile(base_href+'ajax_prod_det.php?type=shippingMethods&weight='+cart_total_weight+'&nopost='+cart_nopost+'&tprice_exvat='+cart_total_price_exvat)); //alert(base_href+'ajax_prod_det.php?type=shippingMethods&weight='+cart_total_weight+'&nopost='+cart_nopost+'&tprice_exvat='+cart_total_price_exvat); while($('shipping_methods_holder').childNodes.length>0) $('shipping_methods_holder').removeChild($('shipping_methods_holder').childNodes[0]); while($('shipping_postcode_holder').childNodes.length>0) $('shipping_postcode_holder').removeChild($('shipping_postcode_holder').childNodes[0]); var mtr=''; var mtd=''; var country=$('country_sel').value; if(country=='IE'){ mtr=document.createElement('tr'); mtr.id='shipping_methods_collect'; mtr.style.display='none'; $('shipping_methods_holder').appendChild(mtr); mtd=document.createElement('td'); mtd.setAttribute("colSpan", "3"); mtd.colSpan=3; mtr.appendChild(mtd); mtd.innerHTML='Close
\r\n'; mtd.innerHTML+='Customers in Ireland are able to collect orders from the MemoryC offices in Celbridge, Co. Kildare - no surcharge!\r\n'; mtd.innerHTML+='
  • If all items on your order are marked as being in stock, your order will be ready for collection within 30 minutes (Mon-Fri 9am to 5.30pm).
  • If one of more items on your order is not in stock we will inform you via email/phone as soon as the product is in stock and the order ready for collection.

\r\n'; mtd.innerHTML+='Terms and Conditions for collection of orders:\r\n'; mtd.innerHTML+='
  • All orders must be paid via our website when the order is placed
  • Orders will be held for max. 7 working days
  • If a customer is unable to collect, we can ship the order instead. In this case, a new shipping charge must be paid by customer.

\r\n'; mtd.innerHTML+='Do you wish to collect this order from MemoryC?
\r\n'; mtd.innerHTML+='Yes No'; } else if(country=='GB'){ mtr=document.createElement('tr'); $('shipping_postcode_holder').appendChild(mtr); mtd=document.createElement('td'); mtd.setAttribute("valign", "middle"); mtd.valign='middle'; mtd.className='bigprice'; mtr.appendChild(mtd); mtd.innerHTML='Shipping address post code:'; mtd=document.createElement('td'); mtd.setAttribute("colSpan", "2"); mtd.colSpan=2; mtr.appendChild(mtd); mtd.innerHTML=''; if(shippingMethods.length){ mtr=document.createElement('tr'); $('shipping_postcode_holder').appendChild(mtr); mtd=document.createElement('td'); mtd.setAttribute("colSpan", "3"); mtd.colSpan=3; mtd.setAttribute("bgColor", "#D9E7E8"); mtd.bgColor='#D9E7E8'; mtd.style.height='2px'; mtr.appendChild(mtd); mtd.innerHTML=''; } } if(shippingMethods.length){ mtr=document.createElement('tr'); mtr.id='shipping_methods'; $('shipping_methods_holder').appendChild(mtr); mtd=document.createElement('td'); mtd.setAttribute("colSpan", "2"); mtd.colSpan=2; mtr.appendChild(mtd); mtd.innerHTML='Click here for further informationShipping Method:'+(country=='IE'?' Want to collect this order?':''); mtd=document.createElement('td'); mtr.appendChild(mtd); mtd.innerHTML=' '; mtr=document.createElement('tr'); mtr.id='shipping_methods'; $('shipping_methods_holder').appendChild(mtr); mtd=document.createElement('td'); mtd.setAttribute("colSpan", "2"); mtd.colSpan=2; mtr.appendChild(mtd); var sm=''; var tbl=''; for(var i=0; i