function jumpMenu(targ,selObj,restore){ //v3.0 MM_jumpMenu(targ,selObj,restore); } function MM_jumpMenu(targ,selObj,restore){ //v3.0 if (selObj.options[selObj.selectedIndex].value != '') { eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'"); if (restore) selObj.selectedIndex=0; } } 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= 5) try { aJaX = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { aJaX = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { aJaX = false; } } @end @*/ if (!aJaX && typeof XMLHttpRequest!='undefined') { aJaX = new XMLHttpRequest(); } var theFile="/searchbox_AJAX.php?nCatID1="+nCatID1+"&nCatID2="+nCatID2+"&nCatID="+nCatID // alert('Going to ' + theFile) aJaX.open("GET", theFile); aJaX.onreadystatechange = function() { if(aJaX.readyState==4) { if(aJaX.responseText) { // alert(aJaX.responseText); document.getElementById("sboxsub"+nSearchbox).innerHTML=aJaX.responseText; } } } aJaX.send(""); } function setKeywordValue(formName, cReplace, cText) { var f = document.forms[formName]; if ( (f.keyword.value == "") || (f.keyword.value == cReplace) ) { f.keyword.value = cText; } } // correctly handle PNG transparency in Win IE 5.5 & 6. function correctPNG() { var arVersion = navigator.appVersion.split("MSIE") var version = parseFloat(arVersion[1]) if ((version >= 5.5) && (document.body.filters)) { for(var i=0; i" img.outerHTML = strNewHTML i = i-1 } } } } if (window.attachEvent) { window.attachEvent("onload", correctPNG); } function updateProductText(id) { if(document.getElementById(id).value == "Type search term here") { document.getElementById(id).value = "Text product name to find prices"; } } function updateWebText(id) { if(document.getElementById(id).value == "Text product name to find prices") { document.getElementById(id).value = "Type search term here"; } } ///////////////////////////////////////////////////// /** * @author Maxime Haineault (max@centdessin.com) * @version 0.3 * @desc JavaScript cookie manipulation class * */ Cookie = { /** Get a cookie's value * * @param integer key The token used to create the cookie * @return void */ get: function(key) { // Still not sure that "[a-zA-Z0-9.()=|%/]+($|;)" match *all* allowed characters in cookies tmp = document.cookie.match((new RegExp(key +'=[a-zA-Z0-9.()=|%/]+($|;)','g'))); if(!tmp || !tmp[0]) return null; else return unescape(tmp[0].substring(key.length+1,tmp[0].length).replace(';','')) || null; }, /** Set a cookie * * @param integer key The token that will be used to retrieve the cookie * @param string value The string to be stored * @param integer ttl Time To Live (hours) * @param string path Path in which the cookie is effective, default is "/" (optional) * @param string domain Domain where the cookie is effective, default is window.location.hostname (optional) * @param boolean secure Use SSL or not, default false (optional) * * @return setted cookie */ set: function(key, value, ttl, path, domain, secure) { cookie = [key+'='+ escape(value), 'path='+ ((!path || path=='') ? '/' : path), 'domain='+ ((!domain || domain=='')? window.location.hostname : domain)]; if (ttl) cookie.push(Cookie.hoursToExpireDate(ttl)); if (secure) cookie.push('secure'); return document.cookie = cookie.join('; '); }, /** Unset a cookie * * @param integer key The token that will be used to retrieve the cookie * @param string path Path used to create the cookie (optional) * @param string domain Domain used to create the cookie, default is null (optional) * @return void */ unset: function(key, path, domain) { path = (!path || typeof path != 'string') ? '' : path; domain = (!domain || typeof domain != 'string') ? '' : domain; if (Cookie.get(key)) Cookie.set(key, '', 'Thu, 01-Jan-70 00:00:01 GMT', path, domain); }, /** Return GTM date string of "now" + time to live * * @param integer ttl Time To Live (hours) * @return string */ hoursToExpireDate: function(ttl) { if (parseInt(ttl) == 'NaN' ) return ''; else { now = new Date(); now.setTime(now.getTime() + (parseInt(ttl) * 60 * 60 * 1000)); return now.toGMTString(); } }, /** Return true if cookie functionnalities are available * * @return boolean */ test: function() { Cookie.set('b49f729efde9b2578ea9f00563d06e57', 'true'); if (Cookie.get('b49f729efde9b2578ea9f00563d06e57') == 'true') { Cookie.unset('b49f729efde9b2578ea9f00563d06e57'); return true; } return false; }, /** If Firebug JavaScript console is present, it will dump cookie string to console. * * @return void */ dump: function() { if (typeof console != 'undefined') { console.log(document.cookie.split(';')); } } } ///////////////////////////////////////////////////// function URLEncode (clearString) { var output = ''; var x = 0; clearString = clearString.toString(); var regex = /(^[a-zA-Z0-9_.]*)/; while (x < clearString.length) { var match = regex.exec(clearString.substr(x)); if (match != null && match.length > 1 && match[1] != '') { output += match[1]; x += match[1].length; } else { if (clearString[x] == ' ') output += '+'; else { var charCode = clearString.charCodeAt(x); var hexVal = charCode.toString(16); output += '%' + ( hexVal.length < 2 ? '0' : '' ) + hexVal.toUpperCase(); } x++; } } return output; } function addFavourite(cURL, cTitle) { if (document.all) window.external.AddFavorite(cURL, cTitle); else window.sidebar.addPanel(cTitle, cURL, ''); } // ends function addFavourite function AWBookmark(cCookie, cURL, cMerchant, cSource) { //if (Cookie.get(cCookie)) // return true; if ((document.all) && confirm('Would you like to bookmark ' + cMerchant + '?')) { addFavourite(cURL, cMerchant); /////////////////////////////////////////////// // Log this /////////////////////////////////////////////// var aJaX=false; if (!aJaX && typeof XMLHttpRequest!='undefined') { aJaX = new XMLHttpRequest(); } var theFile = "/ajax/logBookmark.php?cURL=" + URLEncode(cURL) + "&cMerchant=" + URLEncode(cMerchant) + "&cSource=" + URLEncode(cSource) + ""; // alert(theFile); aJaX.open("GET", theFile); aJaX.onreadystatechange = function() { if(aJaX.readyState==4) { if(aJaX.responseText) { alert(aJaX.responseText); } } } aJaX.send(""); /////////////////////////////////////////////// /////////////////////////////////////////////// if (cSource != 'bar') Cookie.set(cCookie, 1) return true; } // If confirmed } // ends function AWBookmark(cURL, cMerchant) function SUKBookmark(cURL, cMerchant) { addFavourite(cURL, cMerchant); /////////////////////////////////////////////// // Log this /////////////////////////////////////////////// var aJaX=false; if (!aJaX && typeof XMLHttpRequest!='undefined') { aJaX = new XMLHttpRequest(); } var theFile = "/ajax/logBookmark.php?cURL=" + URLEncode(cURL) + "&cMerchant=" + URLEncode(cMerchant) + ""; // alert(theFile); aJaX.open("GET", theFile); aJaX.onreadystatechange = function() { if(aJaX.readyState==4) { if(aJaX.responseText) { // alert(aJaX.responseText); } } } aJaX.send(""); /////////////////////////////////////////////// /////////////////////////////////////////////// return false; } // ends function AWBookmark(cURL, cMerchant) function GoogleClick() { /////////////////////////////////////////////// // Log this /////////////////////////////////////////////// var aJaX=false; if (!aJaX && typeof XMLHttpRequest!='undefined') { aJaX = new XMLHttpRequest(); } var theFile = "/ajax/logGoogleClick.php"; // alert(theFile); aJaX.open("GET", theFile); aJaX.onreadystatechange = function() { if(aJaX.readyState==4) { if(aJaX.responseText) { // alert(aJaX.responseText); } } } aJaX.send(""); /////////////////////////////////////////////// /////////////////////////////////////////////// return false; } // ends function GoogleClick()