var isNetscape = (document.layers) ? true : false; ///////////////////////////////////////////////////////////////// function getDiv(who){ return document.getElementById(who).style; } ///////////////////////////////////////////////////////////////// function windowWidth(){ return (isNetscape) ? (window.innerWidth + document.scrollLeft) : (document.body.clientWidth + document.body.scrollLeft); } ///////////////////////////////////////////////////////////////// function windowHeight(){ return (isNetscape) ? (window.innerHeight + document.scrollTop) : (document.body.clientHeight + document.body.scrollTop); } var topTabs = new Array(); ///////////////////////////////////////////////////////////////// var topTabsSrc = new Array( 'Gifts_files/bath_off.gif', 'Gifts_files/bath_on.gif', 'Gifts_files/kitchen_off.gif', 'Gifts_files/kitchen_on.gif', 'Gifts_files/hardware_off.gif', 'Gifts_files/hardware_on.gif' ); ///////////////////////////////////////////////////////////////// var topTabXOffsets = new Array (427, 346, 251); var topTabXAbsolutes = new Array (73, 168, 265); var atomzXAdj = 0; var atomzWAdj = 0; ///////////////////////////////////////////////////////////////// function setAtomzAdj() { atomzXAdj = 98; atomzWAdj = 193; } ///////////////////////////////////////////////////////////////// function preloadTopTabs() { for (i=0; i 0) { dx = -1; } // for odd-numbered window widths, adjust alignment by one pixel. if (navigator.appName=="Netscape"){dy=0}; if (w > 1000 - atomzWAdj) { getDiv(id).top=75 + dy; getDiv(id).left=(windowWidth()/2) - topTabXOffsets[num] + dx + atomzXAdj; } else { getDiv(id).top=75 + dy; // if the window is less than 1000px wide, horizontal placement must be measured from the left edge. getDiv(id).left=topTabXAbsolutes[num]; } } ///////////////////////////////////////////////////////////////// function show(id) { if (document.getElementById(id) != null) {document.getElementById(id).style.visibility = "visible";} } ///////////////////////////////////////////////////////////////// function hide(id) { if (document.getElementById(id) != null) {document.getElementById(id).style.visibility = "hidden";} // document.getElementById(id).style.visibility = "hidden"; } ///////////////////////////////////////////////////////////////// function showTopMenu(num) { document.images["topTab" + num].src = topTabs[(num*2) + 1].src; positionTopMenu(num); document.getElementById("topMenu" + num).style.visibility = "visible"; } ///////////////////////////////////////////////////////////////// function hideTopMenu(num) { document.images["topTab" + num].src = topTabs[num*2].src; document.getElementById("topMenu" + num).style.visibility = "hidden"; } ///////////////////////////////////////////////////////////////// function hiliteMenuItem(obj) { obj.style.background='#E0E0DE'; } ///////////////////////////////////////////////////////////////// function resetMenuItem(obj) { obj.style.background='#F8F8F6'; } // switch the image sources function swap(who, what) { document.images[who].src = img[what].src; return true; } function rollOver(image) { if(image.src.indexOf("_on")==-1) { var src = image.src; src = replace(src, "gifts.com", "<-->"); src = replace(src, "_down.gif", ".gif"); src = replace(src, ".gif", "_roll.gif"); src = replace(src, "<-->", "gifts.com"); image.src = src; } } function rollOut(image) { if(image.src.indexOf("_on")==-1) { var src = image.src; src = replace(src, "gifts.com", "<-->"); src = replace(src, "_down.gif", ".gif"); src = replace(src, "_roll.gif", ".gif"); src = replace(src, "<-->", "gifts.com"); image.src = src; } } function mouseDown(image) { var src = image.src; src = replace(src, "gifts.com", "<-->"); src = replace(src, "_roll.gif", ".gif"); src = replace(src, ".gif", "_down.gif"); src = replace(src, "<-->", "gifts.com"); image.src = src; } function mouseUp(image) { var src = image.src; src = replace(src, "gifts.com", "<-->"); src = replace(src, "_roll.gif", ".gif"); src = replace(src, "_down.gif", ".gif"); src = replace(src, "<-->", "gifts.com"); image.src = src; } function uniPop(href,winname,width,height,x,y,toolbar,scrollbars,resizable,status) { if (href == "") href = '/support'; if (winname == 'spellChecker') href+=escape(document.eventForm.notes.value); if ((width < 100) || (width == null)) var width = '515'; if ((height < 100) || (height == null)) var height = '475'; if (toolbar == null) var toolbar = 'yes'; if (scrollbars == null) var scrollbars = 'yes'; if (resizable == null) var resizable = 'yes'; if (status == null) var status = 'yes'; var theParam = "width=" +width+ ",height=" +height+ ",toolbar=" +toolbar+ ",menubar=" +toolbar+ ",location=" +toolbar+ ",scrollbars=" +scrollbars+ ",resizable=" +resizable+ ",status=" +status+ ",screenX=" + x + ",screenY=" + y + ",top=" + y + ",left=" + x; var thePopup = window.open(href,winname,theParam); if (thePopup.opener == null) thePopup.opener = self; } function externalPop(href) { uniPop(href,"_blank",750,400,75,50,'yes','yes','yes','yes'); } function recordClick(productName, value) { var ttp = "popup"; var tid = productName; var cnt = 1; var val = value; var prot = ''; if (window.location.protocol) prot=window.location.protocol; if (prot=='') prot='https:' var ran = Math.round(Math.random()*100000000); var log = prot +'//tracking.voltagesearch.com/image.gif?aid=59&tid='+ escape(tid) +'&ttp='+ escape(ttp) +'&cnt='+ escape(cnt) +'&val='+ escape(val) +'&sRng='+ ran; if (document.images) { logimage=new Image(); logimage.src=log; } else { //document.write(''); } } function confirmURL(text, url) { if(confirm(text)) { location.href=(url); } } function deleteOnFocus(field, default_value) { if(field.value==default_value) { field.value = ''; } } function textCounter(field, countfield, maxlimit) { if (field.value.length > maxlimit) // if too long...trim it! field.value = field.value.substring(0, maxlimit); // otherwise, update 'characters left' counter else countfield.value = maxlimit - field.value.length; } function replace(s, t, u) { /* ** Replace a token in a string ** s string to be processed ** t token to be found and removed ** u token to be inserted ** returns new String */ i = s.indexOf(t); r = ""; if (i == -1) return s; r += s.substring(0,i) + u; if ( i + t.length < s.length) r += replace(s.substring(i + t.length, s.length), t, u); return r; } function checkAll(field) { for (i = 0; i < field.length; i++) field[i].checked = true ; } function uncheckAll(field) { for (i = 0; i < field.length; i++) field[i].checked = false ; } function findObj(n, d) { var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&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