Initalization

The initalization procces of the plugin is made of by two step.
The first step is to declare the functions which are definied in the "jsfunctions.idl".
You should make this when the page is loading, so you should start that initalization whith the onload event.
So lets see an example for the solution:

function SetFunctions()
{
	var embed = document.embeds[0];
	var script_function= 
	{
		doc:document,
		OnLoad : function() {
			var embed = document.embeds[0];
			//Here should come the function to embed
			
		},
		Event : function(cmd){
		  alert(cmd);
		  var embed = document.embeds[0];
		  if (cmd=="be_ajto"){   			
		    } else{		
   			
		    }
		  }
		}	
		
	};
	embed.script_functions=script_function; //here you declare the functions for the plugin
}
				

The next step of the initalization is the insertion of the embed tag.
To use the embed tag is pretty simple, the only exercise with the tag is to set its parameters.
There are ten paramter, these are:

name:		The name of the object
type:		The mime type of the plugin. This should be the application/scriptable-plugin or 
			application/scriptable-plugin,version=versionnumber
			(This mime types are should be defined before the plugin had compiled.)
width,
heigth:	You can set the size of the plugin in pixel or in percent of the space.
location:	This will set the directory  where the files will be saved. This can be set by you, or
		you can set this paramter by javascript, so it could be the domain of the server.(location.host)
URL:		The urls of the files (textures,models), it should be separated by "|".
DATES:		The dates of the files, it should be separated by "|".
SIZES:		Sizes of the files, it should be separated by "|".
pluginspage:	The Page of the plugin where will the firefox redirect the browser when you try to install it.


An example for the embed tag:
embed name="DDDPlugin" type="application/scriptable-plugin,version=1.0.0.0" width="100%" height="100%" pluginspage="pluginpage.html" PATH="examplepath" URL="texture1.jpg|texture2.jpg" DATES="2005.06.24|2005.06.24" SIZES="2596|2831724
"