WonLoad.add("rotatingimageLoad();", "");
function rotatingimageLoad()
{
	var ajaxIndex = ajaxObjects.length;
	ajaxObjects[ajaxIndex] = new sack();
	ajaxObjects[ajaxIndex].requestFile = 'index.php?action=rotatingimage';
	ajaxObjects[ajaxIndex].onCompletion = function() 
	{
		try
		{
			if (document.getElementById)
			{
				var innerhtml = document.getElementById("content").innerHTML;
				innerhtml = innerhtml.replace(/<!-- ROTATINGIMAGE -->/g, unescape(ajaxObjects[ajaxIndex].response));
				document.getElementById("content").innerHTML = innerhtml;
			}			
		}
		catch (E)
		{
			var innerhtml = document.getElementById("content").innerHTML;
			innerhtml = innerhtml.replace(/<!-- ROTATINGIMAGE -->/g, "");
			document.getElementById("content").innerHTML = innerhtml;
		}
	};
	ajaxObjects[ajaxIndex].runAJAX();

	clearTimeout(rotatingimageID);
	rotatingimageID = null;

	rotatingimageGetJava();
}

var rotatingimageID = null;

function rotatingimageGetJava()
{
	var ajaxIndex = ajaxObjects.length;
	ajaxObjects[ajaxIndex] = new sack();
	ajaxObjects[ajaxIndex].requestFile = 'index.php?action=rotatingimage_java';
	ajaxObjects[ajaxIndex].onCompletion = function() 
	{
		eval(unescape(ajaxObjects[ajaxIndex].response));
	};
	ajaxObjects[ajaxIndex].runAJAX();

	rotatingimageID = window.setTimeout("rotatingimageSlideshow()", 3000);
}

var rotatingimage_Imgs = new Array();

var rotatingimage_Imgs_cimgs = 0;

function addToRotatingimages(_text)
{
	rotatingimage_Imgs[rotatingimage_Imgs.length] = _text;
}

function rotatingimageSlideshow()
{
	if (rotatingimage_Imgs_cimgs >= rotatingimage_Imgs.length)
	{
		rotatingimage_Imgs_cimgs = 0;
	}

	try
	{
		document.getElementById('rotatingimage').innerHTML = rotatingimage_Imgs[rotatingimage_Imgs_cimgs];
		rotatingimage_Imgs_cimgs += 1;
	}
	catch (E) { }

	rotatingimageID = window.setTimeout("rotatingimageSlideshow()", 9000);
}
