Array.prototype.inArray=function(c){var b=this.valueOf(),a=b.length;while(a--){if(b[a]===c){return true}}return false};var kr={toggleSelects:function(a){/MSIE 6/.test(navigator.userAgent)&&$("select").toggle(a)},preloadImgs:(function(){var a=[];return function(){$.each(arguments,function(c,d){var b=document.createElement("img");b.src=d;a.push(b)})}})()};function toggleSelects(a){if(/MSIE 6/.test(navigator.userAgent)){$("select")[a]()}}function buildHTML(a,c,b){if(typeof(c)!="string"){b=c;c=null}var d="<"+a;if(b!==null){for(attr in b){if(b[attr]===false){continue}d+=" "+attr+'="'+b[attr]+'"'}}return d+=c?">"+c+"</"+a+">":"/>"}$.fn.matchBoxHeights=function(c){var d=$(this),b=d.find(c),e,a={};b.each(function(){var h=$(this),g=h.siblings(c),i=h.height(),f=g.height();if(i>f){g.height(i)}else{if(i<f){h.height(f)}}});return d};kr.validateEngraving=function(c,a){if(document.getElementById("po_"+c)){c="po_"+c;a="po_"+a}else{c="po"+c;a="po"+a}var e=$("#"+c).find("option:selected"),g=document.getElementById(a);if(e.length<=0||!g){return true}var f=g.value,d=/^Add\s+Engraving/i,b=d.test(e.text());if(b){if(!f){alert("Please type in the text for your engraving!");g.focus();return false}if(f.length>25){alert("Please limit your engraving text to 25 characters!");g.focus();g.select();return false}}else{g.value=""}return true};
