/// Magic Image Rotation								///
///	v 1.0.1												///
/// Copyright 2007, Loyce Bradley Petrey				///
///	All Rights Reserved.								///
/// http://www.EchoChrist.com/MagicImage				///
/// webmaster@EchoChrist.com							///


var ImageLoad = 
[
 //  ['URL to linked page', 'URL to image', 'Caption under picture'] //
['http://www.pantiesparadise.de/feuchteschnecke87-m-4419.html', 'images/imagecache/image269485.jpg', 'FeuchteSchnecke87'],
['http://www.pantiesparadise.de/fantasia-m-3601.html', 'images/imagecache/image264409.jpg', 'Fantasia'],
['http://www.pantiesparadise.de/dannymaus-m-4285.html', 'images/imagecache/image258207.jpg', 'Dannymaus'],
['http://www.pantiesparadise.de/feenmuschi-m-3977.html', 'images/imagecache/image260046.jpg', 'FeenMuschi'],
['http://www.pantiesparadise.de/renee-m-2922.html', 'images/imagecache/image270314.jpg', 'Renee'],
['http://www.pantiesparadise.de/blackdalhia-m-4312.html', 'images/imagecache/image267459.jpg','BlackDahlia'],
['http://www.pantiesparadise.de/cinderella850-m-2458.html', 'images/imagecache/image218429.jpg', 'Cinderella850'],		
['http://www.pantiesparadise.de/blondesonfire-m-1634.html', 'images/imagecache/image271212.jpg', 'blondesonfire'],
['http://www.pantiesparadise.de/duftmaus01-m-2729.html', 'images/imagecache/image184259.jpg', 'Duftmaus01'],
['http://www.pantiesparadise.de/carmisa-m-3418.html', 'images/imagecache/image269364.jpg', 'Carmisa'],		
['http://www.pantiesparadise.de/heisseprinzessin-m-372.html', 'images/imagecache/image199292.jpg', 'heisse.prinzessin'],
['http://www.pantiesparadise.de/hotnicole-m-3474.html', 'images/imagecache/image262714.jpg', 'hotnicole']
//  The LAST image declaration does NOT have a comma after it //
];
var ImageCount		= 12;			//  *****  Change this to the total number of images loaded above  ***** 		//	
var ImageDelay		= 5200;			//  *****  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		= Math.floor(Math.random()*ImageCount);			//  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(pi)

{		

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

if(pi == 'true') {
 $('#MagicImage2').html(htmlString);
}
else
 $('MagicImage2').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.   // 
{
 if(pi == 'true')
  SlowFinish('true');
 else
  SlowFinish('false');
}

}
//  End Funtion  //

//  This function ensures first banner is displayted without a delay  //
function  QuickStart()
{
QuickStartID=setInterval("ImageChange('false')", 1000);
}
function  QuickStart_pi()
{
QuickStartID=setInterval("ImageChange('true')", 1000);
}
//  End Funtion  //																		

//  This function sets display rate to user defined speed  //
function SlowFinish(pi)
{
 clearInterval(QuickStartID);
 FirstLoad = 1;
 if(pi == 'true')
  setInterval("ImageChange('true')", ImageDelay);
 else
  setInterval("ImageChange('false')", ImageDelay);	 
}
//  End Funtion  //

//QuickStart();
