// Client side includes, mtrollan 2005

//Standard CDT rollover code
function MM_swapImgRestore() {
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() {
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) {
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() {
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

//Directory and Page detection
var intLastIndexOfSlash=location.href.lastIndexOf("/");
var intNextToLastIndexOfSlash=location.href.substr(0,(intLastIndexOfSlash)).lastIndexOf("/");
var Directory=location.href.substring(intNextToLastIndexOfSlash+1,intLastIndexOfSlash);

<!--- get id from address bar; daniel.esquivias@medseek.com --->
var IDIS = location.href.lastIndexOf("?id=") + 4;
var IDID = location.href;
var IDID = IDID.substr(IDIS,IDID.length);
var IDAI = IDID.split("&");
var ID	=	IDAI[0];
var id	=	ID;
<!--- x-daniel.esquivias@medseek.com --->
var intLastIndexOfHTM=location.href.lastIndexOf(".htm");
var Page=location.href.substring(intLastIndexOfSlash+1,intLastIndexOfHTM);
Directory = Directory.toLowerCase();
Page = Page.toLowerCase();

function Breadcrumb(){
	if(id=="107"){
		document.write('Physicians')
	}else{
		document.write('Health Content')
	}
}

//Top Navigation [theme]
function TopNav(section){
	document.write('<td><a href="/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_home','','/media/theme_images/"+section+"_topnav_home_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_home.gif" alt="Home" name="topnav_home" width="63" height="28" border="0" id="topnav_home" /></a></td>');
	document.write('<td><a href="/frontpage/healthcenters.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_healthcenters','','/media/theme_images/"+section+"_topnav_healthcenters_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_healthcenters.gif" alt="Health Centers" name="topnav_healthcenters" width="115" height="28" border="0" id="topnav_healthcenters" /></a></td>');
	document.write('<td><a href="/forprofessionals/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_forpro','','/media/theme_images/"+section+"_topnav_forpro_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_forpro.gif" alt="For Healthcare Professionals" name="topnav_forpro" width="194" height="28" border="0" id="topnav_forpro" /></a></td>');
	document.write('<td><a href="/frontpage/forwomen.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_forwomen','','/media/theme_images/"+section+"_topnav_forwomen_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_forwomen.gif" alt="For Women" name="topnav_forwomen" width="91" height="28" border="0" id="topnav_forwomen" /></a></td>');
	document.write('<td><a href="/frontpage/formen.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_formen','','/media/theme_images/"+section+"_topnav_formen_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_formen.gif" alt="For Men" name="topnav_formen" width="75" height="28" border="0" id="topnav_formen" /></a></td>');
	document.write('<td><a href="/frontpage/forseniors.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_forsr','','/media/theme_images/"+section+"_topnav_forsr_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_forsr.gif" alt="For Seniors" name="topnav_forsr" width="91" height="28" border="0" id="topnav_forsr" /></a></td>');
	document.write('<td><a href="/physicians/" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage(');document.write("'topnav_finddr','','/media/theme_images/"+section+"_topnav_finddr_on.gif',1)");document.write('"><img src="/media/theme_images/'+section+'_topnav_finddr.gif" alt="Find a Physician" name="topnav_finddr" width="121" height="28" border="0" id="topnav_finddr" /></a></td>');
}

//Banner Flash/Gif chooser [theme]
function FlashOrGif(which){
	if(which=="flash"){
			document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="750" height="150">'); 
			document.write('<param name="movie" value="flash.swf">'); 
			document.write('<param name="quality" value="high">'); 
			document.write('<embed src="flash.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="150"></embed>'); 
			document.write('</object>');
	}
	else{document.write('<img src="flash.jpg" width="750" height="150" border="0" usemap="#Map">')}
}

// CTA row [theme]
function CTArow(){
	document.write('<table width="750" border="0" cellpadding="0" cellspacing="0">')
	document.write('<tr>')
	document.write('<td><a href="/nurse/"><img src="/nurse/nursingBox.jpg" alt="Nursing Opportunities" width="150" height="40" border="0" /></a></td>')
	document.write('<td><a href="/aboutus/performance.htm"><img src="/media/theme_images/cta_tmh.jpg" alt="" width="150" height="40" border="0" /></a></td>')
	document.write('<td><a href="/heart/"><img src="/media/theme_images/cta_heart.jpg" alt="" width="150" height="40" border="0" /></a></td>')
	document.write('<td><a href="/cancer/"><img src="/media/theme_images/cta_cancer.jpg" alt="" width="150" height="40" border="0" /></a></td>')
//	document.write('<td><a href="/orthopedic/"><img src="/media/theme_images/cta_rehab.jpg" alt="" width="150" height="40" border="0" /></a></td>')
	document.write('<td><a href="/women/womenspavilion.htm"><img src="/media/theme_images/cta_women.jpg" alt="" width="150" height="40" border="0" /></a></td>')
	document.write('</tr>')
	document.write('</table>')
}

//Drop Down [theme]
function jumpPage(newLoc) {
	newPage = newLoc.options[newLoc.selectedIndex].value
	if (newPage != "") {
	window.location = newPage
	}
}
function DropDown(){
    document.write('<select name="newLocation" class="dropdown" onChange="jumpPage(this.form.newLocation)">')
    document.write('<option selected>All Health Centers</option>')
	document.write('<option value="/additional/bariatricandweight.htm">Bariatric Center</option>')
	document.write('<option value="/behavioral/">Behavioral Health Center</option>')
	document.write('<option value="/bixler/">Bixler Emergency Center</option>')
    document.write('<option value="/cancer/"><a href="/cancer/">Cancer Center</option>')
    document.write('<option value="/diabetes/">Diabetes Center</option>')
	document.write('<option value="/family/">Family Medicine Centers</option>')
//	document.write('<option valute="/forprofessionals/familypracticeresidencyprogram.htm">Family Practice Residency Program </option>')
    document.write('<option value="/heart/">Heart &amp; Vascular Center</option>')
    document.write('<option value="/neuroscience/">NeuroScience Center</option>')
	document.write('<option value="/orthopedic/">Orthopedic Center</option>')
	document.write('<option value="/premier/">Premier Health &amp; Fitness Center</option>')
	document.write('<option value="/surgery/">Surgery Center</option>')
    document.write('<option value="/frontpage/forwomen.htm"><a href="/women/">Women&rsquo;s Services</option>')
	document.write('<option value="/additional/WoundCenter.htm"><a href="/women/">Wound Healing Center</option>')
	
    
    
    

    document.write('<option value="/additional/">Additional Services</option>')
    document.write('</select>')
}

// Left Navigation [theme]
function LeftNav(){
	var space='<div id="leftnavspace"><spacer type="block" width="1" height="1" /></div>'
	document.write('<div id="leftnav"><a href="/aboutus/" id="leftnav">About Us</a></div>'+space)
	document.write('<div id="leftnav"><a href="/patientsandvisitors/" id="leftnav">Patient &amp; Visitor Guide</a></div>'+space)
	document.write('<div id="leftnav"><a href="/frontpage/registration.htm" id="leftnav">Online Pre-Registration</a></div>'+space)
	document.write('<div id="leftnav"><a href="/yourhealth/" id="leftnav">Access Our Health Library</a></div>'+space)
	document.write('<div id="leftnav"><a href="/_mem_bin/formslogin.asp?/mypersonalhealth/encryptdefault.asp?from=personalization" id="leftnav">Health Tools</a></div>'+space)
	document.write('<div id="leftnav"><a href="/events/" id="leftnav">Classes &amp; Events</a></div>'+space)
	document.write('<div id="leftnav"><a href="http://www.growingfamily.com/webnursery/hospitalpage_view.asp?hospitalID=7468" id="leftnav" target="_blank">Web Nursery</a></div>'+space)
	document.write('<div id="leftnav"><a href="/waystogive/" id="leftnav">Ways to Give</a></div>'+space)
	document.write('<div id="leftnav"><a href="/employment/" id="leftnav">Employment Opportunities</a></div>'+space)
	document.write('<div id="leftnav"><a href="/frontpage/chat.htm" id="leftnav">Chat</a></div>')
	document.write('<br>')
}

//Contact Us paragraph [content]
function ContactUs(section){
	document.write('<div id="dottedlinehorizontal"><spacer type="block" width="1" height="1" /></div>')
    document.write('<div class="contenttitle')
	if(section=="cancer"){
		document.write(' cancer_color">Contact Us</div>')
	    document.write('<div class="bodycopy">Cancer Services <br>(850) 431-CARE (2273)</div>')
	}
	else if(section=="diabetes"){
		document.write(' diabetes_color">Contact Us</div>')
	    document.write('<div class="bodycopy">Tallahassee Memorial Diabetes Center<br>1981-2 Capital Circle N.E<br>Tallahassee, FL  32308<br>(850) 431-5404</div>')
	}
	else if(section=="heart"){
		document.write(' heart_color">Contact Us</div>')
	    document.write('<div class="bodycopy">Heart & Vascular Center<br>(850) 431-CARE (2273)</div>')
	}
	else{
	}
}

function HeartCTAwindow(){
	window.open('https://www.wellmed.com/miniq/Connect.aspx?SiteID=healthvision&ToolID=407&EMailLoc=2&NoPrefill=true&TellAFriend=false&DoSendEMail=false&SponsorID=50679', 'MiniQ', 'toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=yes,scrollbars=yes,width=640,height=600,left=25,top=25,screenX=25,screenY=25')
}

//Interior page CTAs [content]
function interiorCTAs(){
//	  document.write('<a href="/media/HeartDoctors.wmv" target="_blank"><img src="/media/theme_images/cta_cancer_video.gif" width="130" height="50" border="0"></a><br><br>')
//    document.write('<a href="/physicians/"><img src="/media/theme_images/cta_meet_drs.gif" width="130" height="50" border="0"></a><br><br>')
//    document.write('<a href="/waystogive/"><img border="0" src="/media/theme_images/cta_cancer_ways_to_give.gif" width="130" height="50"></a><br><br>')
//    document.write('<a href="http://12.31.13.222/forums/"><img src="/media/theme_images/cta_chat.gif" width="130" height="50" border="0"></a><br><br>')
LandingCTAs()
}

//CTAs
//Random CTA Generator; duplicate-free
//Written by mtrollan Jan 2005
function LandingCTAs(ctaNum){
	//These are the CTAs - to add another, simply insert it above the first one (leave the comma off the end of the very last cta)
	ctas=[0,
	'<a href="urgentCare.cfm?id=430"><img src="images/media/theme_images/cta_Urgent_Care_Center.gif" width="130" height="50" border="0"></a>',
	'<a href="surgery.cfm?id=487"><img src="images/media/theme_images/cta_Robotic_Surgery.gif" width="130" height="50" border="0"></a>',
	'<a href="http://www.lifelinesys.com/affiliate/tmh"><img src="images/media/theme_images/cta_lifeline_systems.gif" width="130" height="50" border="0"></a>',
	'<a href="neuroscience.cfm?id=386"><img src="images/media/theme_images/cta_stroke_center.gif" width="130" height="50" border="0"></a>',
	'<a href="womenChildren.cfm?Id=364"><img src="images/media/theme_images/cta_healthy_Living.gif" width="130" height="50" border="0"></a>',	
	'<a href="http://tmh.jobscience.com/"><img src="images/media/theme_images/cta_job_opportunities.gif" width="130" height="50" border="0"></a>',		
	'<a href="http://www.tmh.org/application_layout.cfm?id=443&action=calendarMonth"><img src="images/media/theme_images/cta_signup_classes_events.gif" width="130" height="50" border="0"></a>',	
	'<a href="iframe_layout.cfm?id=382"><img src="images/media/theme_images/cta_preregister_online.gif" width="130" height="50" border="0"></a>',
	'<a href="premier.cfm?id=174"><img src="images/media/theme_images/cta_premier_health_fitness.gif" width="130" height="50" border="0"></a>',
	'<a href="iframe_layout.cfm?id=383"><img src="images/media/theme_images/cta_ob_preregister.gif" width="130" height="50" border="0"></a>',
	'<a href="javascript:HeartCTAwindow();"><img src="images/media/theme_images/cta_heart_health_quiz.gif" width="130" height="50" border="0"></a>',
	'<a href="family.cfm?id=99"><img src="images/media/theme_images/cta_visit_fmc.gif" width="130" height="50" border="0"></a>'
	]
	
	//Now we randomly shuffle the CTAs
	Array.prototype.shuffle= function(times){
	var i,j,t,l=this.length;
	while(times--){
	with(Math){
	i=floor(random()*l);j=floor(random()*l);}
	t=this[i];this[i]=this[j];this[j]=t;
	}return this;}
	ctas.shuffle(10)
	
	//Eliminate the 0 (the first item in the array is statistically more likely to appear)
	do {ctas.shuffle(10);}
	while (ctas[0]==0||ctas[1]==0||ctas[2]==0||ctas[3]==0)
	
	//Now we pick the first four random numbers
	var cta1=(ctas[0]);var cta2=(ctas[1]);var cta3=(ctas[2]);var cta4=(ctas[3]);
	
	//Now we write the CTAs to the document
	if(ctaNum == "1"){
	document.write(cta3)
	}else if(ctaNum == "2") {
	document.write(cta2+'<br><br>'+cta3+'<br><br>')
	}else{
	document.write('<a href="application_layout.cfm?id=220"><img src="images/media/theme_images/cta_meet_drs.gif" width="130" height="50" border="0"></a><br><br>'+cta2+'<br><br>'+cta3+'<br><br>')
	}
	
	
}
//Footer [theme]
function Footer(){
	document.write('Tallahassee Memorial HealthCare  |  <a href="/" class="footer">Home</a>  |  <a href="/frontpage/contactus.htm" class="footer">Contact Us</a>  |  <a href="/Policies/" class="footer">Privacy Policy</a> |  <a href="/frontpage/copyright.htm" class="footer">Copyright and Disclaimer</a>')
}

///CONTACT US FUNCTION> 