<!--
var addy =  location.hash.replace(/[^a-zA-Z 0-9]+/g,'');
function ToggleMenu(r,p){_obj=document.getElementById(p);_obj.style.visibility='visible';_obj=document.getElementById(r);_obj.className='UIActionMenu UIActionMenu_IconIncluded openToggler';}
function ToggleClose(r,p){_obj=document.getElementById(p);_obj.style.visibility='hidden';_obj=document.getElementById(r);_obj.className='UIActionMenu UIActionMenu_IconIncluded';}
function UpdateMenu(cstart,cend,id,l,p,r,e){var url="http://www.greenedining.com";new Ajax.Request(url,{method:'get',onSuccess:function(transport){_obj=document.getElementById(r);_obj.style.visibility='hidden';_obj=document.getElementById(p);_obj.className='UIActionMenu UIActionMenu_IconIncluded';_obj=document.getElementById(p+'_text');_obj.innerText=e;_obj.textContent=e;for(x=cstart;x<=cend;x++){_obj=document.getElementById(l+"_"+x);_obj.className='UISelectList_Label';}
_obj=document.getElementById(l+"_"+id);_obj.className='UISelectList_Label UISelectList_radio_Checked';}});}
function mouseOutEventHandler(e){e=e||window.event;var target=e.srcElement||e.target;if(target!=this)return;var related=e.relatedTarget||e.toElement;while(related!=this&&related.nodeName!='BODY')
related=related.parentNode;if(related==this)return;ToggleClose(target.parentNode.id,target.id);}
function MM_validateForm(){if(document.getElementById){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=document.getElementById(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='- '+nm+' must contain an e-mail address.\n';}else if(test!='R'){num=parseFloat(val);if(isNaN(val))errors+='- '+nm+' must contain a number.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(num<min||max<num)errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';}}}else if(test.charAt(0)=='R')errors+='- '+nm+' is required.\n';}}if(errors)alert('The following error(s) occurred:\n'+errors);document.MM_returnValue=(errors=='');}}
function MM_jumpMenu(targ,selObj,restore){eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");if(restore)selObj.selectedIndex=0;}
function getCookieVal(offset){var endstr=document.cookie.indexOf(";",offset);if(endstr==-1)
endstr=document.cookie.length;return unescape(document.cookie.substring(offset,endstr));}
function GetCookie(name){var arg=name+"=";var alen=arg.length;var clen=document.cookie.length;var i=0;while(i<clen){var j=i+alen;if(document.cookie.substring(i,j)==arg)
return getCookieVal(j);i=document.cookie.indexOf(" ",i)+1;if(i==0)break;}
return null;}
function SetCookie(name,value){var argv=SetCookie.arguments;var argc=SetCookie.arguments.length;var expires=(argc>2)?argv[2]:null;var path=(argc>3)?argv[3]:null;var domain=(argc>4)?argv[4]:null;var secure=(argc>5)?argv[5]:false;document.cookie=name+"="+escape(value)+
((expires==null)?"":("; expires="+expires.toGMTString()))+
((path==null)?"":("; path="+path))+
((domain==null)?"":("; domain="+domain))+
((secure==true)?"; secure":"");}
function DeleteCookie(name){var exp=new Date();exp.setTime(exp.getTime()-1);var cval=GetCookie(name);document.cookie=name+"="+cval+"; expires="+exp.toGMTString();}
function MM_openBrWindow(theURL,winName,features){window.open(theURL,winName,features);}
function GoToURL(url){window.location=url;}
function validateSignin(){var pro=true;if(document.fulllogin.username.value==""||document.fulllogin.password.value==""){alert("You must provide a Username & Password.");var pro=false;}
if(pro)document.fulllogin.submit();}
function LoadPane(item){var toggleset=['home','about','facility','partners'];for(var v=0;v<toggleset.length;v++){if(toggleset[v]==item){var key;if(document.getElementById)
{key=document.getElementById(item);}else{key=document.all(item);}
if(key!=undefined){var visible=(key.style.display!='none');if(visible){key.style.display="none";}else if(visible=="block"){key.style.display="block";}else{key.style.display="block";}}}else{var key;if(document.getElementById)
{key=document.getElementById(toggleset[v]);}else{key=document.all(toggleset[v]);}
if(key!=undefined){key.style.display="none";}}}}
function MM_effectAppearFade(targetElement,duration,from,to,toggle)
{Spry.Effect.DoFade(targetElement,{duration:duration,from:from,to:to,toggle:toggle});}
function MM_effectSlide(targetElement,duration,from,to,toggle)
{Spry.Effect.DoSlide(targetElement,{duration:duration,from:from,to:to,toggle:toggle});}
function ToggleVideo(item){for(var v=1;v<10;v++){if(v==item){var key;var keyx;if(document.getElementById)
{key=document.getElementById("videopreview_"+item);keyx=document.getElementById("videofull_"+item);}else{key=document.all("videopreview_"+item);keyx=document.all("videofull_"+item);}
if(key!=null){key.style.display="none";keyx.style.display="block";}}else{var key;var keyx;if(document.getElementById)
{key=document.getElementById("videopreview_"+v);keyx=document.getElementById("videofull_"+v);}else{key=document.all("videopreview_"+v);keyx=document.all("videofull_"+v);}
if(key!=null){key.style.display="block";keyx.style.display="none";}}}}
function UpdateReview(id,userid,status,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Update this Review?");if(input_box==true){window.location="/process.cfm?_a=review&_t=u&id="+id+"&userid="+userid+"&status="+status+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteMedia(id,assetid,type,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete this Media Element?");if(input_box==true){window.location="/process.cfm?_a=media&_t=d&id="+id+"&assetid="+assetid+"&type="+type+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteMenu(id,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete this Menu?");if(input_box==true){window.location="/lobby.cfm?_a=menu&_t=delete&id="+id+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteAd(id,type,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete your Print Ad?");if(input_box==true){window.location="/lobby.cfm?_a=ad&_t=delete&id="+id+"&type="+type+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function NewDeleteSpecial(specialid,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete this Special?");if(input_box==true){window.location="/lobby.cfm?_a=special&_t=delete&specialid="+specialid+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteFromSchedule(permissionid,scheduleid,pid,n_b,n_q,n_e,n_a){window.location="/lobby.cfm?_a=schedule&_t=delete&permissionid="+permissionid+"&scheduleid="+scheduleid+"&pid="+pid+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;jQuery.facebox.close();}
function DeleteFromScheduleOnly(permissionid,scheduleid,n_b,n_q,n_e,n_a){window.location="/lobby.cfm?_a=schedule&_t=deleteonly&permissionid="+permissionid+"&scheduleid="+scheduleid+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;jQuery.facebox.close();}
function UpdateSpecial(id,specialid,userid,status,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Update this Special?");if(input_box==true){window.location="/process.cfm?_a=special&_t=u&id="+id+"&specialid="+specialid+"&userid="+userid+"&status="+status+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function UpdateMediaStatus(id,assetid,status,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Update this Media's Status?");if(input_box==true){window.location="/process.cfm?_a=media&_t=s&id="+id+"&assetid="+assetid+"&status="+status+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function UpdateSpecialStatus(id,specialid,status,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Update this Special's Status?");if(input_box==true){window.location="/process.cfm?_a=special&_t=s&id="+id+"&specialid="+specialid+"&status="+status+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteSpecial(id,specialid,user,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete this Special?");if(input_box==true){window.location="/process.cfm?_a=special&_t=d&id="+id+"&specialid="+specialid+"&user="+user+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function UpdateMemberStatus(userid,status,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Update this Member's Status?");if(input_box==true){window.location="/process.cfm?_a=profile&_t=s&userid="+userid+"&status="+status+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function UpdateListingStatus(id,status,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Update this Listing's Status?");if(input_box==true){window.location="/process.cfm?_a=listing&_t=s&id="+id+"&status="+status+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteListing(id,user,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete this Listing?");if(input_box==true){window.location="/process.cfm?_a=listing&_t=d&id="+id+"&user="+user+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function DeleteMember(user,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete this Member?");if(input_box==true){window.location="/process.cfm?_a=register&_t=d&userid="+user+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function CancelAccount(user,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Delete your Account? All of your information and activity will be permanently deleted." + "\n\n" + "Please Note: If you have an active billing subscription, you must cancel your subscription in your Membership Panel, or by logging into your Paypal Account and cancelling your subscription manually. ");if(input_box==true){window.location="/lobby.cfm?_a=register&_t=d&userid="+user+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function CancelMember(user,n_b,n_q,n_e,n_a){input_box=confirm("Are you sure you wish to Cancel your Membership? All reviews, assets & listings submitted by you will also be deleted. ");if(input_box==true){window.location="/process.cfm?_a=register&_t=d&userid="+user+"&n_b="+n_b+"&n_q="+escape(n_q)+"&n_e="+escape(n_e)+"&n_a="+n_a;}}
function setClosed(val,item){if(val=="Closed"){var key;if(document.getElementById)
{key=document.getElementById(item);}else{key=document.all(item);}
key.value="Closed";}
if(val=="n/a"){var key;if(document.getElementById)
{key=document.getElementById(item);}else{key=document.all(item);}
key.value="n/a";}}
function ToggleAny(item){var key;if(document.getElementById)
{key=document.getElementById(item);}else{key=document.all(item);}
var visible=(key.style.display!='none');if(visible){key.style.display="none";}else if(visible=="block"){key.style.display="block";}else{key.style.display="block";}}
gup=function(){var regexS="([\\#][^]*)";var regex=new RegExp(regexS);var results=regex.exec(window.location.href);if(results==null)return"";else return results[0].replace("#","");}
function check_review_length()
{maxLen=255;if(document.reviewform.review.value.length>=maxLen){var msg="You have reached your maximum limit of characters allowed";alert(msg);document.reviewform.review.value=document.reviewform.review.value.substring(0,maxLen);}
else{document.reviewform.text_num.value=maxLen-document.reviewform.review.value.length;}}
function maxLengthPaste(field,maxChars)
{event.returnValue=false;if((field.value.length+window.clipboardData.getData("Text").length)>maxChars){return false;}
event.returnValue=true;}
function ToggleResults(item){var key;var keyx;if(document.getElementById)
{key=document.getElementById("results_map");keyx=document.getElementById("results_listing");keyz=document.getElementById("results_listing_sort");}else{key=document.all("results_map");keyx=document.all("results_listing");keyz=document.all("results_listing_sort");}
if(item=="results_map"){key.style.display="block";keyx.style.display="none";keyz.style.display="none";}else{key.style.display="none";keyx.style.display="block";keyz.style.display="block";}}
function ToggleRefine(item){var key;var keyx;if(document.getElementById)
{key=document.getElementById("refine_"+item);keyx=document.getElementById("refine_"+item+"_arrow");}else{key=document.all("refine_"+item);keyx=document.all("refine_"+item+"_arrow");}
var visible=(key.style.display!='none');if(visible){key.style.display="none";}else if(visible=="block"){key.style.display="block";}else{key.style.display="block";}
if(keyx.getAttribute("src")=="/images/arrow_red_d.gif"){keyx.setAttribute("src","/images/arrow_red_u.gif");}else{keyx.setAttribute("src","/images/arrow_red_d.gif");};}
function ToggleTabs(num,item){
	for(var v=0;v<31;v++){
		if(v==num){
			var key;
			if(document.getElementById){
				key=document.getElementById(item+"_tabs_tab_"+num);
				keyx=document.getElementById("subpanel_"+item+"_"+num);
			}else{
				key=document.all(item+"_tabs_tab_"+num);
				keyx=document.all("subpanel_"+item+"_"+num);
			}
			if(key!=null && keyx!=null){
				keyx.style.display="block";
				key.setAttribute("class","HomeTabs_tab Tabset_selected");
				key.setAttribute("className","HomeTabs_tab Tabset_selected");
			}
		}else{
			var key;
			if(document.getElementById){
				key=document.getElementById(item+"_tabs_tab_"+v);
				keyx=document.getElementById("subpanel_"+item+"_"+v);
			}else{
				key=document.all(item+"_tabs_tab_"+v);
				keyx=document.all("subpanel_"+item+"_"+v);
			}
			if(key!=null && keyx!=null){
				keyx.style.display="none";
				key.setAttribute("class","HomeTabs_tab");
				key.setAttribute("className","HomeTabs_tab");
			}
		}
	}
}
function UpdateStars(item,sub){var key;if(document.getElementById)
{key=document.getElementById("star_"+item);}else{key=document.all("star_"+item);}
if(key!=undefined){key.setAttribute("class","star"+sub);key.setAttribute("className","star"+sub);}}
function ValidateReview(){var pro=true;if(document.reviewform.review.value==""){alert("You must write a review to post a review.");var pro=false;}
if(pro)document.reviewform.submit();};function PaneToggle(item,sub){var key;if(document.getElementById)
{key=document.getElementById(item+"_"+sub);keyx=document.getElementById(item+"_"+sub+"_img");}else{key=document.all(item+"_"+sub);keyx=document.all(item+"_"+sub+"_img");}
var expdate=new Date();expdate.setTime(expdate.getTime()+(24*60*60*1000));if(key!=undefined){var visible=(key.style.display!='none');if(visible){key.style.display="none";keyx.setAttribute("src","/images/expand.png");keyx.setAttribute("srcName","/images/expand.png");}else if(visible=="block"){key.style.display="block";keyx.setAttribute("src","/images/collapse.png");keyx.setAttribute("srcName","/images/collapse.png");}else{key.style.display="block";keyx.setAttribute("src","/images/collapse.png");keyx.setAttribute("srcName","/images/collapse.png");}}}
var phone="()- 0123456789";var numb="0123456789";var alpha="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_@.";function res(t,v){var w="";for(i=0;i<t.value.length;i++){x=t.value.charAt(i);if(v.indexOf(x,0)!=-1)
w+=x;}
t.value=w;}
function ToggleUserStatus(item,UserID,Status)
{var key;if(document.getElementById){key=document.getElementById("statusicon_"+item);}else{key=document.all("statusicon_"+item);}
if(key.getAttribute("src")=="/images/user_1.gif"){key.setAttribute("src","/images/user_0.gif");var newStatus=2;}else{key.setAttribute("src","/images/user_1.gif");var newStatus=1;};ajRet=new wddxAjax();ajRet.call('remote_ToggleUserStatus',remote_ToggleUserStatusResponse,UserID,newStatus);}
function remote_ToggleUserStatusResponse(obj)
{}
function AddToCart(cart,permissionid){ajRet=new wddxAjax();ajRet.call('remote_AddToCart',remote_AddToCartResponse,cart,permissionid);}
function remote_AddToCartResponse(obj)
{
	var keyx;
	if(document.getElementById){
		keyx=document.getElementById(obj);
	}else{
		keyx=document.all(obj);
	}
keyx.setAttribute("readonly","true");
keyx.value="In Cart";
keyx.setAttribute("class","blue_disabled");
}
function gotoStage(stage){for(var index=1;index<4;index++){var key;var keyx;if(document.getElementById){key=document.getElementById("stage_"+index);}else{key=document.all("stage_"+index);}
if(stage==index){key.setAttribute("class","none");}else{key.setAttribute("class","disable");}}}
function MM_validateRegistration(){if(document.register.Agree.checked!=true){errors="You must agree to the Terms & Conditions";alert(errors);document.MM_returnValue=(errors=='');}else if(document.register.r_password.value!=document.register.r_password2.value){errors="Those Passwords do not Match";alert(errors);document.MM_returnValue=(errors=='');}else if(document.register.r_email.value!=document.register.r_emailconfirm.value){errors="Those Emails do not Match";alert(errors);document.MM_returnValue=(errors=='');}else{if(document.getElementById){var i,p,q,nm,test,num,min,max,errors='',args=MM_validateRegistration.arguments;for(i=0;i<(args.length-2);i+=3){test=args[i+2];val=document.getElementById(args[i]);if(val){nm=val.name;if((val=val.value)!=""){if(test.indexOf('isEmail')!=-1){p=val.indexOf('@');if(p<1||p==(val.length-1))errors+='- '+nm+' must contain an e-mail address.\n';}else if(test!='R'){num=parseFloat(val);if(isNaN(val))errors+='- '+nm+' must contain a number.\n';if(test.indexOf('inRange')!=-1){p=test.indexOf(':');min=test.substring(8,p);max=test.substring(p+1);if(num<min||max<num)errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';}}}else if(test.charAt(0)=='R')errors+='- '+nm+' is required.\n';}}if(errors)alert('The following error(s) occurred:\n'+errors);document.MM_returnValue=(errors=='');}}}

function trackSpotlight(index) {
	ajRet = new wddxAjax();
    ajRet.call('remote_trackSpotlight',remote_trackSpotlightResponse,index);
}

function remote_trackSpotlightResponse(obj)
{
	if(obj != 'false'){
	//alert("spotlight: " + obj.title);
	pageTracker._trackEvent('Advertising', 'In the Spotlight', obj.title, obj.id);
	}
}

function trackFeaturedCoupon(index) {
	ajRet = new wddxAjax();
    ajRet.call('remote_trackFeaturedCoupon',remote_trackFeaturedCouponResponse,index);
}

function remote_trackFeaturedCouponResponse(obj)
{
	if(obj != 'false'){
	//alert("coupon: " + obj.title);
	pageTracker._trackEvent('Advertising', 'Featured Coupon', obj.title, obj.id);
	}
}

function CheckPromoCode(code,amount) {
	ajRet = new wddxAjax();
    ajRet.call('remote_CheckPromoCode',remote_CheckPromoCodeResponse,code,amount);
}

function remote_CheckPromoCodeResponse(obj)
{
	var key;
	if ( document.getElementById ) {key=document.getElementById("regtotal");} else {key=document.all("regtotal");}
	var keyx;
	if ( document.getElementById ) {keyx=document.getElementById("retpromo");} else {keyx=document.all("retpromo");}		
	
	if(obj.bool == 1){
		key.innerHTML="<h2><strong>Total Amount:</strong> <strong>" + obj.newammountformatted + "</strong></h2>";
		keyx.className="status_1";
		keyx.innerText="Promo Code Accepted";
	} else {
		key.innerHTML="<h2><strong>Total Amount:</strong> <strong>" + obj.newammountformatted + "</strong></h2>";
		keyx.className="status_0";
		keyx.innerText="Invalid Promo Code";
	};
	
}


function ConfirmCancel()
{
var r=confirm("To cancel your billing subscription, you will sent offsite to Paypal.com where you will be asked to log into your Paypal account to cancel your subscription. You may also cancel your subscription by checking the email Paypal sent you upon registration, or by calling Midhudsonmedia @ 518-828-2500.");
if (r==true)
  {
  GoToURL('https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=laurie%40midhudsonmedia%2ecom');
  }
}

function ForceClose(user){input_box=confirm("Are you sure you wish to Cancel this Membership?");if(input_box==true){window.location="/lobby.cfm?_a=membership&_t=d&userid="+user}}




