function setAddTo(addToType, submitForm) { // utility_javascript.jsp document.productForm.addTo.value = addToType; if ((document.productForm.personalize.checked)) { document.productForm.action='personalization.jsp'; } if (submitForm) document.productForm.submit(); } function addToWishlist() { document.productForm.addTo.value = 2; document.productForm.submit(); } function show_message(){ target=document.getElementById("persMessage"); target.style.display=''; document.getElementById("noPersonalize").checked=false; } function hide_message(){ target=document.getElementById("persMessage"); target.style.display="none"; document.getElementById("personalize").checked=false; } utilityBrowserVer = parseInt(navigator.appVersion); function imgOn(imgName) { if (utilityBrowserVer >= 3) { imgOnString = eval(imgName + "_on.src"); document.images[imgName].src = imgOnString; } } function imgOff(imgName) { if (utilityBrowserVer >= 3) { imgOffString = eval(imgName + "_off.src"); document.images[imgName].src = imgOffString; } } function goToLink(address) { var linkURL = address.options[address.selectedIndex].value; window.top.location.href = linkURL; address.selectedIndex=0; } function openWindow(address, width, height) { var newWindow = window.open(address, 'Popup_Window', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no'); newWindow.focus(); } function openWindow(address, width, height, showScrollbars) { var newWindow = window.open(address, 'Popup_Window', 'width=' + width + ',height=' + height + ',toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=' + showScrollbars + ',resizable=no'); newWindow.focus(); } function confirmWindow(url, text) { if (confirm(text)) { window.go = url; window.location = url; } } function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i lastIndex) { index = string.indexOf(match, lastIndex); if (index == -1) { break } result += string.substring(lastIndex, index) + replacement; lastIndex = index + match.length; } result += string.substring(lastIndex, string.length); return result; } /* MaxG: 2004/01/06 This function unescape the encoded string, and replace the plus sign(+) with a space */ function encodeReplace(str){ var result = unescape(str); result = stringReplace(result, "+", " "); return result; } /* This function opens a new window. */ function openNewWindow(URL, winWidth, winHeight, popUpWin, windowName) { // Default window width and height, if not passed in. var w=800, h=600; //Check browser is IE. if (document.all) { w=document.body.clientWidth; h=document.body.clientHeight; } else { w=window.innerWidth; h=window.innerHeight; } //Check if window width was passed. If so, use that width. if (winWidth != null) { var popW=winWidth; } else { var popW=(w-100); } //Check if window height was passed. If so, use that height. if (winHeight != null) { var popH=winHeight; } else { var popH=(h-100); } //Check if window should be opened as popup. if (popUpWin != null) { var noPopUp = 'yes'; if (popUpWin.toLowerCase() == 'y' || popUpWin.toLowerCase() == 'yes') { noPopUp = 'no'; } } else { var noPopUp = 'yes'; } // Create the window name, if not passed in. if (windowName != null) { // Use the window name passed in. var winName = windowName; } else { //Generate window name with random number (ie 'win274'). var winName = 'win'+Math.floor(Math.random()*1000); } // Set the window positions. var leftPos=(w-popW)/2, topPos=(h-popH)/2; // Open the new window. newWindow=window.open(URL,winName,'width='+popW+',height='+popH+',top='+topPos+',left='+leftPos+',menubar='+noPopUp+',location='+noPopUp+',directories='+noPopUp+',fullscreen=no,resizable='+noPopUp+',scrollbars=yes,status=no,titlebar=yes,toolbar='+noPopUp); } function closeWinAndRedirect(url) { window.opener.location.href = url; window.close(); } function setWindowTitle(title) { if (title != null && title != "") window.document.title = title; } /* MaxG: 2005/01/25 WebLoyaty Project This function will open new window full screen according to client's screen area display settings */ function NewWindow(url,name,scroll){ var win= null; var w = (screen.width-12); var h = (screen.height-55); var settings ='height='+h+','; settings +='width='+w+','; settings +='top='+0+','; settings +='left='+0+','; settings +='scrollbars='+scroll+','; settings +='menubar=yes'+','; settings +='toolbar=yes'+','; settings +='status=yes'+','; settings +='location=yes'+','; settings +='resizable=yes'; win=window.open(url,name,settings); if(parseInt(navigator.appVersion) >= 4){ win.window.focus(); } } function keyPersonalize(e) { var key; var keychar; if (window.event) key = window.event.keyCode; else if (e) key = e.which; else return true; keychar = String.fromCharCode(key); keychar = keychar.toLowerCase(); // control keys if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) ) return true; else if ((("abcdefghijklmnopqrstuvwxyz01234567890 `~!@#$%^&*()_+-=[]{}\\;:\'\",<.>/?|").indexOf(keychar) > -1)) return true; else { alert("We're sorry. At this time we are unable to personalize with any characters that do not appear on a standard U.S.A. keyboard."); return false; } }