/*-------------------------------------------------------------------
 General stuff
-------------------------------------------------------------------*/
function gid(name) {
    return document.getElementById(name);
}
/*-------------------------------------------------------------------
Player javascript API
-------------------------------------------------------------------*/

function thisMovie(name) {
    return document.getElementById(name);
};

function sendEvent(swf,typ,prm) {
	gid(swf).sendEvent(typ,prm);
};
function getUpdate(typ,pr1,pr2,swf) {
    // do nothing!!
    /*
    if(typ == "state" && swf == "jstest") {
        gid('stateshow').innerHTML = pr1;
    }
    */
};
function loadFile(swf,obj) {
    gid(swf).loadFile(obj);
};
function getLength(swf) {
    var len = gid(swf).getLength();
    //alert('the length of the playlist is: '+len);
};
function addItem(swf,obj,idx) {
    gid(swf).addItem(obj,idx);
};
function removeItem(swf,idx) {
    gid(swf).removeItem(idx);
};
function itemData(swf,idx) {
    var obj = gid(swf).itemData(idx);
    var txt = "";
    for(var i in obj) {
        txt += i+": "+obj[i]+"\n";
    }
    //alert(txt);
};
