var ImageLoad = [['http://www.seashoredrugrehab.com','images/seashoretc_banner.jpg', 'Seashore Treatment Centers'			],		//  ['URL to linked page', 'URL to image', 'Caption under picture']	//
['http://pavischtreatmentcenter.com/', 	'images/PavischTreatmentCenter.jpg', 	'Pavisch Treatment Center'			],
['http://danapointsoberliving.com/', 	'images/DP_Beach_Cottage.jpg', 	'Dana Point Sober-Living Beach Cottage'			],
['http://www.promises.com/', 	'images/PromisesResTreat.jpg', 	'Promises Residential Treatment Centers'			],
['http://www.thewatershed.com/', 	'images/watershedTreat.jpg', 	'Watershed'],
['http://milestonesranchmalibu.com/', 	'images/MilestonesRanchMalibu.jpg', 	'Milestones Ranch Malibu'			],
['http://sobercompanionsorangecounty.com/', 	'images/soberCompanionsOC.gif', 'Sober Companions Orange County'			],
['http://forcedintorehab.com/', 	'images/PharmaceuticalsHealthAlcoholism.gif', 	'Pharmaceuticals, Health & Alcoholism'			],
['http://yellowstonerecovery.com/', 	'images/yellowstoneDrugAlcoholTreatment.gif', 	'Yellowstone Recovery'			],
['http://www.surfcitydrugrehab.com/', 	'images/sunsetbannerdrugrehab.jpg', 	'Surf City Drug Rehab'			],
['http://www.connorranch.org/', 	'images/beerChugDude.gif', 	'Connor Ranch'			],
['http://www.surfcitydrugrehab.com/', 	'images/Affordable_Drug_Detox.jpg', 	'SCDR'			],
['http://hbcottage.com/', 	'images/cottage.gif', 	'The Cottages'			],
['http://www.methmadness.com/', 	'images/methmadnesslink.JPG', 	'Meth Madness'			],
['http://www.turningpointtreatmentcenter.com/', 	'images/Turning_Point_Treatment_Center.jpg', 	'Turning Point Treatment Center'			],
['http://www.rightstep.com/', 	'images/logo_right_step_drug_rehab.gif', 	'Right Step'			],
['http://www.crchealth.com/', 	'images/crclogo.jpg', 	'CRC Health'	],
['http://thecolemaninstitute.com/', 	'images/ColemanInstitute.jpg', 	'The Coleman Institute'			],
['http://concentra.com/', 	'images/Concentra-Com_MC_422.gif', 	'Concentra Drug Testing'			],
['NewWayFound.asp', 	'images/newWayFound.gif', 	'New Way Foundation'			],
['http://www.triadtreatmentcenter.com/', 	'images/triad_detox_drug_rehab.gif', 	'Triad Treatment Center'			],
['http://www.sharonohara.com/', 	'images/SharonOhara.gif', 	'Sharon Ohara'			],
['http://www.theeffort.org/', 	'images/theeffort.GIF', 	'The Effort Treatment Works'			],
['http://www.sentencinginvestigations.com/', 'images/Sentencing_Investigations.jpg', 'Sentencing Investigations - Criminal Defense'			],
['http://www.recoveryfirst.org/', 'images/recoveryfirst.gif', 'Recovery First'			],
['http://www.letstalkrecovery.com/', 'images/Lets_Talk_Recovery.jpg', 'Lets Talk Recovery'			],
['http://www.carefrontations.com/', 'images/carefrontations_interventions.jpg', 'Carefrontations Interventions'			],
['http://alcoholism.about.com/About_Alcoholism_Substance_Abuse.htm', 'images/aboutAlcoholismNSubstanceAbuce.gif', 'About: Alcoholism & Substance Abuse'			],
['http://www.hythiam.com/protocols/aboutprometa.html', 'images/prometa.jpg', 'Prometa'			],
['http://www.visionofsobriety.com/', 'images/Vision_Of_Sobriety_Sober_Living.jpg', 'Vision of Sobriety'			],
['http://www.drugrehabwomenwithchildrenorangecounty.com/', 'images/Ettas_House_Sober_Living.jpg', 'Drug Rehab Women with Children Orange County'			],
['mailto:likestoshoot@yahoo.com', 'images/attorney.jpg', 'E-mail to get legal advice for addicts and alcoholics.'			],
['', 'images/Free_Drug_Rehab_Advice_Counseling.jpg', 'Free drug rehab advice and counseling'			],
['', 'images/Clay_House_Sober_Living.jpg', 'Huntington Beach Clay House, sober living for men and women. (714) 948-3863'			],
['http://www.bigbookcards.com/', 'images/bigbook1.gif', 'Bigbook Cards'			],
['http://www.dogbeach.org/', 'images/Dog_Huntington_Beach_Surf_City.jpg', 'Dog Beach'			],
['', 'images/Fresno_Sober_Living.jpg', 'City House in Fresno, sober living for men. (559) 803-8013'			],
['http://www.alcoholics-anonymous.org/?Media=PlayFlash', 'images/AA_Alcoholics_Anonymous.gif', 'Alcoholics Anonymous'			],
['http://www.na.org/', 'images/NarcoticsAnonymous.jpg', 'Narcotics Anonymous'			],
['http://www.sanctuaryhb.com/', 'images/theSanctuaryHB.jpg', 'The Sanctuary Huntington Beach'			],
['http://drugrehabaddictiontreatments.com/', 'images/Drug_Rehab_addiction_Treatments.jpg', 'Drug Rehab Addiction Treatments'			],
['http://www.drugabuseinterventions.com', 'images/DAI.jpg', 'Drug Abuse Interventions'			],
['http://www.capobythesea.com/', 'images/s4recovery.gif', 'CbtS'			],
['http://www.tptcenter.com', 'images/tptcenter.jpg', 'TPT Center'			],
['http://www.interventionorangecounty.com/', 'images/Intervention_Services.gif', 'Team Interventionist Orange County'			],
['http://www.teaminterventionists.com/', 'images/interventionistbanner2.gif', 'Team Interventionist'			],
['http://www.connorranch.org/', 'images/CRTC.jpg', 'CR Surf City'	],
['http://www.helpaddicts.com/', 'images/logo-home.gif', 'Holistic Drug and Alcohol Rehab Center'	],
['http://www.longislandcenterforrecovery.com/', 'images/longislandrecovery.jpg', 'Long Island Center for Recovery'	],
['http://www.tweekershotline.com/', 'images/TweekersHotline.jpg', 'Surf City Drug and Alcohol Detox Center'	],
['http://www.eatoncanyon.org/', 'images/eatonbanner83.gif', 'Eaton Canyon Treatment Centers'	],
['http://www.sunshinecoasthealthcentre.ca/', 'images/Sunshine_Coast_Health_Centre.jpg', 'Sunshine Coast Health Centre'	],
['http://www.orangecountydetox.com/', 'images/ocdetox422x83.jpg', 'Orange County Detox'	],
['http://kramercenter.com', 'images/newport422x83.jpg', 'Kramer Center'	],
['http://www.southcoastrecovery.com/', 'images/southCoastRec422x83Ban.jpg', 'SouthCoast Recovery'	],
['http://cliffsidemalibu.com/', 'images/cSM422x83-Ban.jpg', 'Cliffside Malibu'	],
['http://www.meditoxofpalmbeach.com/', 'images/meditox422x83_Ban.jpg', 'Meditox of Palm Beach'	],
['http://hopebythesea.com/', 'images/hope_Sea-422x83-ban.jpg', 'Hope by the Sea'	],
['http://chapmanhouseinc.com/', 'images/chapHouseInc422x83_Ban.jpg', 'Chapman House Inc'	],
['http://heritage-home.com/', 'images/heritageHome422x83-Ban.jpg', 'Heritage Home'	],
['http://floridadetox.com/', 'images/floridaDetox422x83_Ban.jpg', 'Florida Detox'	],
['http://www.tarzanatc.org/', 'images/tarzannalogo.jpg', 'Tarzana Treatment Center'	],
['http://www.steps4recovery.org/', 'images/SFRbanner.gif', 'Steps 4 Recovery'	],
['http://www.capobythesea.com/', 'images/capobanner.gif', 'Capo by the Sea'	],
['http://www.connorranch.org/', 'images/beerChugDude.gif', 'Connor Ranch'	],
//last of array; DO NOT USE OUT OF ORDER TO PREVENT COMMA OUT OF ORDER TROUBLE!!!
['', 	'images/PamTreat.gif', 	'Need Help? Call Pam @ 714.519.8343'			]		//  The LAST image declaration does NOT have a comma after it			//
];

var ImageCount	= 66;			//  *****  Change this to the total number of images loaded above  ***** 		//	
var ImageDelay		= 5000;			//  *****  Set this to the delay interval desired.  5000 = 5 seconds.			// 
var LinkTarget		= "_self"		//  *****  Defines where you want linked page to open. _self, _blank, _top, etc	//
var ImageIndex		= 0;			//  DO NOT ALTER	//
var FirstLoad 		= 0;			//  DO NOT ALTER	//
var QuickStartID 	= 0;  			//  DO NOT ALTER	//
var htmlString 		= ""			//  DO NOT ALTER 	//

//  This function rotates the banner  //
function ImageChange()

{		

htmlString = '<center>';
htmlString = htmlString + '<font size="2">';		//  Font and Font Size for caption may be changed here	//
htmlString = htmlString +'<a target="';
htmlString = htmlString + LinkTarget;
htmlString = htmlString + '" href="';
htmlString = htmlString + ImageLoad[ImageIndex][0];
htmlString = htmlString + '"><img height="82" width="422" border="0" src="';				//  Image border size may be changed here				//	
htmlString = htmlString + ImageLoad[ImageIndex][1];
htmlString = htmlString + '"><br>&nbsp;';
htmlString = htmlString + ImageLoad[ImageIndex][2];
htmlString = htmlString + '</a></font>';
htmlString = htmlString + '</center>';		

document.getElementById('MagicImage').innerHTML = htmlString; 				

if(ImageIndex == ImageCount - 1)		//  This statement increments image displayed and resets if displaying last image  //
{										
ImageIndex= 0;																				
}																								
else																							
{																								
ImageIndex++;																					
}																										

if(FirstLoad == 0)						//  Determins if this is the first time function has run.   // 
{
SlowFinish();
}

}
//  End Funtion  //

//  This function ensures first banner is displayted without a delay  //
function  QuickStart()
{
QuickStartID=setInterval("ImageChange()", 1000);
}
//  End Funtion  //																		

//  This function sets display rate to user defined speed  //
function SlowFinish()
{
clearInterval(QuickStartID);
FirstLoad = 1;
setInterval("ImageChange()", ImageDelay);	 
}
//  End Funtion  //

QuickStart()