// --------------------------------------------------------------------- // onLoad Handler // --------------------------------------------------------------------- var old = window.onload; // catch any existing onload calls 1st window.onload = function () { if (old) { // execute existing onloads old(); }; for (var ii = 0; arguments.callee.actions.length > ii; ii++) { arguments.callee.actions[ii](); }; }; window.onload.actions = []; // --------------------------------------------------------------------- // fixLinks // --------------------------------------------------------------------- function fixLinks() { if (!document.getElementsByTagName) return null; var server = document.location.hostname; var anchors = document.getElementsByTagName("a"); var id, href, title; for(var i=0; i < anchors.length; i++){ if(!anchors[i].href) continue; href = anchors[i].href; title = anchors[i].title; id = anchors[i].id; if(href.indexOf(server) == -1){ // Href is not a file on my server if(href.indexOf("javascript:") == -1){ // Href is not a javascript call if(!anchors[i].onclick){ // Href does not have an onclick event if(href.indexOf("mailto:") == -1){ // Href is not a mailto: if (((href.indexOf("http://") != -1) || (href.indexOf("https://") != -1)) && href.indexOf('garelickfarms.com2') == -1 ){ // Href is not relative (for Safari) // or pointing to our server (from Atomz) anchors[i].setAttribute("target","_blank"); anchors[i].setAttribute("title",title + " [This Link Will Open in a New Window]"); } } } } } } return null; } window.onload.actions.push(fixLinks); // sIFR replace statements (for the pretty fonts) function runMyIFR() { if (sIFR != null && sIFR.replaceElement != null) { sIFR.replaceElement('.additional_content h3.replace', '/justLeftHand.swf', '#006600', '#000000', '#000000', '#F1F1E3', 0, 0, 0, 0); sIFR.replaceElement('h3.main', '/justLeftHand.swf', '#006600', '#000000', '#000000', '#e3e3c7', 0, 0, 0, 0); }; }; window.onload.actions.push(runMyIFR); function productSwap(version,link_item){ rawImage = getStyle(document.getElementById('product_center'),'backgroundImage'); document.getElementById('product_image').style.backgroundImage = rawImage.replace(/((\.jpg)|(\.gif))/g,"_"+version+"$1"); link_item.onmouseout = function(){ document.getElementById('product_image').style.backgroundImage = ''; } } function getStyle (element, prop) { if (element.style[prop]) { // inline style property return element.style[prop]; } else if (element.currentStyle) { // external stylesheet for Explorer return element.currentStyle[prop]; } else if (document.defaultView && document.defaultView.getComputedStyle) { // external stylesheet for Mozilla and Safari 1.3+ prop = prop.replace(/([A-Z])/g,"-$1"); prop = prop.toLowerCase(); return document.defaultView.getComputedStyle(element,"").getPropertyValue(prop); } else { // Safari 1.2 return null; } }