var MM_contentVersion = 6;
var flash=new Array(2);
flash=hasFlashPlugin();
var MM_FlashCanPlay = flash[1] >= MM_contentVersion;

var 	wWidth, width, height;
function howWide() {

	if (self.innerHeight) // all except Explorer
	{
		wWidth = self.innerWidth;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
		// Explorer 6 Strict Mode
	{
		wWidth = document.documentElement.clientWidth;
	}
	else if (document.body) // other Explorers
	{
		wWidth = document.body.clientWidth;
	}

	if( wWidth < 1000) { 
		width = 105; 
		height = 150;
	} else { 
		width = 175; 
		height = 250;
	} 
}

function imagine(flash,how_many,image,alt) {
	if (typeof(width) == "undefined") { howWide(); }
	
	var suffix = Math.floor(Math.random()*how_many) + 1;
	var flash_name = flash + suffix + ".swf" ;
	
	if ( MM_FlashCanPlay ) {
		document.write('<OBJECT ID="adult" CLASSID="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
		document.write('  CODEBASE="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,42,0" ');
		document.write(' ID="script" WIDTH="'+ width + '" HEIGHT="' + height + '" ALIGN="">');
		document.write(' <PARAM NAME=movie VALUE="images/' + height + '/' + flash_name + '"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF>  '); 
		document.write(' <EMBED src="images/' + height + '/' + flash_name + '" quality=high bgcolor=#FFFFFF  ');
		document.write(' swLiveConnect=FALSE WIDTH="'+ width + '" HEIGHT="' + height + '" NAME="script" ALIGN=""');
		document.write(' TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer">');
		document.write(' </EMBED>');
		document.write(' </OBJECT>');
	} else {
		var img = '<img src="images/' + height + '/' + image + '" "';
		img += 'alt="' + alt + '" width="'+ width + '" height="' + height + '" border="0" vspace="10">';
		document.write(img);
	}
}