/** * Most of the scripts below were found at * www.alistapart.com and related sites. They are used * here because they are web standards compliant. These * scripts are all free to reuse and are not licensed as * part of the Kryptronic Hybrid X Core (KHXC). * * All onload() events go at the bottom of this file. */ /** * Function DisableSubmit() used to disable submit buttons * after then have been depressed. This is implemented to * stop multiple click submissions of forms. */ var submitted = false; function DisableSubmit(formname) { if(submitted == true) { return; } document.forms[formname].submit(); document.forms[formname].SUBMIT.value = 'Please Wait...'; document.forms[formname].SUBMIT.disabled = true; submitted = true; } /** * Function externalLinks() used to provide a standards * compliant way of producing a pop-up link to another * page. */ function externalLinks() { if (!document.getElementsByTagName) return; var anchors = document.getElementsByTagName("a"); for (var i=0; i0) { document.getElementById(inputShow).value=inputQuantityValue; } document.getElementById(divShow).innerHTML=inputQuantityValue; } } /** *** Handle Tab Box OMG **/ function createCookie(name,value,days) { if (days) { var date = new Date(); date.setTime(date.getTime()+(days*24*60*60*1000)); var expires = "; expires="+date.toGMTString(); } else var expires = ""; document.cookie = name+"="+value+expires+"; path=/"; } function readCookie(name) { var nameEQ = name + "="; var ca = document.cookie.split(';'); for(var i=0;i < ca.length;i++) { var c = ca[i]; while (c.charAt(0)==' ') c = c.substring(1,c.length); if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); } return null; } function switchTab(tabHighlight,checkCookieStatus) { if((readCookie('OMGSetTab') == 'JSTabSearch' || readCookie('OMGSetTab') == 'JSTabAccount' || readCookie('OMGSetTab') == 'JSTabCart') && checkCookieStatus == 1) { tabHighlight = readCookie('OMGSetTab'); } createCookie('OMGSetTab',tabHighlight,1); if(tabHighlight == 'JSTabSearch') { document.getElementById('JSTabSearch').style.backgroundImage = "url(/skins/OMGUKSKIN/media/searchtabhover.jpg)"; document.getElementById('JSTabAccount').style.backgroundImage = "url(/skins/OMGUKSKIN/media/myaccounttab.jpg)"; document.getElementById('JSTabCart').style.backgroundImage = "url(/skins/OMGUKSKIN/media/carttab.jpg)"; document.getElementById('JSTabSearch').style.color = "#ffffff"; document.getElementById('JSTabAccount').style.color = "#9a9a9a"; document.getElementById('JSTabCart').style.color = "#9a9a9a"; document.getElementById('JSTabBox1').style.display = "block"; document.getElementById('JSTabBox2').style.display = "none"; document.getElementById('JSTabBox3').style.display = "none"; } else if(tabHighlight == 'JSTabAccount') { document.getElementById('JSTabSearch').style.backgroundImage = "url(/skins/OMGUKSKIN/media/searchtab.jpg)"; document.getElementById('JSTabAccount').style.backgroundImage = "url(/skins/OMGUKSKIN/media/myaccounttabhover.jpg)"; document.getElementById('JSTabCart').style.backgroundImage = "url(/skins/OMGUKSKIN/media/carttab.jpg)"; document.getElementById('JSTabSearch').style.color = "#9a9a9a"; document.getElementById('JSTabAccount').style.color = "#ffffff"; document.getElementById('JSTabCart').style.color = "#9a9a9a"; document.getElementById('JSTabBox1').style.display = "none"; document.getElementById('JSTabBox2').style.display = "block"; document.getElementById('JSTabBox3').style.display = "none"; } else if(tabHighlight == 'JSTabCart') { document.getElementById('JSTabSearch').style.backgroundImage = "url(/skins/OMGUKSKIN/media/searchtab.jpg)"; document.getElementById('JSTabAccount').style.backgroundImage = "url(/skins/OMGUKSKIN/media/myaccounttab.jpg)"; document.getElementById('JSTabCart').style.backgroundImage = "url(/skins/OMGUKSKIN/media/carttabhover.jpg)"; document.getElementById('JSTabSearch').style.color = "#9a9a9a"; document.getElementById('JSTabAccount').style.color = "#9a9a9a"; document.getElementById('JSTabCart').style.color = "#ffffff"; document.getElementById('JSTabBox1').style.display = "none"; document.getElementById('JSTabBox2').style.display = "none"; document.getElementById('JSTabBox3').style.display = "block"; } }