function Vibrate()
{
}

Vibrate.prototype.setup = function()
{
}

// length in ms
Vibrate.vibrate = function(length)
{
	var l;
	
	if (length === undefined)
		l = 300 * 1000;
	else
		l = length * 1000;

  	var request = new Mojo.Service.Request('palm://com.palm.crotest', {
					                    method: 'Vibrate',
					                    parameters: {length: l},
										onSuccess: function() {
												console.log("Successfuly connected to CROTest service");
											},
										onFailure: function() {
												console.log("Failed to connect to CROTest service");
											}
					                	});

}


