function setOpacity(b,a){a=(a==100)?99.999:a;b.style.filter="alpha(opacity:"+a+")";b.style.KHTMLOpacity=a/100;b.style.MozOpacity=a/100;b.style.opacity=a/100}function findPosX(a){var b=0;if(a.offsetParent){while(a.offsetParent){b+=a.offsetLeft;a=a.offsetParent}}else{if(a.x){b+=a.x}}return b}function findPosY(b){var a=0;if(b.offsetParent){while(b.offsetParent){a+=b.offsetTop;b=b.offsetParent}}else{if(b.y){a+=b.y}}return a}function clearOpacity(a){a.style.filter="";a.style.KHTMLOpacity=1;a.style.MozOpacity=1;a.style.opacity=1}function brHeight(){if(typeof(window.innerWidth)=="number"){return window.innerHeight}else{if(document.documentElement&&(document.documentElement.clientWidth||document.documentElement.clientHeight)){return document.documentElement.clientHeight}else{if(document.body&&(document.body.clientWidth||document.body.clientHeight)){return document.body.clientHeight}}}}function showSpecials(a){openWin("/menu/SpecialsWin.do?restId="+a)}function showHelp(a){openWin("/faq/helpWinContent.do?faqTopic="+a)}function openWin(c){var b="?contentUrl="+escape(c);var a;if(typeof encodeSession=="function"){a=encodeSession("/helpWin.do")+b}else{a="/helpWin.do"+b}helpwin=window.open(a,"FOODLER_HELP","width=420,height=400,resizable");helpwin.focus();return helpwin}function showDef(a){defwin=window.open("/glossary/defineWin.do?id="+a,"FOODLER_GLOSSARY","width=420,height=230,resizable");defwin.focus()}function showImgs(b,a){helpwin=window.open("/menu/ImgWin.do?restId="+b+"&index="+a,"FOODLER_IMGS","width=700,height=465,resizable=no,scrollbars=no");helpwin.focus()}function errorHandler(c,b,a){var d=new Image();d.src="/error-log/error.gif?err="+escape(c)+"&file="+escape(b)+"&line="+a+"&ua="+escape(navigator.userAgent);return true}function logAsync2(a,c){var d=navigator.userAgent.toLowerCase();if(c||d.indexOf("msie")!=-1){var b=new Image();b.src="/dyn/6914/images/log/"+a}}function logAsync(a){logAsync2(a,false)}function testAsync(){var b;try{if(window.XMLHttpRequest){b=new XMLHttpRequest()}else{if(window.ActiveXObject){b=new ActiveXObject("Microsoft.XMLHTTP")}}}catch(a){}if(b){return true}else{return false}}String.prototype.trim=function(){return this.replace(/^\s\s*/,"").replace(/\s\s*$/,"")};String.prototype.ltrim=function(){return this.replace(/^\s+/,"")};String.prototype.rtrim=function(){return this.replace(/\s+$/,"")};function ferror(a){for(var d=0;d<document.forms.length;d++){var c=document.forms[d];for(var b=a.length-1;b>=0;b--){if($(c[a[b]])){$(c[a[b]]).addClassName("error");$(c[a[b]]).focus()}}}}function swallow_returns(a){$(a).observe("keypress",function(b){if(b.keyCode==Event.KEY_RETURN){b.stop()}})}function disable_return(a){$(a).getInputs("text").each(swallow_returns);$(a).getInputs("password").each(swallow_returns);$(a).getInputs("radio").each(swallow_returns);$(a).getInputs("checkbox").each(swallow_returns)};
