var sourceFile = "Factory.unity3d";
var disableContextMenu = "true";
var disableFullscreen = "true";

document.writeln('<div id="UnityContent">');
document.writeln('<object id="UnityObject" classid="clsid:444785F1-DE89-4295-863A-D46C3A781394" width="100%" height="100%" codebase="http://webplayer.unity3d.com/download_webplayer-2.x/UnityWebPlayer.cab#version=2,0,0,0" onMouseOver=this.focus()>');
document.writeln('<param name="src" value='+sourceFile+' />');
document.writeln('<param name="disableContextMenu" value='+disableContextMenu+' />');
document.writeln('<param name="disableFullscreen" value='+disableFullscreen+' />');
document.writeln('<embed id="UnityEmbed" src='+sourceFile+' width="100%" height="100%" disableContextMenu='+disableContextMenu+' type="application/vnd.unity" pluginspage="http://www.unity3d.com/unity-web-player-2.x" onMouseOver=this.focus() />');
document.writeln('<noembed>');
document.writeln('<div align="center">');
document.writeln('This content requires the Unity Web Player<br /><br />');
document.writeln('<a href="http://www.unity3d.com/unity-web-player-2.x">Install the Unity Web Player today!</a>');
document.writeln('</div>');
document.writeln('</noembed>');
document.writeln('</object>');
document.writeln('<div>');


/////////////////////////
////following code is community with unity3d
//function UnitySelect(id,name){
//	var basicInfoTab = Ext.getCmp('tab-panel').getItem(0);
//	Ext.getCmp('tab-panel').setActiveTab(basicInfoTab);
//	if( basicInfoTab )
//	{
//		basicInfoTab.getUpdater().update("./ServerPage/ShowBasicInfo.php?id="+id+"&name="+name);
//	}
//}
//
//function UnityNoSelect(){
//	var basicInfoTab = Ext.getCmp('tab-panel').getItem(0);
//	Ext.getCmp('tab-panel').setActiveTab(basicInfoTab);
//	if(basicInfoTab)
//	{
//		basicInfoTab.getUpdater().update("./ServerPage/NoInfo.html");
//	}
//}
//
//function AddTreeItem(id, name) {
//	var tree = Ext.getCmp('tree-panel');
//	tree.root.appendChild(new Ext.tree.TreeNode( {
//		id :id,
//		text :id+name,
//		leaf :true,
//		checked :true,
//		listeners : {
//			"checkchange" : function(node) {
//				if (node.attributes.checked)
//				{
//					//document.getElementById("UnityObject").SendMessage("ListedObjectsController","ShowObject",""+node.attributes.id);
//					document.getElementById("UnityEmbed").SendMessage("ListedObjectsController","ShowObject",""+node.id);
//				}
//				else
//				{
//					//document.getElementById("UnityObject").SendMessage("ListedObjectsController","HideObject",""+node.attributes.id);
//					document.getElementById("UnityEmbed").SendMessage("ListedObjectsController","HideObject",""+node.id);
//				}
//			}
//		}
//	}));
//}
//
///////////////////////////////////////
