var strCssFile = (isIE) ? 'IE' : 'Mozilla';
document.write("<link rel='stylesheet' href='CSS/" + strCssFile + ".css' type='text/css' />");

var diamondArray = new Array();
diamondArray[0] = '';
var wW = 0;
var xPos = 0;
var yPos = 0;
var intervalStep = 80;

function addListeners() {
	if (!document.getElementsByTagName) return;

	var body = document.getElementsByTagName('body')[0];

	wW = winWidth()/2;

	for (i = 1; i < 7; i++) {
		var theDiv = document.createElement('div');
		theDiv.id = 'fadeDiamond' + i;
		theDiv.className = 'fadeDiamond';
		var theImage = document.createElement('img');
		theImage.id = 'fadeImg' + i;
		theImage.className = 'fadeImage';
		theImage.src = 'Images/Diamond' + i + '.jpg';
		theImage.alt = 'Click to stop';
		theImage.title = 'Click to stop';
		theDiv.appendChild(theImage);
		body.appendChild(theDiv);
		if (i == 1) {xPos = (wW - 324); yPos = 100;}
		else if (i == 2) {xPos = (wW - 64); yPos = 100;}
		else if (i == 3) {xPos = wW + 196; yPos = 100;}
		else if (i == 4) {xPos = (wW - 194); yPos = 230;}
		else if (i == 5) {xPos = (wW + 66); yPos = 230;}
		else if (i == 6) {xPos = (wW - 64); yPos = 360;}
		diamondArray[i] = new diamond('fadeImg' + i, xPos, yPos, intervalStep, i);
		window.setTimeout('startDiamond(' + i + ')', (i * 400));
		intervalStep = (intervalStep * 0.9);
	}
}

function startDiamond(i) {
	diamondArray[i].start();
}

addEvent(window, 'load', addListeners, false);

