function createFlash(width, height, file, id)
{
	var FlashObject;
  	FlashObject = '<object id="'+id+'" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="'+width+'" height="'+height+'"><param name="movie" value="../../../steelworks_v5/'+file+'" /><param name="quality" value="high" /><param name="PLAY" value="false" /><param name="swliveconnect" value="true" /><embed id="'+id+'" src="'+file+'" width="'+width+'" height="'+height+'" quality="high" play="false" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true"></embed></object>';
	//element('map').innerHTML = FlashObject;
	hide('map_ext');
	hide('map_int');
	hide('map_hot');
	//alert('a')
	switch (file) {
		case 'flash_1.swf':
		mapname= 'map_ext';
		show(mapname);
		flashname = "myFlashmap_ext"
		break;
		case 'flash_int_1.swf':
		mapname= 'map_int';
		show(mapname);
		flashname = "myFlashmap_int"
		break;
		case 'flash_hotmill.swf':
		mapname= 'map_hot';
		show(mapname);
		flashname = "myFlashmap_hot"
		break;
		default:
		break;
		
	}
	
	
}

function createTurnTool(width, height, file, color, transparent, install)
{
  
  var DownloadText = "Downloading True2Life Resource";
  var CoreDownloadText = "True2Life Viewer Update Downloading";
  var SetLogo = "None";
  
  var turntoolObject = ''
  if (install)
  {
    turntoolObject = '<center><input type="button" value="Install True2Life Viewer" onclick="installTurnTool();" /></center>';
  }
  if (ie4||ie5)
  {
  	turntoolObject += '<object id="TNTCtrl" width="'+width+'" height="'+height+'" classid="CLSID:402ee96e-2ce8-482d-ada5-ceceea07e16d" codebase="http://www.true2life.co.uk/ViewerInstall.exe#version=2,12,0,8"><param name="transparent" value="'+transparent+'"><param name="ctrl_color" value="'+color+'"><param name="tnt_back_color" value="'+color+'"><param name="src" value="http://www.steeluniversity.org/steelworks_v5/'+file+'"><param name="script" value="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')"></OBJECT>';
  	turntoolObject += '<scr'+'ipt type="text/javascript" for="TNTCtrl" event="TNTEvent(string);">execScript(string);</scr'+'ipt>';
  }
  else
  {
      if (install==false)
      {
	  	turntoolObject += '<embed id="TNTCtrl" width="'+width+'" height="'+height+'" src="http://www.steeluniversity.org/steelworks_v5/'+file+'" transparent="0" ctrl_color="'+color+'" tnt_back_color="'+color+'" pluginspage="http://www.true2life.co.uk/download/" type="application/tntfile" script="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')"></embed>';
	  }
  }
  CurrentT2L = file;
  element('TurnTool').innerHTML = turntoolObject;
}