var Pic=new Array();Pic[0]="images/search_btn_.gif";Pic[1]="images/search_btn_hi.gif";Pic[2]="images/search_btn_lo.gif";Pic[3]="images/search_btn.gif";Pic[4]="images/search_btn_hi.gif";Pic[5]="images/search_btn_lo.gif";var p=Pic.length;var preLoad=new Array();var i=0;for(i=0;i<p;i++){preLoad[i]=new Image();preLoad[i].src=Pic[i]}function switchImage(whichImage,imageNumber){document.images[whichImage].src=preLoad[imageNumber].src}function openPopupWin(popUrl,popWid,popHgt,popScroll,popResize){popupWin=window.open(popUrl,"popupWin","width="+popWid+",height="+popHgt+",left="+((screen.width-popWid)/2)+",top="+((screen.height-popHgt)/2)+",status=yes,toolbar=no,menubar=no,scrollbars="+popScroll+",resizable="+popResize);if(!popupWin.opener){popupWin.opener=self}return false}function ShowHideDiv(id,flag){if(flag==1){$(window).scroll(function(){if($("#email_to_friend").position().top<$(window).scrollTop()){if($(window).scrollTop()>280){$("#email_to_friend").css("top",$(window).scrollTop()-300)}}else{if(($("#email_to_friend").position().top+$("#email_to_friend").height())>$(window).scrollTop()+$(window).height()){$("#email_to_friend").css("top",$(window).scrollTop()-300)}}});document.getElementById(id).style.display="block";document.getElementById("email_to_friend_wrapper").style.display="block";document.getElementById("email_to_friend_message").style.display="none";$("#email_to_friend").css("top",$(window).scrollTop()-300);$("#email_to_friend").css("position","absolute");if($.browser.msie){$("#email_to_friend").css("z-index","9999");$(".contentRight").css("z-index","-1");if($.browser.version.substr(0,1)<7){$(".contentRight").css("margin-left","20px")}}}else{document.getElementById(id).style.display="none"}return false}var MAX_WIDTH=500;function biggestOption(elem){var biggest=0;for(var i=0;i<elem.options.length;i++){if(elem.options[i].innerHTML.length>biggest){biggest=elem.options[i].innerHTML.length}}return roughPixelSize(biggest)}function roughPixelSize(charLength){roughSize=30+(charLength*6);if(roughSize>MAX_WIDTH){return MAX_WIDTH}else{return roughSize}}function resizeToBiggest(elem){elem.style.width=biggestOption(elem)}function resizeToSelected(elem){elem.style.width=105};