var __MTTBLINK__,__MTTBID__;function obfuscator(a,b,c,e,f){shift=a.length;link="";for(i=0;i<a.length;i++)-1==b.indexOf(a.charAt(i))?(ltr=a.charAt(i),link+=ltr):(ltr=(b.indexOf(a.charAt(i))-shift+b.length)%b.length,link+=b.charAt(ltr));"hidden_input"==c?document.write('<input type="hidden" name="CCode" value="'+link+'" />'):"__MTTBLINK__"==c?(__MTTBLINK__=e+link,f||document.write(link)):"__MTTBID__"==c&&(__MTTBID__=link,f||document.write(link))}
function printPage(a){a=document.getElementById(a);document.getElementsByTagName&&(linkEl=document.getElementsByTagName("link"),styleEl=document.getElementsByTagName("style"));printWindow=window.open("","printWindow","left=50,top=50,width=400,height=400,scrollbars=yes,status=yes,resizable=yes");printWindow.opener=self;d=printWindow.document;d.open();d.writeln("<html><head><title>"+document.title+"</title>");linkEl&&d.writeln("<link rel='stylesheet' type='text/css' href='"+linkEl[0].getAttribute("href")+
"'/>");d.writeln('</head><body style="background-color:#fff;"><div id="page" style="width:600px"><div id="content"><div id="blog" style="float:none;">');d.writeln(a.innerHTML);d.writeln("</div></div></div>");d.writeln("<br><span style='font-family:tahoma;font-size:11px;'>Printed from: "+window.location+"</span></html>");d.close();printWindow.print();printWindow.close()}function sendemail(){locationstring="mailto:contactus@diet-blog.com";window.location.replace(locationstring)}
function ReloadTextDiv(){document.getElementById("TextDisplay").innerHTML="<p>"+document.getElementById("comment-text").value.replace(/(\r\n|\n)/g,"<br />").replace(/(<br \/>){2,}/gi,"</p><p>")+"</p>"}var mtCookieName="mt_blog_user",mtCookieDomain=".diet-blog.com",mtCookiePath="/",mtCookieTimeout=14400;function mtHide(a){if(a="string"==typeof a?document.getElementById(a):a)a.style.display="none"}function mtShow(a){if(a="string"==typeof a?document.getElementById(a):a)a.style.display="block"}
function mtAttachEvent(a,b){var c="on"+a,e=window[c];window[c]="function"!=typeof e?b:function(a){e(a);return b(a)}}function mtFireEvent(a,b){var c=window["on"+a];if("function"==typeof c)return c(b)}
function mtRelativeDate(a,b){var c=Math.floor(((new Date).getTime()-a.getTime())/1E3),e;if(60>c)e="moments ago";else if(86400>=c)e=Math.floor(c/3600),c=Math.floor(c%3600/60),e=1==e?"1 hour ago":1<e?"2 hours ago".replace(/2/,e):1==c?"1 minute ago":"2 minutes ago".replace(/2/,c);else if(604800>=c){var f=Math.floor(c/86400);e=Math.floor(c%86400/3600);e=1==f?"1 day ago":1<f?"2 days ago".replace(/2/,f):1==e?"1 hour ago":"2 hours ago".replace(/2/,e)}return e?e:b}
function mtEditLink(a,b){var c=mtGetUser();c&&a&&b&&c.id==b&&document.write('<a href="mt.cgi?__mode=view&amp;_type=entry&amp;id='+a+'">Edit</a>')}function mtCommentFormOnFocus(){mtShowCaptcha()}var mtCaptchaVisible=!1;function mtShowCaptcha(){var a=mtGetUser();if((!a||!a.is_authenticated)&&!mtCaptchaVisible)if(a=document.getElementById("comments-open-captcha"))a.innerHTML="",mtCaptchaVisible=!0}var is_preview,user;function mtSetUser(a){a&&(user=a,mtSaveUser(),mtFireEvent("usersignin"))}
function mtEscapeJS(a){return a=a.replace(/'/g,"&apos;")}function mtUnescapeJS(a){return a=a.replace(/&apos;/g,"'")}
function mtBakeUserCookie(a){var b="";a.name&&(b+="name:'"+mtEscapeJS(a.name)+"';");a.url&&(b+="url:'"+mtEscapeJS(a.url)+"';");a.email&&(b+="email:'"+mtEscapeJS(a.email)+"';");a.is_authenticated&&(b+="is_authenticated:'1';");a.profile&&(b+="profile:'"+mtEscapeJS(a.profile)+"';");a.userpic&&(b+="userpic:'"+mtEscapeJS(a.userpic)+"';");a.sid&&(b+="sid:'"+mtEscapeJS(a.sid)+"';");b+="is_trusted:'"+(a.is_trusted?"1":"0")+"';";b+="is_author:'"+(a.is_author?"1":"0")+"';";b+="is_banned:'"+(a.is_banned?"1":
"0")+"';";b+="can_post:'"+(a.can_post?"1":"0")+"';";b+="can_comment:'"+(a.can_comment?"1":"0")+"';";return b=b.replace(/;$/,"")}
function mtUnbakeUserCookie(a){if(a){for(var b={},c;c=a.match(/^((name|url|email|is_authenticated|profile|userpic|sid|is_trusted|is_author|is_banned|can_post|can_comment):'([^']+?)';?)/);)a=a.substring(c[1].length),b[c[2]]=c[2].match(/^(is|can)_/)?"1"==c[3]?!0:!1:mtUnescapeJS(c[3]);b.is_authenticated?b.is_anonymous=!1:(b.is_anonymous=!0,b.can_post=!1,b.is_author=!1,b.is_banned=!1,b.is_trusted=!1);return b}}
function mtGetUser(){if(!user){var a=mtGetCookie(mtCookieName);if(!a)return;(user=mtUnbakeUserCookie(a))||(user={is_anonymous:!0,can_post:!1,is_author:!1,is_banned:!1,is_trusted:!1})}return user}var mtFetchedUser=!1;
function mtFetchUser(a){a||(a="mtSetUser");if("mtSetUser"==a&&mtGetUser())a=document.URL,a=a.replace(/#.+$/,""),location.href=a+"#comments-open";else{mtFetchedUser=!0;var b=document.createElement("script"),c=(new Date).getTime();b.src="http://www.diet-blog.com/cgi-bin/fdback.fcgi?__mode=session_js&blog_id=2&jsonp="+a+"&ts="+c;document.getElementsByTagName("head")[0].appendChild(b)}}function mtRememberMeOnClick(a){a.checked||mtClearUser(a.form);return!0}var mtRequestSubmitted=!1;
function mtCommentOnSubmit(a){if(!mtRequestSubmitted){mtRequestSubmitted=!0;if(a.armor)a.armor.value="20ee5687eaca57c3d669d387bbbb21cc69a59826";a.bakecookie&&a.bakecookie.checked&&mtSaveUser(a);if(a.preview_button)a.preview_button.disabled=!0;if(a.post)a.post.disabled=!0;a=mtGetUser();return!is_preview&&a&&a.is_authenticated?(mtFetchedUser=!1,mtFetchUser("mtCommentSessionVerify"),!1):!0}return!1}
function mtCommentSessionVerify(a){var b=mtGetUser(),c=document.comments_form;b&&a&&a.sid&&b.sid==a.sid?c.submit():(alert("Your session has expired. Please sign in again to comment."),mtClearUser(),mtFireEvent("usersignin"))}
function mtUserOnLoad(){var a=mtGetUser();if(document.getElementById("comments-form")){a&&a.is_authenticated&&(mtShow("comments-form"),mtHide("comments-open-data"),mtCaptchaVisible&&mtHide("comments-open-captcha"));a&&a.is_banned&&mtHide("comments-form");is_preview?mtShowCaptcha():mtShowGreeting();var b=document.comments_form;if(b){if(a&&a.is_anonymous){if(a.email)b.email.value=a.email;if(a.name)b.author.value=a.name;if(a.url)b.url.value=a.url;if(b.bakecookie)b.bakecookie.checked=a.name||a.email}else if(a&&
a.sid&&b.sid)b.sid.value=a.sid;if(b.post.disabled)b.post.disabled=!1;if(b.preview_button.disabled)b.preview_button.disabled=!1;mtRequestSubmitted=!1}}}function mtEntryOnLoad(){mtHide("trackbacks-info");mtFireEvent("usersignin")}function mtEntryOnUnload(){if(mtRequestSubmitted){var a=document.comments_form;if(a){if(a.post&&a.post.disabled)a.post.disabled=!1;if(a.preview_button&&a.preview_button.disabled)a.preview_button.disabled=!1}mtRequestSubmitted=!1}return!0}mtAttachEvent("usersignin",mtUserOnLoad);
function mtSignIn(){var a=document.URL,a=a.replace(/#.+/,""),b="http://www.diet-blog.com/cgi-bin/mt-cp.cgi?__mode=login&blog_id=2",b=is_preview?document.comments_form?b+("&entry_id="+document.comments_form.entry_id.value):b+"&return_url=http%3A%2F%2Fwww.diet-blog.com%2F":b+("&return_url="+encodeURIComponent(a));mtClearUser();location.href=b}
function mtSignInOnClick(a){var b;a&&((b=document.getElementById(a))||(b=document.getElementById("comment-form-external-auth")));if(b)b.innerHTML='Signing in... <span class="status-indicator">&nbsp;</span>';mtClearUser();mtFetchUser("mtSetUserOrLogin");return!1}function mtSetUserOrLogin(a){a&&a.is_authenticated?mtSetUser(a):mtSignIn()}
function mtSignOut(a){mtClearUser();var a=document.URL,a=a.replace(/#.+/,""),b="http://www.diet-blog.com/cgi-bin/mt-cp.cgi?__mode=logout&static=0";is_preview?document.comments_form?(a=document.comments_form.entry_id.value,b+="&entry_id="+a):b+="&return_url=http%3A%2F%2Fwww.diet-blog.com%2F":b+="&return_url="+encodeURIComponent(a);location.href=b}function mtSignOutOnClick(){mtSignOut();return!1}function mtShowGreeting(){mtShowCaptcha()}
function mtReplyCommentOnClick(a,b){mtShow("comment-form-reply");var c=document.getElementById("comment-reply"),e=document.getElementById("comment-reply-label"),f=document.getElementById("comment-text"),g;g='Replying to <a href="#comment-__PARENT__" onclick="location.href=this.href; return false">comment from __AUTHOR__</a>'.replace(/__PARENT__/,a);g=g.replace(/__AUTHOR__/,b);e.innerHTML=g;c.value=a;c.checked=!0;try{f.focus()}catch(h){}mtSetCommentParentID()}
function mtSetCommentParentID(){var a=document.getElementById("comment-reply"),b=document.getElementById("comment-parent-id");if(a&&b){var c=0;if(!0==a.checked)c=a.value;b.value=c}}
function mtSaveUser(a){if(!is_preview){var b=mtGetUser();if(a&&(!b||b.is_anonymous)){b||(b={is_authenticated:!1,can_comment:!0,is_author:!1,is_banned:!1,is_anonymous:!0,is_trusted:!1});if(void 0!=a.author)b.name=a.author.value;if(void 0!=a.email)b.email=a.email.value;if(void 0!=a.url)b.url=a.url.value}if(b){var c=1E3*mtCookieTimeout;b.is_anonymous&&a&&a.bakecookie&&a.bakecookie.checked&&(c=31536E6);a=new Date;mtFixDate(a);a.setTime(a.getTime()+c);b=mtBakeUserCookie(b);mtSetCookie(mtCookieName,b,a,
mtCookiePath,mtCookieDomain,"https:"==location.protocol)}}}function mtClearUser(){user=null;mtDeleteCookie(mtCookieName,mtCookiePath,mtCookieDomain,"https:"==location.protocol)}function mtSetCookie(a,b,c,e,f,g){f&&f.match(/^\.?localhost$/)&&(f=null);a=a+"="+escape(b)+(c?"; expires="+c.toGMTString():"")+(e?"; path="+e:"")+(f?"; domain="+f:"")+(g?"; secure":"");document.cookie=a}
function mtGetCookie(a){var a=a+"=",b=document.cookie,c=b.indexOf(a);if(-1==c)return"";var e=b.indexOf(";",c+a.length);if(-1==e)e=b.length;return unescape(b.substring(c+a.length,e))}function mtDeleteCookie(a,b,c,e){if(mtGetCookie(a))c&&c.match(/^\.?localhost$/)&&(c=null),document.cookie=a+"="+(b?"; path="+b:"")+(c?"; domain="+c:"")+(e?"; secure":"")+"; expires=Thu, 01-Jan-70 00:00:01 GMT"}function mtFixDate(a){var b=(new Date(0)).getTime();0<b&&a.setTime(a.getTime()-b)}
function mtGetXmlHttp(){if(!window.XMLHttpRequest)window.XMLHttpRequest=function(){for(var a=["Microsoft.XMLHTTP","MSXML2.XMLHTTP.5.0","MSXML2.XMLHTTP.4.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP"],b=0;b<a.length;b++)try{return new ActiveXObject(a[b])}catch(c){}};if(window.XMLHttpRequest)return new XMLHttpRequest}
function mtInit(){if(!arguments.callee.done&&(arguments.callee.done=!0,window._timer&&clearInterval(window._timer),window.onload&&window.onload!==window.mtInit))window.onload(),window.onload=function(){}}document.addEventListener&&document.addEventListener("DOMContentLoaded",mtInit,!1);/WebKit/i.test(navigator.userAgent)&&(_timer=setInterval(function(){/loaded|complete/.test(document.readyState)&&mtInit()},10));window.onload=mtInit;

