/**************************************************************************************************
	* Zamantou Javascript Communication Interface Class - JSI 1.0 BETA 
	* Releases <http://zanmantou.voodoon.com>
	* Copyright 2007 by Andi Dittrich <andi.dittrich@voodoon.com>
	* Terms of Use avaible under : "http://zanmantou.voodoon.com"
	* ALL RIGHTS RESERVED
	
	* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; 
	* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
**************************************************************************************************/


/* konstruktor */
function Zanmantou(id){
	this.zanmantou = document.getElementById(id);
}

/* command exec */
Zanmantou.prototype.exec = function(){
	var cmd = Zanmantou.prototype.exec.arguments[0];
	for (i=1;i<Zanmantou.prototype.exec.arguments.length;i++){
		cmd += "~" + Zanmantou.prototype.exec.arguments[i];
	}
	this.zanmantou.SetVariable("js_communication_var", cmd);
}

/* start */
Zanmantou.prototype.start = function(position){
	this.exec('start', position);
}

/* stop */
Zanmantou.prototype.stop = function(){
	this.exec('stop');
}

/* halt */
Zanmantou.prototype.halt = function(){
		this.exec('halt');
}

/* next */
Zanmantou.prototype.next = function(){
		this.exec('next');
}

/* last */
Zanmantou.prototype.last = function(){
		this.exec('last');
}

/* jumpAndPlay */
Zanmantou.prototype.jumpAndPlay = function(index){
		this.exec('jumpAndPlay', index);
}

/* setTransform */
Zanmantou.prototype.setTransform = function(ll, lr, rr, rl){
		this.exec('setTransform', ll, lr, rr, rl);
}

/* addTrack */
Zanmantou.prototype.addTrack = function(name, url, index){
		this.exec('addTrack', name, url, index);
}

/* removeTrack */
Zanmantou.prototype.removeTrack = function(index){
		this.exec('removeTrack', index);
}
/**************************************************************************************************/

