///////////////////////////////////////////////////////////
/// Magic Image Rotation								///
///	v 1.0.1												///
/// Copyright 2007, Loyce Bradley Petrey				///
///	All Rights Reserved.								///
/// http://www.EchoChrist.com/MagicImage				///
/// webmaster@EchoChrist.com							///
///														///
///	This script is free to use as long as this notice 	///
/// remains unchanged and intact.					 	///
///														///
/// This program is free software: you can redistribute ///
///	it and/or modify it under the terms of the GNU 		///
///	General Public License as published by the Free 	///
///	Software Foundation. 								///
///														///
/// This program is distributed in the hope that it 	///
/// will be useful, but WITHOUT ANY WARRANTY; without 	///
///	even the implied warranty of MERCHANTABILITY or 	///
///	FITNESS FOR A PARTICULAR PURPOSE.  					///
/// 													///
/// Be Imitators of God as dear children and walk		///
/// in love as Christ also loved us.					///
///	Ephesians 5:1-2										///
///////////////////////////////////////////////////////////

var ImageLoad = 
[
['http://www.pixel-workx.de', 			'images/logo_pixel-workx.jpg', 	'pixel-workx.de | Media Design'			],
['http://www.aluwint.de', 			'images/logo_aluwint.jpg', 	'Aluwint Zevenbergen'				],
['http://www.wigbels-versicherungsbuero.de', 	'images/logo_wigbels.jpg', 	'Versicherungsbuero Wigbels'			],
['http://www.verwohlt-ahaus.de', 		'images/logo_verwohlt.jpg', 	'Heinrich Verwohlt GmbH & Co.KG'		],
['http://www.lacasita-ahaus.de/kino/events/city67', 		'images/logo_lacasita.jpg', 	'La Casita | Tapas und mehr!'				],
['http://www.skindreams.de', 			'images/logo_skindreams.jpg', 	'Skindreams :: Fotostudio'			],
['http://www.mayoto.de', 			'images/logo_mayoto.jpg', 	'MAYOTO International GmbH'				],
['http://www.elpers.de', 			'images/logo_elpers.jpg', 	'Elpers Renovierungssysteme'		],
['#', 						'images/logo_schuessler.jpg', 	'Schuessler Obst & Gemuese'				],
['http://www.cinetech.de/kino/events/city19', 		'images/logo_cinetech.jpg', 	'cinetech | das erlebniskino!'				],
['http://www.logo-ahaus.de', 			'images/logo_logo.jpg', 	'Jugend- & Kulturcafe LOGO'			],
['#', 						'images/logo_miedecke.jpg', 	'Wein Miedecke | Tel. 02561-971710'			],
['http://www.hrw-steuerberater.de', 		'images/logo_hrw.jpg', 		'HRW Steuerberater Ahaus&Vreden'		],
['#', 						'images/logo_W&S.jpg', 		'W & S GmbH | Reinhold Woltering'			],
['http://www.enning-barriere.de', 		'images/logo_enning.jpg', 	'Restaurant Enning - Zur Barriere'			],
['http://www.ms-eventhouse.de.de', 		'images/logo_MSeventhouse.jpg', 'ms eventhouse Firmengruppe'				],
['http://www.pomberg.de', 			'images/logo_pomberg.jpg', 	'Einrichtungshaus Pomberg'			],
['#', 						'images/logo_RAmensing.jpg', 	'RA Peter Mensing | 02561-3077'		],
['http://www.welacom.de', 			'images/logo_welacom.jpg', 	'Welacom Telekommunikation'			],
['#', 						'images/logo_rolfes.jpg', 	'Marktschaenke Rolfes'			],
['http://www.ms-eventhouse.de.de', 		'images/logo_MSeventhouse.jpg', 'ms eventhouse Firmengruppe'				],
['http://www.auto-schwieters.de', 		'images/logo_schwieters.jpg', 	'AUTO CHECK Schwieters'				],
['http://www.getraenke-gruenewald.de', 		'images/logo_gruenewald.jpg', 	'Getraenke Gruenewald'			],
['http://www.schlosscafe-sanremo.de', 	'images/logo_sanremo.jpg', 	'Schlosscafe San Remo'		],
['http://www.drebbers.de', 	'images/logo_drebbers.jpg', 	'Drebbers | Hotel & Restaurant'		],
['#', 	'images/logo_helling.jpg', 	'Blumen Helling | Ahaus-Wuellen'		],
['http://www.metzgerei-beckers.de', 	'images/logo_beckers.jpg', 	'Metzgerei Beckers'		],
['http://www.reifen-wrede.de/index.php?site=filiale_vreden_1', 	'images/logo_wrede.jpg', 	'Reifen Wrede: Filiale Vreden'		]
];


var ImageCount		= 28;			//  *****  Change this to the total number of images loaded above  ***** 		//	
var ImageDelay		= 3000;			//  *****  Set this to the delay interval desired.  5000 = 5 seconds.			// 
var LinkTarget		= "_blank"		//  *****  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 	//
var randomnumber	= 0;			//  DO NOT ALTER	//

//  This function rotates the banner  //
function ImageChange()

{		
htmlString = '<left>';
htmlString = htmlString + '<font face = "Arial" size="2" color="#8A9842">';		//  Font and Font Size for caption may be changed here	//
htmlString = htmlString +'<br><a target="';
htmlString = htmlString + LinkTarget;
htmlString = htmlString + '" href="';
htmlString = htmlString + ImageLoad[ImageIndex][0];
htmlString = htmlString + '"><img border="0" src="';				//  Image border size may be changed here				//	
htmlString = htmlString + ImageLoad[ImageIndex][1];
htmlString = htmlString + '"></a><br>';
htmlString = htmlString + ImageLoad[ImageIndex][2];
htmlString = htmlString + '</font>';
htmlString = htmlString + '</left>';		

document.getElementById('MagicImage').innerHTML = htmlString; 				

ImageIndex = Math.floor(Math.random()*ImageCount);																				

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()
