var hcLastAjaxURI="",hcLastAjaxArea;$(document).ready(function(){if($("#loading")[0]){$("#loading")[0].noshow=false;$("#loading").ajaxStop(function(){$(this).hide();this.noshow=false});$("#loading").ajaxStart(function(){this.noshow==false&&$(this).show()})}});function topen(a,b){trackProduct(a);document.getElementById("a73dncvalue").value=b;document.getElementById("a73dnc").submit()}function xopen(a){document.getElementById("a73dncvalue").value=a;document.getElementById("a73dnc").submit()} function trackProduct(a){a="/ajax/items/_track/"+a+"/";$("#loading")[0].noshow=true;ajaxReplace(a,"TRACKING");return true}function hcFormToQuery(a){}function hcAjaxSubmit(a,b){a=$("#"+a)[0].action+"?"+$("#"+a).serialize();a=Base64.encode(a).replace(/=/g,".");jQuery.bbq.pushState("#results="+a,2)}function hcNavFilters(a,b){window.scrollTo($("#searchResults")[0].offsetLeft,0);a=Base64.encode(a).replace(/=/g,".");jQuery.bbq.pushState("#results="+a,2)} function hcAjaxReloadFilters(a,b){$.get(a,"",function(c){$("#"+b).html(c)})}function hcBindHistory(){$(window).bind("hashchange",function(a){a=new String(jQuery.bbq.getState("results"));a=new String(Base64.decode(a.replace(/\./g,"=")));hcAjaxReloadFilters(a,"searchResults")})} function hcGetFilters(){var a=new String(jQuery.bbq.getState("results"));if(a!="undefined"){a=new String(Base64.decode(a.replace(/\./g,"=")));var b=jQuery.deparam(qs);if(b.filtered=="Y"){filterResults(b.pv);hcAjaxReloadFilters(a,"searchResults")}}} function hcLoadFilters(){var a=new String(jQuery.bbq.getState("results"));if(a!="undefined"){a=new String(Base64.decode(a.replace(/\./g,"=")));var b=new String(a),c=jQuery.deparam(b);b="/ajax/locator/filter/?pv="+c.pv;$("#searchResults").html("");$.post(b,"",function(d){$("#filters").html(d);hcSetSelect("catID",c.catID);hcSetSelect("prodVendor",c.prodVendor);hcSetText("priceMin",c.priceMin);hcSetText("priceMax",c.priceMax);hcSetText("filter",c.filter)});hcAjaxReloadFilters(a,"searchResults")}} function hcSetSelect(a,b){if(b!=undefined){a=$("#"+a)[0];var c=a.options;for(i=0;i<c.length;i++)if(c[i].value==b)a.selectedIndex=i}}function hcSetText(a,b){b!=undefined&&$("#"+a).val(b)}function filterResults(a){ajaxReplace("/ajax/locator/filter/?pv="+a,"filters")}function applyFilters(){hcAjaxSubmit("filterBox","searchResults")}function clearFilters(){$("#filterBox")[0].reset();applyFilters()} function setPageSize(a){location=(new String(location)).search(/\?/)>0?location+"&offset=0&ps="+a.options[a.selectedIndex].value:location+"?offset=0&ps="+a.options[a.selectedIndex].value}function setPageSizeAjax(a){$("#ps_bypass")[0].value=+a.options[a.selectedIndex].value;$("#ps_bypass")[0].name="ps";applyFilters()}function noThumb(a){a.src="/nothumb.jpg"}function noMain(a){a.src="/nomain.jpg"}function hc_displayAdPreview(){$("#adPreview").html($("#adContent")[0].value)} function hc_displayAd(a,b){$("#"+a).html(Base64.decode(b))} var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(a){var b="",c,d,e,f,h,g,j=0;for(a=Base64._utf8_encode(a);j<a.length;){c=a.charCodeAt(j++);d=a.charCodeAt(j++);e=a.charCodeAt(j++);f=c>>2;c=(c&3)<<4|d>>4;h=(d&15)<<2|e>>6;g=e&63;if(isNaN(d))h=g=64;else if(isNaN(e))g=64;b=b+this._keyStr.charAt(f)+this._keyStr.charAt(c)+this._keyStr.charAt(h)+this._keyStr.charAt(g)}return b},decode:function(a){var b="",c,d,e,f,h,g=0;for(a=a.replace(/[^A-Za-z0-9\+\/\=]/g, "");g<a.length;){c=this._keyStr.indexOf(a.charAt(g++));d=this._keyStr.indexOf(a.charAt(g++));f=this._keyStr.indexOf(a.charAt(g++));h=this._keyStr.indexOf(a.charAt(g++));c=c<<2|d>>4;d=(d&15)<<4|f>>2;e=(f&3)<<6|h;b+=String.fromCharCode(c);if(f!=64)b+=String.fromCharCode(d);if(h!=64)b+=String.fromCharCode(e)}return b=Base64._utf8_decode(b)},_utf8_encode:function(a){a=a.replace(/\r\n/g,"\n");for(var b="",c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128)b+=String.fromCharCode(d);else{if(d>127&&d<2048)b+= String.fromCharCode(d>>6|192);else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128)}b+=String.fromCharCode(d&63|128)}}return b},_utf8_decode:function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;){d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d);c++}else if(d>191&&d<224){c2=a.charCodeAt(c+1);b+=String.fromCharCode((d&31)<<6|c2&63);c+=2}else{c2=a.charCodeAt(c+1);c3=a.charCodeAt(c+2);b+=String.fromCharCode((d&15)<<12|(c2&63)<<6|c3&63);c+=3}}return b}}; function addMouseHandler(a){try{for(var b,c=0;c<a.childNodes.length;c++){b=a.childNodes[c];if(b.nodeName=="LI"){b.style.zindex=1E5;if(b.childNodes.length>1)for(var d=0;d<b.childNodes.length;d++)if(b.childNodes[d].nodeName=="UL"){b.onmouseover=function(){cnDisplay(this,"block")};b.onmouseout=function(){cnDisplay(this,"none")};addMouseHandler(b.childNodes[d])}}}}catch(e){}} function cnDisplay(a,b){for(var c=0;c<a.childNodes.length;c++)if(a.childNodes[c].nodeName=="UL"){a.childNodes[c].style.display=b;break}}function debug(a){alert(a)}function initPopup(a){navigator.appName.indexOf("Microsoft Internet Explorer")!=-1&&navigator.userAgent.indexOf("Opera")==-1&&addMouseHandler(document.getElementById(a))} function toolbox_listmenu(a){this.rootID=a;this.rootElement=document.getElementById(a);this.init=toolbox_listmenu_init;this.expandParents=toolbox_listmenu_expandParents;this.expandSubElements=toolbox_listmenu_expandSubElements;this.collapseSubElements=toolbox_listmenu_collapseSubElements;this.activateLink=toolbox_listmenu_activateLink;this.attachEvent=toolbox_listmenu_attachEvent;this.activateURL=toolbox_listmenu_activateURL;this.activateByID=toolbox_listmenu_activateByID} function toolbox_listmenu_activateLink(){this.activateURL(document.location)}function toolbox_listmenu_activateByID(a){if(a=document.getElementById(a)){a.className+=" active";this.expandParents(a);this.expandSubElements(a.parentNode,"UL")}}function toolbox_listmenu_activateURL(a){a=stripQueryString(a);if(a=toolbox_nodes_getActiveLink(this.rootElement,a)){a.className+=" active";this.expandParents(a);this.expandSubElements(a.parentNode,"UL")}} function toolbox_listmenu_show(a){a.folderOpen=true;a.style.display="block";par=toolbox_nodes_getFirstParentByType(a,"LI");para=toolbox_nodes_getFirstOf(par,"A");if(para.className=="folderClosed")para.className="folderOpen"}function toolbox_listmenu_hide(a){a.folderOpen=false;a.style.display="none";par=toolbox_nodes_getFirstParentByType(a,"LI");para=toolbox_nodes_getFirstOf(par,"A");if(para.className=="folderOpen")para.className="folderClosed"} function toolbox_listmenu_collapseSubElements(a,b){var c=0;b=new String(b);for(a=a.childNodes;a[c];){colName=new String(a[c].nodeName);colName.toLowerCase()==b.toLowerCase()&&toolbox_listmenu_hide(a[c]);c++}}function toolbox_listmenu_expandSubElements(a,b){var c=0;b=new String(b);for(a=a.childNodes;a[c];){colName=new String(a[c].nodeName);colName.toLowerCase()==b.toLowerCase()&&toolbox_listmenu_show(a[c]);c++}} function toolbox_listmenu_toggleSubElements(a,b){var c=0;b=new String(b);for(a=a.childNodes;a[c];){colName=new String(a[c].nodeName);colName.toLowerCase()==b.toLowerCase()&&toolbox_listmenu_toggleDisplay(a[c]);c++}}function toolbox_listmenu_expandParents(a){for(;a.parentNode;)if(a.parentNode.id==this.rootID)return;else{toolbox_listmenu_show(a.parentNode);a=a.parentNode}} function toolbox_listmenu_init(){ulObj=this.rootElement;liObj=ulObj.getElementsByTagName("LI");var a="";for(a=0;liObj[a];){this.collapseSubElements(liObj[a],"UL");myLink=toolbox_nodes_getFirstOf(liObj[a],"A");myLink.href.substring(0,3)!="htt"&&this.attachEvent(myLink);a++}this.activateLink()}function toolbox_listmenu_attachEvent(a){if(a){var b=toolbox_nodes_getFirstParentByType(a,"LI");a.onclick=function(){toolbox_listmenu_toggleSubElements(b,"UL")}}} function toolbox_listmenu_toggleDisplay(a){a.folderOpen==false||a.style.display=="none"?toolbox_listmenu_show(a):toolbox_listmenu_hide(a)}function toolbox_style_toggleDisplay(a){if(a.style.display=="none"){a.style.display="block";return true}else{a.style.display="none";return false}}var fw_helpWin=false;function activateMenu(a,b){try{hnode=toolbox_nodes_getActiveLink(a,b);hnode.className="active";par=toolbox_nodes_getFirstParentByType(hnode,"li");par.className="active"}catch(c){}} function activateLocation(a){hnode=document.getElementById(a);activateMenu(hnode,window.location)}function activateImageMenu(a,b){hnode=toolbox_nodes_getActiveLink(a,b);inode=toolbox_nodes_getFirstOf(hnote,"img");a=new String(inode.src);inode.src=a.replace("_up","_over");inode.onmouseover=function(){}}function fw_showHelp(){fw_helpWin=fw_popWin("/help/home/","IndigoHelp",0,1,0,0,0,1,780,600);fw_helpWin.focus()} function fw_popWin(a,b,c,d,e,f,h,g,j,k){lft=",left="+(screen.width-j)/2;tp=",top="+(screen.height-k)/2;c="toolbar="+c;d=",scrollbars="+d;e=",location="+e;f=",statusbar="+f;h=",menubar="+h;g=",resizable="+g;j=",width="+j;k=",height="+k;params=" "+c+d+e+f+h+g+j+k+lft+tp;return window.open(a,b,params)} function fw_modalWin(a,b,c,d,e,f){return window.showModalDialog?window.showModalDialog(a,b,"dialogWidth:"+d+"px;dialogHeight:"+e+"px"):window.open(a,b,"height="+e+",width="+d+",toolbar=no,directories=no,status=no,menubar=no,scrollbars="+c+",resizable="+f+",modal=yes")} function fw_changeActSubmitToBlank(a,b,c,d){doit=true;if(d)doit=confirm(d);if(doit){myfm=document.forms[a];myfm.oldAct=myfm.elements._action.value;myfm.elements._action.value=b;myfm.oldTarget=myfm.target;myfm.oldAction=myfm.action;myfm.target="_blank";myfm.action=c;try{myfm.onsubmit()}catch(e){}myfm.submit();myfm.elements._action.value=myfm.oldAct;myfm.action=myfm.oldAction;myfm.target=myfm.oldTarget}} function fw_changeActSubmit(a,b,c){doit=true;if(c)doit=confirm(c);if(doit){myfm=document.forms[a];myfm.oldAct=myfm.elements._action.value;myfm.elements._action.value=b;try{myfm.onsubmit()}catch(d){}myfm.submit();myfm.elements._action.value=myfm.oldAct}}function fw_redirectOnConfirm(a,b){if(confirm(a))location=b}function fw_showHide(a,b){b=document.getElementById(b);b=toolbox_style_toggleDisplay(b);a.className=b?"toggleOpen":"toggleClose"} function setCookie(a,b,c){if(c){var d=new Date;d.setTime(d.getTime()+c*24*60*60*1E3);c="; expires="+d.toGMTString()}else c="";document.cookie=a+"="+b+c+"; path=/"}function getCookie(a){a=a+"=";for(var b=document.cookie.split(";"),c=0;c<b.length;c++){for(var d=b[c];d.charAt(0)==" ";)d=d.substring(1,d.length);if(d.indexOf(a)==0)return d.substring(a.length,d.length)}return null}function killCookie(a){setCookie(a,"",-1)}function nothing(a){return false}function ajaxReplace(url,replacementID) {var myRep = replacementID; $.get(url, function(data) { $('#'+myRep).html(data); });
} function ajaxSubmit(a,b){a=document.getElementById(a);var c=$("#"+b);$.post(a.action,$(a).serialize(),function(d){c.html(d)})}function ajaxAlert(a,b){document.getElementById(a).innerHTML=b}function nothing(){return false}function fwCopyField(a,b){a=document.getElementById(a);document.getElementById(b).value=a.value} function fwCopyDD(a,b){a=document.getElementById(a);b=document.getElementById(b);for(i=0;i<b.options.length;i++)if(b.options[i].value==a.options[a.selectedIndex].value){b.selectedIndex=i;return true}b.selectedIndex=0}function initRollover(a){var b=new String(a.src);a.upsrc=b;a.oversrc=b.replace("_up","_over");a.onmouseover=function(){this.src=this.oversrc};a.onmouseout=function(){this.src=this.upsrc};a.onload=function(){}} function fwSetTabs(a,b,c){$(b).find(".tabPage").each(function(d){this.style.display="none"});$("#"+c)[0].style.display="block";$(b).find(".tabLabelActive").each(function(d){this.className="tabLabel"});tablabe[0].className="tabLabelActive"}function fwToggleByCheckbox(a,b,c){try{b=document.getElementById(b);if(c)b.checked?$(a).hide():$(a).show();else b.checked?$(a).show():$(a).hide()}catch(d){}} function fireEvent(a,b){if(document.createEventObject){alert("event");var c=document.createEventObject();return a.fireEvent("on"+b,c)}else{c=document.createEvent("HTMLEvents");c.initEvent(b,true,true);return!a.dispatchEvent(c)}}function toolbox_style_toggleDisplay(a){if(a.style.display=="none"){a.style.display="";return true}else{a.style.display="none";return false}}function toolbox_nodes_getFirstOf(a,b){return $(a).find(b+":first")[0]} function toolbox_nodes_getActiveLink(a,b){a=$(a).find("a");for(var c=0;c<a.length;c++)if(a[c].href==b)return a[c]}function toolbox_nodes_getFirstParentByType(a,b){b=$(a).parents(b);return b.length?b[0]:a}function toolbox_toggleSubCheckboxes(a){var b=toolbox_nodes_getFirstParentByType(a,"LI");toolbox_checkSubCheckboxes(b,a.checked);a.disabled=false} function toolbox_checkSubCheckboxes(a,b){var c=0,d="";for(a=a.childNodes;a[c];){colName=new String(a[c].nodeName);d+=colName+"\n";if(colName=="INPUT"){a[c].checked=b;a[c].disabled=b}a[c].childNodes.length>0&&toolbox_checkSubCheckboxes(a[c],b);c++}}function stripQueryString(a){a=parseUri(a);return a.protocol+"://"+a.authority+a.path} function parseUri(a){var b=parseUri.options;a=b.parser[b.strictMode?"strict":"loose"].exec(a);for(var c={},d=14;d--;)c[b.key[d]]=a[d]||"";c[b.q.name]={};c[b.key[12]].replace(b.q.parser,function(e,f,h){if(f)c[b.q.name][f]=h});return c} parseUri.options={strictMode:false,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*):?([^:@]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};
function prodVideo(url,caption) {
	var flw=488;
	var flh=368;
	var embed =  '<object data="'+url+'" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+flw+'" height="'+flh+'" id="mov" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+url+'" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" />	<embed src="'+url+'" quality="high" bgcolor="#ffffff" width="'+flw+'" height="'+flh+'"  align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" /></object>';
	
	$.fn.colorbox({
		html:embed,
		transition:'elastic',
		width:'540px',
		height:'460px',
		initialHeight:'50px',
		initialWidth:'50px',
		opacity:'0.5',
		title:caption,
		iframe:false
	});	
}