5 twoArgs : function(t1, p1, t2, p2) {
14 index : (t1 == t2 ? 1 : 0),
20 twoPropsArgs : function(p1, p2) {
21 return this.twoArgs("property", p1, "property", p2);
24 propValueArgs : function(p, v) {
25 return this.twoArgs("property", p, "value", v);
28 sendCommand : function(name, args) {
29 if (typeof (args) == 'undefined ')
30 $.post("/run.cgi?value=" + name);
32 $.post("/run.cgi?value=" + name, JSON.stringify(args));
36 propertySwap : function(p1, p2) {
37 this.sendCommand("property-swap", this.twoPropsArgs(p1, p2));
40 propertyAssign : function(p1, value) {
41 this.sendCommand("property-assign", this.propValueArgs(p1, value));
45 $.post("/run.cgi?value=pause");