/***********************************************
* DHTML slideshow script-  © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice must stay intact for legal use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
if (!(/MSIE/.test(navigator.userAgent)) && navigator.product == "Gecko") {
	HTMLElement.prototype.__defineSetter__("outerHTML", function (sHTML) {
	   var r = this.ownerDocument.createRange();
	   r.setStartBefore(this);
	   var df = r.createContextualFragment(sHTML);
	   this.parentNode.replaceChild(df, this);

	   return sHTML;
	});
}
var photos=new Array();
var boxtext=new Array();
var photoslink=new Array();
var which=0;

//define images.
photos[0]="images/garner.jpg";
photos[1]="images/tenofsky.jpg";
photos[2]="images/margolis.jpg";
photos[3]="images/Slaikeu.jpg";
photos[4]="images/leighton.jpg";
photos[5]="images/Stepke.jpg";
photos[6]="images/mccormick.jpg";
photos[7]="images/jacque_stearns.jpg";

boxtext[0] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Compassionate Care</h2><p>My biggest reward is the feeling that I get when I have helped a patient. It sounds like a clich&eacute;, but nothing compares to the feeling of gratitude and appreciation we often get from being able to help a patient in need.</p><p><strong>Steven Garner, MD</strong><br /><em>Family Medicine</em><br /><em>Wichita Clinic - Derby</em></p></div>";

boxtext[1] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Comprehensive Care</h2><p>It's a huge advantage having so many specialists in the same group at Wichita Clinic. We all have access to the same records and I get lab and radiology results quickly.  We work together to ease the patient&#8217;s stress level as much as possible.</p><p><strong>Patty Tenofsky, MD FACS</strong><br /><em>Breast Care Specialist</em><br /><em>Wichita Clinic - Founders&#8217; Circle</em></p></div>";

boxtext[2] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Collaborative Care</h2><p>I am proud to join Wichita Clinic&#8217;s growing Cardiology care team. The opportunity to add my services to our department allows us to provide all cardiovascular services in house, and helps us provide the best management of our patients&#8217; heart health.</p><p><strong>P. David Margolis, MD FACC</strong><br /><em>Cardiac Electrophysiology</em><br/><em>Wichita Clinic - Murdock</em><br /></p></div>";

boxtext[3] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Collaborative Care</h2><p>I am excited to work with a group of talented professionals who pride themselves in consistently providing excellent care to each patient.</p><p><strong>Jason Slaikeu, MD RPVI</strong><br /><em>Vascular Surgery</em><br/><em>Wichita Clinic - Founders&#8217; Circle and Advanced Aesthetics</em></p></div>";

boxtext[4] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Cutting-Edge Technology</h2><p>The physicians and staff at Wichita Clinic are interested in making continuous improvements and utilizing cutting-edge technology. I see the need for Physical Medicine and Rehabilitation services growing as the population ages and it's exciting to be able to offer new services to clinic patients.</p><p><strong>Robbie O&#8217;Brien-Leighton, MD</strong><br /><em>Physical Medicine and Rehabilitation</em><br/><em>Wichita Clinic - Founders&#8217; Circle</em><br/><em>Wichita Clinic - Bethel-Newton</em><br/><em>Wichita Clinic - Eberly Farm</em></p></div>";

boxtext[5] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Compassionate Care</h2><p>The most rewarding thing about being a doctor is being able to make a difference every twenty minutes.</p><p><strong>Bernhard Stepke, MD PhD</strong><br /><em>Family Medicine</em><br/><em>Wichita Clinic - Eberly Farm</em><br /></p></div>";

boxtext[6] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Compassionate Care</h2><p>Being a doctor gives me an opportunity to help people improve their lives. As an optometrist at Wichita Clinic the most rewarding thing about my job is hearing kids say, &#8220;I can see the leaves on the trees.&#8221;</p><p><strong>Alan McCormick, OD</strong><br /><em>Optometry</em><br/><em>Wichita Clinic - Carriage Park</em><br /></p></div>";

boxtext[7] = "<div id='boxtext' style='padding: 10px 0px 10px 20px;'><h2>Convenience</h2><p>E-Script makes it easy for your Clinic physicians to transmit your prescription straight to our fax machine and speed up processing and delivery. Our full-service pharmacy also offers <em><a href='http://www.wichitaclinic.com/Specialties_and_Services/Other_Services/Pharmacy/Online_Prescription_Refill.php'>online prescription refill</a></em>, a drive-through window, delivery to your home or office, and mailing services.</p><p><em>Pharmacy</em><br /><em>Wichita Clinic - Murdock</em></p></div>";

//Specify whether images should be linked or not (1=linked)
var linkornot=0;

//Set corresponding URLs, width and height for links in a new window
//for each of above images. Define ONLY if variable linkornot equals "1"
photoslink[0]=["http://www.google.com/", 300, 250];
photoslink[1]=["http://www.yahoo.com/", 500, 100];
photoslink[2]=["http://www.dynamicdrive.com/", 375, 200];

//do NOT edit pass this line

var preloadedimages=new Array()
for (i=0;i<photos.length;i++){
preloadedimages[i]=new Image()
preloadedimages[i].src=photos[i]
}

function applyeffect(){
if (document.all && photoslider.filters){
photoslider.filters[0].Stop()
photoslider.filters[0].Apply()
//alert(boxtext)
}
//if (document.all && document.getElementById('boxtext').filters) {
//document.getElementById('boxtext').filters[0].Stop()
//document.getElementById('boxtext').filters[0].Apply()
//}
}

function playeffect(){
if (document.all && photoslider.filters)
photoslider.filters[0].Play();
//if (document.all && document.getElementById('boxtext').filters)
//document.getElementById('boxtext').filters[0].Play();
}

function keeptrack(){
window.status="Image "+(which+1)+" of "+photos.length
}

function backward(){
clearTimeout(moving);
which=which>0? which-1 : photos.length-1
applyeffect()
document.images.photoslider.src=photos[which]
document.getElementById('boxtext').outerHTML = boxtext[which]
playeffect()
keeptrack()
moving=setTimeout("forward2()",9000)
}

function forward(){
clearTimeout(moving);
which=which<photos.length-1? which+1 : 0
applyeffect()
document.images.photoslider.src=photos[which]
document.getElementById('boxtext').outerHTML = boxtext[which]
playeffect()
keeptrack()
moving=setTimeout("forward2()",9000)
}

function forward2(){
clearTimeout(moving);
which=which<photos.length-1? which+1 : 0;
applyeffect();
document.images.photoslider.src=photos[which];
document.getElementById('boxtext').outerHTML = boxtext[which];
playeffect();
keeptrack();
moving=setTimeout("forward2()",9000);
}

function transport(){
window.open(photoslink[which][0],'','width='+photoslink[which][1]+', height='+photoslink[which][2])
}

function move(){
setTimeout("keeptrack()",20);
moving=setTimeout("forward2()",9000)
}

onload=move;

