var box=null;function formsubmit(A){document.getElementById("imperial_form_"+A).submit()}function reload(){window.location.href=window.location.href}function formatPrice(B,E){var C="/"+E+"/g";B=B.replace(/^0{1,}/g,"").replace(/[^0-9]/g,"").replace(/[\s]/g,"").replace(C,"");if(typeof (E)=="undefined"){E=" "}var A=B.length;if(A>0){var D="";j=1;for(i=A;i>0;i--){D=B.charAt(i-1)+D;if((j%3==0)&&j!=A){D=E+D}j++}return D}else{return B}}$(document).ready(function(){var A=null;$(".gridTable tr:gt(0)").hover(function(){A=$(this).css("backgroundColor");$(this).css({backgroundColor:"#EFEFEF"})},function(){$(this).css({backgroundColor:A})})});function mBoxAlert(E,F,A,C){if(typeof (A)=="undefined"){A="warning"}switch(A){case"error":var D='<span class="titleIcoError">&nbsp;</span>';var B='<img class="messIco" src="gfx/mbox/error.gif" alt="">';break;case"info":var D='<span class="titleIcoInfo">&nbsp;</span>';var B='<img class="messIco" src="gfx/mbox/info.gif" alt="">';break;default:var D='<span class="titleIcoWarning">&nbsp;</span>';var B='<img class="messIco" src="gfx/mbox/warning.gif" alt="">'}if(typeof (C)=="undefined"){C=function(){}}box=new Boxy.alert(B+F,C,{title:D+E});if($.browser.msie&&$.browser.version=="6.0"){$(".boxy-modal-blackout").bgiframe()}$(".answers .button:last").focus()}function mBoxQuestion(F,A,E,C){var D='<span class="titleIcoQuestion">&nbsp;</span>';var B='<img class="messIco" src="gfx/mbox/question.gif" alt="">';if(typeof (C)=="undefined"){C=function(){}}if(typeof (E)=="undefined"){E=new Array()}new Boxy.ask(B+A,E,C,{title:D+F});if($.browser.msie&&$.browser.version=="6.0"){$(".boxy-modal-blackout").bgiframe()}$(".answers .button:last").focus()}function mBoxShowLoading(A,B){if(typeof (B)!="undefined"){B="<br/>"+B}else{B=""}box=new Boxy('<div class="loading"><img src="gfx/mbox/loading.gif" alt="loading" />'+B+"</div>",{title:'<span class="titleIcoLoading">&nbsp;</span>'+A,modal:true,closeable:false,center:true,fixed:true});if($.browser.msie&&$.browser.version=="6.0"){$(".boxy-modal-blackout").bgiframe()}}function mBoxHide(){if(typeof (box)=="object"){box.hide();box=null}}function showDatePicker(A){$("#"+A).datepicker("show")}function updateLink(A,B){toChange=["Ä…","Ä„","Ä‡","Ä†","Ä™","Ä?","Å„","Å?","Å›","Åš","Ã³","Ã“","Å‚","Å?","Å¼","Å»","Åº","Å¹"];change=["a","a","c","c","e","e","n","n","s","s","o","o","l","l","z","z","z","z"];for(i=0;i<toChange.length;i++){regex=new RegExp(toChange[i],"g");B=B.replace(regex,change[i])}B=B.toLowerCase().replace(/[\s]/g,"-").replace(/[^a-z0-9-_]/g,"");$("#"+A).val(B)}function redirect(A){window.location.href=A}function setCookie(C,E,A,H,D,G){var B=new Date();B.setTime(B.getTime());if(A){A=A*1000*60*60*24}var F=new Date(B.getTime()+(A));document.cookie=C+"="+escape(E)+((A)?";expires="+F.toGMTString():"")+((H)?";path="+H:"")+((D)?";domain="+D:"")+((G)?";secure":"")}function getCookie(A){var F=document.cookie.split(";");var B="";var D="";var E="";var C=false;for(i=0;i<F.length;i++){B=F[i].split("=");D=B[0].replace(/^\s+|\s+$/g,"");if(D==A){C=true;if(B.length>1){E=unescape(B[1].replace(/^\s+|\s+$/g,""))}return E;break}B=null;D=""}if(!C){return null}}function deleteCookie(A,C,B){if(getCookie(A)){document.cookie=A+"="+((C)?";path="+C:"")+((B)?";domain="+B:"")+";expires=Thu, 01-Jan-1970 00:00:01 GMT"}};
