function swapImage(imgRef,imgPath){ if(imgPath!=null) initSrc = imgRef.src; if(imgPath==null) imgPath = initSrc; else imgPath = "http://images.kmart.com/assets/images/" + imgPath; if(document.images) imgRef.src = imgPath; } function preloadImages(){ var args = preloadImages.arguments; if(document.images){ for(var i=0;i= 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 openWindowReturnRef(url,winName,width,height){ var winRef = window.open(url,winName, "height=" + height + ",width=" + width + ",status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=no,titlebar=no"); return winRef; } function openWindow(url,winName,width,height){ var winRef = openWindowReturnRef(url,winName,width,height) } function openWindowPopUp(url,winName,width,height){ var winRef = window.open(url,winName,"width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=no,scrollbars=yes,titlebar=no,top=0,left=0"); } function openWindowPopUp1(url,winName,width,height){ var winRef = window.open(url,winName,"width=" + width + ",height=" + height + ",status=no,toolbar=no,menubar=no,location=no,directories=no,resizable=yes,scrollbars=no,titlebar=no"); } function confirmWindow(url, text) { if (confirm(text)) { window.go = url; window.location = url; } } function openNewWin(URL,winWidth,winHeight,popUpWin,winName) { var w=800, h=600; //Check if 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'; } //Generate window name with random number (ie 'win274'). if (winName == null) { winName = 'win'+Math.floor(Math.random()*1000); } var leftPos=(w-popW)/2, topPos=(h-popH)/2; 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); }