
var numImageSets = 9;
var cardImageNum = 0;

function randomDelay(){
	var minTime = 4;
	var maxTime = 6;
	var timeChoices = 2*(maxTime-minTime)+1;
	//return( (minTime+Math.floor((Math.random()*timeChoices))/2)*1000 );
	return( 9 * 1000 );
}


function randomCards(){
/*	cardImageNum = (cardImageNum==3) ? 1 : cardImageNum+1;
	imageName = (cardImageNum==1) ? "Cards-Nestler" : (cardImageNum==2) ? "Cards-Nestler-Promos" : "Cards-Nestler-SS";
	caption = (cardImageNum==1) ? "Nestler Card Set" : (cardImageNum==2) ? "Nestler Promo Set" : "Nestler Sell Sheet";
*/
	imageName = "Cards-Nestler";
	caption = "Nestler Card Set<br>(warning: Rated R)";
	var w=0;
//		eval("document.CardsA.src = '/Images-Reaper-Miniatures/" + imageName + "_thumb.jpg';");
//		eval("document.CardsA.alt = 'Exotic Trading Cards';");
//		eval("w=document.CardsA.width;");
		eval("document.CardsA.width = 90;");
		eval("document.getElementById('Cards_CaptionA').innerHTML = '"+caption+"';");
		eval("document.getElementById('Cards_AnchorA').href = 'cards-Reaper-c-936.html';");
//	setTimeout("randomCards()", 5000);
}
setTimeout('randomCards()', 1);





function randomDHL(){
	var imageNum = (2001+Math.floor(Math.random() * 1211));
	imageNum = (imageNum>3211) ? 3211 : imageNum;
	var w=0;
	for(var i=0; i<numImageSets; i++){
		eval("document.DHL"+i+".src = '/Images-Reaper-Miniatures/" + imageNum + "_thumb.jpg';");
		eval("document.DHL"+i+".alt = 'Dark Heaven Legends #"+imageNum+"';");
		eval("w=document.DHL"+i+".width;");
		eval("document.DHL"+i+".width = "+Math.min(110, w)+";");
		eval("document.getElementById('DHL_Caption"+i+"').innerHTML = '#"+imageNum+"';");
		eval("document.getElementById('DHL_Anchor"+i+"').href = 'product.php?productid=1&amp;sku="+imageNum+"';");
	}		
	setTimeout("randomDHL()", randomDelay());
}
setTimeout('randomDHL()', 6000);

function randomWL(){
	var imageNum = (14001+Math.floor(Math.random() * 384));
	imageNum = (imageNum>14384) ? 14384 : imageNum;
	var w=0;
	for(var i=0; i<numImageSets; i++){
		eval("document.WL"+i+".src = '/Images-Reaper-Miniatures/" + imageNum + "_thumb.jpg';");
		eval("document.WL"+i+".alt = 'WarLord #"+imageNum+"';");
		eval("w=document.WL"+i+".width;");
		eval("document.WL"+i+".width = "+Math.min(110, w)+";");
		eval("document.getElementById('WL_Caption"+i+"').innerHTML = '#"+imageNum+"';");
		eval("document.getElementById('WL_Anchor"+i+"').href = 'product.php?productid=1&amp;sku="+imageNum+"';");
	}
	setTimeout("randomWL()", randomDelay());
}
setTimeout('randomWL()', 9000);

function randomSE(){
	var imageNum = (1401+Math.floor(Math.random() * 18));
	imageNum = (imageNum>1418) ? 1418 : imageNum;
	for(var i=0; i<numImageSets; i++){
		eval("document.SE"+i+".src = 'Images-Reaper-Miniatures/SE/" + imageNum + "_110.jpg';");
		eval("document.SE"+i+".alt = 'Special Edition #"+imageNum+"';");
		eval("document.getElementById('SE_Caption"+i+"').innerHTML = '#"+imageNum+"';");
		eval("document.getElementById('SE_Anchor"+i+"').href = 'product.php?productid=1&amp;sku="+imageNum+"';");
	}
	setTimeout("randomSE()", randomDelay());
}
setTimeout('randomSE()', 12000);

function displayImages(type, num, text, start){
var result = "";
	result  = '<table width="100%" border=1><tr><td valign="middle">'
			+ '<table width="100%" height="160px">'
			+ '<tr><td align="center"><p>&nbsp;<img src="/myImages/'+type+'_logo.gif"'
			+ 'alt="'+text+' Logo" border="0"></td></tr>'
			+ '<tr><td align="center"><a href="product.php?productid=1&amp;sku='+start+'" Id="'+type+'_Anchor'+num+'"><img src="/Images-Reaper-Miniatures/'
			+ ((type=='SE') ? 'SE/'+start+'_110' : start+'_thumb')
			+ '.jpg" name="'+type+num+'"'
			+ 'alt="'+text+' #'+start+'" border="0"></a></td></tr>'
			+ '<tr><td align="center"><span Id="'+type+'_Caption'+num+'">#'+start+'</span></td></tr></table><p></td></tr></table>';
	document.write(result);
}

var currentItem = 12;

function emboldenItems(){
	eval("document.getElementById('sword"+currentItem+"').align = 'left';");
	eval("document.getElementById('item"+currentItem+"').style.fontWeight = '';");
	currentItem++;
	if (currentItem==13) currentItem = 0;
	eval("document.getElementById('sword"+currentItem+"').align = 'right';");
	eval("document.getElementById('item"+currentItem+"').style.fontWeight = 'bold';");
	setTimeout("emboldenItems()", 2000);
}