var turntool, turntool2, turntool3;

function createTurnTool(width, height, file, color, transparent)
{
	var DownloadText = "True2Life Interactive Scene is Loading, please wait";
	var CoreDownloadText = "True2Life Viewer Update Downloading";
	var SetLogo = "None";
	
  if (ie4||ie5)
  {
  	turntoolObject = '<object id="TNTCtrl" width="'+width+'" height="'+height+'" classid="CLSID:402ee96e-2ce8-482d-ada5-ceceea07e16d" codebase="http://www.true2life.co.uk/files/ViewerInstall.exe#/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="'+file+'"> <param name="script" value="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')"></OBJECT>';
  }
  else
  {
	turntoolObject = '<embed id="TNTCtrl" script="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')" width="'+width+'" height="'+height+'" src="'+file+'" transparent="'+transparent+'" tnt_back_color="'+color+'" pluginspage="http://www.true2life.co.uk/files/ViewerInstall.xpi" type="application/tntfile"></embed>';
  }
  element('turntool').innerHTML = turntoolObject;
  turntool = file;
}


//121*268   181 *401   195*430  226*501
function createFlash()
{
	var FlashObject;
  if (ie4||ie5)
  {
	FlashObject = '<OBJECT	codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="226" height="501"  hspace="0" vspace="0" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="myFlashmap"><PARAM NAME="AllowScriptAccess" VALUE="always"><param name="wmode" value="transparent" ><PARAM NAME="movie" VALUE="map.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="swliveconnect" VALUE="true"><param name="PLAY" value="false"><param name="LOOP" value="false"><embed src="map.swf" AllowScriptAccess="always"  wmode="transparent" width="195" height="430" hspace="0" vspace="0" loop="false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" swliveconnect="true" id="myFlashmap" play="false"></embed></OBJECT>';
	element('map').innerHTML = FlashObject;
  }
}



function createTurnTool2(width, height, file, color, transparent)
{
	var DownloadText = "True2Life Interactive Scene is Loading, please wait";
	var CoreDownloadText = "True2Life Viewer Update Downloading";
	var SetLogo = "None";

  if (ie4||ie5)
  {
  	turntoolObject = '<object id="TNTCtrlII" width="'+width+'" height="'+height+'" classid="CLSID:402ee96e-2ce8-482d-ada5-ceceea07e16d" codebase="http://www.true2life.co.uk/files/ViewerInstall.exe#/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="'+file+'"> <param name="script" value="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')"></OBJECT>';
  }
  else
  {
	turntoolObject = '<embed id="TNTCtrlII" script="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')" width="'+width+'" height="'+height+'" src="'+file+'" transparent="'+transparent+'" tnt_back_color="'+color+'" pluginspage="http://www.true2life.co.uk/files/ViewerInstall.xpi" type="application/tntfile"></embed>';
  }
  
  element('TNT2').innerHTML = turntoolObject;
}

function createTurnTool3(width, height, file, color, transparent)
{
	var DownloadText = "True2Life Interactive Scene is Loading, please wait";
	var CoreDownloadText = "True2Life Viewer Update Downloading";
	var SetLogo = "None";

  if (ie4||ie5)
  {
  	turntoolObject = '<object id="TNTCtrlIII" width="'+width+'" height="'+height+'" classid="CLSID:402ee96e-2ce8-482d-ada5-ceceea07e16d" codebase="http://www.true2life.co.uk/files/ViewerInstall.exe#/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="'+file+'"> <param name="script" value="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')"></OBJECT>';
  }
  else
  {
	turntoolObject = '<embed id="TNTCtrlIII" script="ProgressBar.SetDownloadText(\''+DownloadText+'\');ProgressBar.SetCoreDownloadText(\''+CoreDownloadText+'\');TNTCtrl.SetLogo(\''+SetLogo+'\')" width="'+width+'" height="'+height+'" src="'+file+'" transparent="'+transparent+'" tnt_back_color="'+color+'" pluginspage="http://www.true2life.co.uk/files/ViewerInstall.xpi" type="application/tntfile"></embed>';
  }
  
  element('turntool2').innerHTML = turntoolObject;
  turntool3 = file;


}