var sleepMs=4000;var fdl_tId;var fdl_imageIndex=-1;function forgotPw(){$("msg").toggle();$("_pwRestore").value=$("msg").style.display=="none"?"":"true"}function addressEntered(){if(document.LoadRestaurantsForm.waCityZip.value==""){return false}else{document.LoadRestaurantsForm.submit()}}function stop(){if(fdl_tId!=undefined){clearTimeout(fdl_tId)}}function resume(){fdl_tId=window.setTimeout("fadeOut()",sleepMs/2)}function nextRest(){fdl_imageIndex++;while(!available(fdl_imageIndex)){if(++fdl_imageIndex>=fdl_rests.length){fdl_imageIndex=0}}if((fdl_imageIndex+1)<fdl_photoCnt){maybeLoad(fdl_imageIndex+1)}if((fdl_imageIndex+2)<fdl_photoCnt){maybeLoad(fdl_imageIndex+2)}return fdl_rests[fdl_imageIndex]}function maybeLoad(a){if(!available(a)){fdl_load(a)}}function available(a){return a<fdl_rests.length&&fdl_rests[a].img&&fdl_rests[a].loaded}function fdl_loader(){var b=document.CityAreaForm.state;var a=b.selectedIndex;if(b[a].value!=""){stateSetChoices(b,$("cityState"),"city")}b=document.CampusAreaForm.state;a=b.selectedIndex;if(b[a].value!=""){stateSetChoices(b,$("waCampusId"),"campus")}var c=new Image();c.src="/dyn/6914/images/welcome/star_yellow.png";c=new Image();c.src="/dyn/6914/images/welcome/star_half.png";c=new Image();c.src="/dyn/6914/images/welcome/star_grey.png";Event.observe($("welcomePhotos"),"mouseover",stop);Event.observe($("welcomePhotos"),"mouseout",resume)}function fdl_load(a){var b=new Image();fdl_rests[a].img=b;b.onload=function(){loaded(a)};b.src=fdl_rests[a].imgSrc+"?c="+unique}function loaded(a){fdl_rests[a].loaded=true;if(a==0){fadeIn();document.getElementById("thephoto").style.visibility="visible"}}function fadeIn(){if(document.getElementById){var d=nextRest();$("name").innerHTML="<a href='"+d.restUrl+"'><b>"+d.name+"</b></a>";$("restAddress").innerHTML="<a href='"+d.addrUrl+"'>"+d.addr+"</a>";$("thephoto").src=d.img.src;$("photoHref").href=d.restUrl;var c="";if(d.disc!=undefined){c="<a class='discounts' href='javascript: showHelp(\"CUST_DISCOUNTS\")'>"+d.disc+"</a>"}else{if(d.rat!=undefined){var b="<div class='stars'>";var a;for(a=1;a<=d.rat;a++){b+=imgStr("yellow")}if(d.rat%1==0.5){b+=imgStr("half");a++}for(;a<=5;a++){b+=imgStr("grey")}b+="</div>";c=b}}document.getElementById("right").innerHTML=c;new Effect.Appear("thephoto",{duration:0.2});fdl_tId=window.setTimeout("fadeOut()",sleepMs)}}function imgStr(a){return"<img class='png star' width='24' height='24' src='/dyn/6914/images/welcome/star_"+a+".png'>"}function fadeOut(){if(document.getElementById){new Effect.Fade("thephoto",{duration:0.2});fdl_tId=window.setTimeout("fadeIn()",200)}};
