function createTurnTool(width, height, file, color, transparent, install)
{
  var turntoolObject = ''
  if (install)
  {
    turntoolObject = '<center><input type="button" value="Install TurnTool 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.turntool.com/ViewerInstall.exe#version=2,12,0,8"><param name="transparent" value="'+transparent+'"><param name="script" value="ProgressBar.SetDownloadText(\'Dowloading T3D core data...\');ProgressBar.SetCoreDownloadText(\'Dowloading T3D Plugin...\');TNTCtrl.SetLogo(\'None\')"><param name="ctrl_color" value="'+color+'"><param name="tnt_back_color" value="'+color+'"><param name="src" value="'+file+'"></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="'+file+'" transparent="0" ctrl_color="'+color+'" tnt_back_color="'+color+'" pluginspage="http://www.turntool.com/download/" type="application/tntfile"></embed>';
	  }
  }
  element('TurnTool').innerHTML = turntoolObject;
}
