var favmenuShow=false;var overFav=false;var loaded=false;var ns4=(document.layers)?true:false;var ie=(document.all)?true:false;var DOM=(document.getElementById)?true:false;var mac=navigator.appVersion.indexOf("Mac");mac=(mac!=-1)?true:false;var macIE5=navigator.appVersion.indexOf("MSIE 5.0");macIE5=(macIE5!=-1)?true:false;var browserName=navigator.appName;var browserVer=parseInt(navigator.appVersion);var rollovers=false;if(browserName=="Netscape"&&browserVer>=3){rollovers=true}if(browserName=="Microsoft Internet Explorer"&&browserVer>=4){rollovers=true}function detectCookie(){return}function setCookie(e,d,a,c,b){document.cookie=escape(e)+"="+escape(d)+(a?"; EXPIRES="+a.toGMTString():"")+(c?"; PATH="+c:"")+(b?"; DOMAIN="+b:"")}function showHowEbatesLayer(){return}function breakout_of_frame(){if(top.location!=location){top.location.href=document.location.href}}function init(){loaded=true}function MM_reloadPage(init){if(init==true){with(navigator){if((appName=="Netscape")&&(parseInt(appVersion)==4)){document.MM_pgW=innerWidth;document.MM_pgH=innerHeight;onresize=MM_reloadPage}}}else{if(innerWidth!=document.MM_pgW||innerHeight!=document.MM_pgH){location.reload()}}}MM_reloadPage(true);function openWindow(){newWindow=window.open("sitetour_intro.html","newWin","toolbar=no,resizable=no,location=no,scrollbars=no,width=492,height=520,innerWidth=492,innerHeight=520")}function updateParent(a){opener.document.location=a}function checkSP2(){var a=window.navigator.userAgent;if((a.indexOf("SV1")!=-1)||(a.indexOf("MSIE 7.0")!=-1)){return true}else{return false}}function checkFF(){if((window.navigator.userAgent!=null)&&(window.navigator.userAgent.indexOf("Firefox/")!=-1)){return true}else{return false}}var ckwin=null;var focusNo=0;var popupWinWidth=320;function getFocus(){if(ns4){return}if(ckwin&&(ckwin.closed==false)){if(focusNo==1){tileWindows()}focusNo++}}function tileWindows(){ckwin.resizeTo(popupWinWidth,screen.availHeight);ckwin.moveTo(0,0);window.resizeTo(screen.availWidth-popupWinWidth,screen.availHeight);window.moveTo(popupWinWidth,0);ckwin.focus();window.focus()}function popup(b,d,a){window.name="opener";var c="ebates";if(a){c=d}else{a=d}var e=window.open(b,c,a);e.focus()}function getParams(b){var c=b.indexOf("?");if(c>-1){b=b.substring(c,b.length);c=b.indexOf("sup=");if(c<0){return b}var a=b.indexOf("&",c);if(a<0){return b.substring(0,c)}return b.substring(0,c)+b.substring(a+1,b.length)}return""}function displaySelects(a,b){if(document.getElementById(a)){document.getElementById(a).style.display=b}}function KD_jumpMenu(a){var c="height=600,width=800,location=yes,scrollbars=yes,menubars=yes,toolbars=yes,resizable=yes";var b=a.stores.options[a.stores.selectedIndex].value;if(b!="none"){popup=window.open(b,"AllStores",c)}}function show(b){if(document.getElementById(b)){var a=document.getElementById(b);if(a.style.display=="none"){a.style.display="block"}}}function hide(b){if(document.getElementById(b)){var a=document.getElementById(b);if(a.style.display=="block"){a.style.display="none"}}}function pageSort(){var i,args=pageSort.arguments;document.returnPAGESort=false;for(i=0;i<(args.length-1);i+=2){eval(args[i]+".location='"+args[i+1]+"'")}}function openNewWindow(c,a,b){window.open(c,a,b)}function alphaNumSort(f,d){try{var e=0,c,g;var k=f.toLowerCase();var j=d.tpLowerCase();if(k==j){return 0}var l=/^(\.)?\d/;var h=Math.min(k.length,j.length)+1;while(e<h&&k.charAt(e)===j.charAt(e)&&l.test(j.substring(e))==false&&l.test(k.substring(e))==false){e++}k=k.substring(e);j=j.substring(e);if(l.test(k)||l.test(j)){if(l.test(k)==false){return(k)?1:-1}else{if(l.test(j)==false){return(j)?-1:1}else{g=parseFloat(k)-parseFloat(j);if(g!=0){return g}else{g=k.search(/[^\.\d]/)}if(g==-1){g=j.search(/[^\.\d]/)}k=k.substring(g);j=j.substring(g)}}}if(k==j){return 0}else{return(k>j)?1:-1}}catch(o){return 0}}updateListField=null;function getList(b){if(document.getElementById("merchantListUL").getElementsByTagName("LI").length==2){if(typeof b=="string"){updateListField=b}else{updateListField=b.id}createRequest();var a="/stores/ajax_menu/index.htm";request.open("POST",a,true);request.onreadystatechange=populateList;request.setRequestHeader("content-length","0");request.send('')}}var selectActive=false;var singleFocus=false;var clickClose=false;function populateList(){g=updateListField;if(request.readyState==4){if(request.status==200){var h=request.responseText;if(h){var g=document.getElementById("merchantListUL");listArray=h.split("^");for(i=0;i<listArray.length;i++){listArray[i]=listArray[i].replace(/([^0-9|A-z|" "|\-|\||\%|\$|\.|\&])/g,"")}sortedListArray=listArray.sort(alphaNumSort);if((parseInt(navigator.appVersion.split("MSIE")[1])&&parseInt(navigator.appVersion.split("MSIE")[1])==6)){var n=false}else{var n=true}var b=g.getElementsByTagName("LI");for(i=0;i<b.length;i++){if(b[i].className.match("loadingLI")){g.removeChild(b[i])}}for(i=0;i<listArray.length;i++){var e=listArray[i].split("|");var j=e[2];var k=e[1];var m=e[0];var c=document.createElement("LI");c.id=j;var a=document.createTextNode(m);var f=document.createTextNode(k);var l=document.createElement("span");l.className="optionText";var d=document.createElement("span");d.className="optionValue";l.appendChild(a);d.appendChild(f);c.appendChild(l);c.appendChild(d);if(n){c.onmouseover=function(){this.style.fontWeight="bold";this.childNodes[0].style.color="#000000";window.status=this.innerHTML.replace("optionValue>"," - ").replace(/<\S[^><]*>/g,"").replace("<SPAN class=","").replace("&amp;","&")};c.onmouseout=function(){this.style.fontWeight="normal";this.childNodes[0].style.color="#7f7f7f"}}else{c.onmouseover=function(){this.childNodes[0].style.color="#000000";window.status=this.innerHTML.replace("optionValue>"," - ").replace(/<\S[^><]*>/g,"").replace("<SPAN class=","").replace("&amp;","&")};c.onmouseout=function(){this.childNodes[0].style.color="#7f7f7f"}}c.onclick=function(){var o=window.open("/mall_ctrl.do?merchant_id="+this.id+"&navigation_id=17999",this.id+"Win");closeSelect2(1);o.focus()};g.appendChild(c)}}}}else{}}function openSelect(a){if(a.className.match("active")){a.className=a.className.replace(/(active)/g,"")}else{a.innerHTML+='<li class="loadingLI">Loading...</li>';document.getElementById("merchantListTopA").focus();clickClose=false;getList("merchant_id");a.className+=" active"}}function closeSelect(a){if(!clickClose){setTimeout("closeSelect2()",4000);singleFocus=false}}function closeSelect2(a){if(a&&a==1){clickClose=true;document.getElementById("merchantListUL").className=document.getElementById("merchantListUL").className.replace(/(active)/g,"");if(!singleFocus){document.getElementById("merchantListUL").innerHTML='<li class="merchantListTopLI"><span class="optionText"><a href="javascript: void(0);" id="merchantListTopA" name="merchantListTopA">Select a store</a></span><span class="optionValue"></span></li>';document.getElementById("merchantListTopA").focus();singleFocus=true}}else{if(!selectActive&&!clickClose){document.getElementById("merchantListUL").className=document.getElementById("merchantListUL").className.replace(/(active)/g,"");if(!singleFocus){document.getElementById("merchantListUL").innerHTML='<li class="merchantListTopLI"><span class="optionText"><a href="javascript: void(0);" id="merchantListTopA" name="merchantListTopA">Select a store</a></span><span class="optionValue"></span></li>';document.getElementById("merchantListTopA").focus();singleFocus=true}}else{}}}window.onload=function(){breakout_of_frame();init();detectCookie();showHowEbatesLayer();if(ie){if(document.getElementById("prdimage1")&&document.getElementById("prdimage1").width>250){document.getElementById("prdimage1").style.width=250}}};function loadwindow(b,c,a){$("div#dwindow").hide();$("div#dwindowcontent").empty();$("div#dwindowcontent").load(b,function(e,d,f){if(d=="error"){$("div#dwindowcontent").html("Some Thing must have gone wrong")}});$("div#dwindow").show()}function closeit(){$("div#dwindowcontent").empty();$("div#dwindow").hide();$("div#dwindowcontent").empty()};

//ebates_ajax..
var request=null;function createRequest(){try{request=new XMLHttpRequest()}catch(b){try{request=new ActiveXObject("Msxm12.XMLHTTP")}catch(c){try{request=new ActiveXObject("Microsoft.XMLHTTP")}catch(a){request=null}}}if(request==null){}}function submitForm(e,d){if(typeof(e)=="string"){var a=document.forms[e]}else{var a=e.form}var b="";for(i=0;i<a.length;i++){if(a[i].type!="button"&&a[i].type!="image"){if(a[i].type=="radio"||a[i].type=="checkbox"){if(a[i].checked){insertDelimiter=true;if(b!=""){b+="&"}if(a[i].name){b+=a[i].name+"="+a[i].value}else{b+=a[i].id+"="+a[i].value}}}else{if(b!=""){b+="&"}if(a[i].name){b+=a[i].name+"="+a[i].value}else{b+=a[i].id+"="+a[i].value}}}}if(d&&d!=""){createRequest();var c=d;request.open("post",c,true);request.onreadystatechange=formResponse;request.setRequestHeader("Content-Type","application/x-www-form-urlencoded");request.send(b)}else{alert("Unable to send Ajax request - a valid URL is missing from the argument list. Please ensure that a URL is specified in the function call")}}function formResponse(){if(request.readyState==4){if(request.status==200){if(request.responseText.match(/(\[|\{)/g)){var a=request.responseText}else{var a=request.responseText.replace(/[^0-9|A-z|" "|\-|\||\%|\$|\.|\:|\&|/\\]/g,"")}if(ajaxResponseFunc){ajaxResponseFunc(a)}}}};
