//
//
// Copyright 2000-2001 SolidWorks Corporation.  All rights reserved.
//
// No part of these files may be reproduced or used outside of the 3D Instant Website product
// for any purpose, without the express written permission of SolidWorks Corporation.
//
//
//
var node;		// detect which node has been clicked

var isIE4 = navigator.appName == "Microsoft Internet Explorer" && parseInt(navigator.appVersion.substring(0,1)) >= 4;
function mtspluginfunction() 
{
	var count = mtspluginfunction.arguments.length;

	if(count == 0)			return false;
	var argstr = mtspluginfunction.arguments[0] + '(';
	var last = count-1;
	
	for(i = 1; i < count; i++)
	{
		argstr+= mtspluginfunction.arguments[i];
		if(i < last)	argstr+= ',';
	}
	argstr+= ')';
	
	if (isIE4)	return document.all.MetaStreamCtl.PluginCommand(argstr, 0, 0);
	else		return document.MetaStreamCtl.DoCommand(argstr);
}
function triggeranimation()	{if(arguments[0]!="undefined") mtspluginfunction ("TriggerAnimation", arguments[0]);}
function reverseanimation ()	{mtspluginfunction ("ReverseAnimation ", arguments[0]);}
function stopanimation ()	{mtspluginfunction ("StopAnimation ", arguments[0]);}
function startanimation ()	{mtspluginfunction ("StartAnimation ", arguments[0]);}
function resetanimation ()	{mtspluginfunction ("ResetAnimation ", arguments[0]);}
function togglecollapsed()	{mtspluginfunction ("ToggleCollapsed", arguments[0]);}
function togglevisible()	{mtspluginfunction ("ToggleVisible", arguments[0]);}
function togglepano()		{mtspluginfunction ("TogglePano", arguments[0]);}
function resetcamera()		{mtspluginfunction ("ResetCamera", arguments[0]);}
function removeobject()		{mtspluginfunction ("RemoveObject", arguments[0]);}
function clearscene()		{mtspluginfunction ("ClearScene", arguments[0]);}
function loadmtx()		{mtspluginfunction ("LoadMTX", arguments[0]);}
function setproperty(object, prop, value, type)			{mtspluginfunction ("SetProperty ", object, prop, value, type); 	}
function getproperty(object, prop, type) 			{ return mtspluginfunction ("GetProperty ", object, prop, type);			}
function render()						{mtspluginfunction ("Render");			}

