if(LIWellness==undefined)var LIWellness={};LIWellness.Marketing={};LIWellness.Marketing.AJAX={};LIWellness.Marketing.onFocusHandler_p=function(a){a.style.display="none";a=document.getElementById?document.getElementById("password"):document.all.password;a.style.display="inline";a.focus();return true};LIWellness.Marketing.onBlurHandler_p=function(a){if(a.value===""){a.style.display="none";(document.getElementById?document.getElementById("fauxPassword"):document.all.fauxPassword).style.display="inline"}return true};
LIWellness.Marketing.showtip=function(a,c,b){if(!b)b=window.event;jQuery("#"+a).css("visibility","visible");var d=b.clientX+document.body.scrollLeft+document.documentElement.scrollLeft-25;b=b.clientY+document.body.scrollTop+document.documentElement.scrollTop+25;jQuery("#"+a).css("top",b);jQuery("#"+a).css("left",d);jQuery("#"+a+" > i").html(c)};LIWellness.Marketing.hidetip=function(a){window.setTimeout(function(){jQuery("#"+a).css("visibility","hidden")},200)};
LIWellness.Marketing.newSwapImage=function(a,c){jQuery("#"+a).attr("src",c)};
LIWellness.Marketing.changeVid=function(a){document.getElementById("vid").innerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="422" height="351" id="FLVPlayer"><param name="movie" value="/swf/mark/FLVPlayer_Progressive.swf" /><param name="salign" value="lt" /><param name="quality" value="high" /><param name="scale" value="noscale" /><param name="FlashVars" value="&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName=/swf/mark/media_testimonials/'+a+
'&autoPlay=true&autoRewind=true" /><embed src="/swf/mark/FLVPlayer_Progressive.swf" flashvars="&MM_ComponentVersion=1&skinName=Halo_Skin_3&streamName=/swf/mark/media_testimonials/'+a+'&autoPlay=true&autoRewind=true" quality="high" scale="noscale" width="422" height="351" name="FLVPlayer" salign="LT" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>'};LIWellness.Marketing.newChangeProp=function(a,c){jQuery("#"+a).html(c)};
LIWellness.Marketing.AJAX.FindPhysicians=function(){var a=$("input[name^=dt]");GetVars={};GetVars.zip=$("#zip").attr("value");GetVars.miles=$("#miles").attr("value");$(a).each(function(){if(this.checked)GetVars[$(this).attr("name")]=$(this).attr("value")});$.get("/backend/physicianlocator.php",GetVars,function(c){$("#PhysicianLocatorResults tr").remove();!c[0]||c[0].DoctorCode==undefined?$("#PhysicianLocatorResults").append('<tr id="noresults"><td align="center">There are no doctors in your area.  Please <a href="http://www.thedr.com/index.php?option=com_content&view=article&id=17&Itemid=6">contact us</a> if you are still interested in joining our program.</td></tr>'):
$("#noresults").remove();var b="";$(c).each(function(){if(this.DoctorCode)b+='<tr><td valign="top"><a href="/backend/signup.php?DoctorCode='+this.DoctorCode+'">'+this.FirstName+" "+this.LastName+"</a> - "+this.MileDistance+" mi.<br/><i>"+this.PracticeName+"</i><br/>"+this.Address+(this.Address2!=""?"<br/>"+this.Address2:"")+"<br/>"+this.City+", "+this.State+" "+this.Zip+"<br/><br/>Phone: "+this.Phone+(this.Fax!=""?"<br/>Fax: "+this.Fax:"")+"</td>";if(this.DoctorAttributes!=null){b+='<td>&nbsp;&nbsp;</td><td valign="top"><strong>This Doctor\'s Attributes</strong><ul>';
$(this.DoctorAttributes).each(function(){b+="<li>"+this+"</li>"});b+="</ul></td>"}b+="</tr><tr><td>&nbsp;</td></tr>"});$("#PhysicianLocatorResults").append(b)},"json")};
LIWellness.Marketing.AJAX.FindGlutenCoaches=function(a){var c={};if(a){var b="/backend/glutencoachfinderbystate.php";c.state=document.getElementById("state").value}else{b="/backend/glutencoachfinderbyzip.php";c.zip=$("#zip").attr("value");c.miles=$("#miles").attr("value")}$.get(b,c,function(d){$("#GlutenCoachFinderResults tr").remove();d[0]==undefined||d[0].DoctorCode==undefined?$("#GlutenCoachFinderResults").append('<tr id="noresults"><td align="center">There are no gluten coaches in your area.  Please <a href="contact.php">contact us</a> if you are still interested in joining our gluten program.</td></tr>'):
$("#noresults").remove();var e="",f;$(d).each(function(){if(this.DoctorCode){f=a?"":"- "+this.MileDistance+" mi.";e+='<tr><td valign="top">'+this.FirstName+" "+this.LastName+"</a>"+f+"<br/><i>"+this.PracticeName+"</i><br/>"+this.Address+(this.Address2!=""?"<br/>"+this.Address2:"")+"<br/>"+this.City+", "+this.State+" "+this.Zip+"<br/><br/>Phone: "+this.Phone+(this.Fax!=""?"<br/>Fax: "+this.Fax:"")+"</td>"}e+="</tr><tr><td>&nbsp;</td></tr>"});$("#GlutenCoachFinderResults").append(e)},"json")};

