function launchPlayer(url) {
        zurl = "http://"+window.location.host+"/standalone.php"+"?"+url
        axPopUp(zurl,450,200);
}
function axPopUp(URL, w, h) {
        var day = new Date();
        var id = day.getTime();
        eval("var page"+id+" = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width="+w+",height="+h+",left = 350,top = 150,dependent=yes,alwaysRaised=yes');");
}

/* addLoadEvent - Added by dschreck - 08-08-2006 */
function addLoadEvent(func) {
        var oldonload = window.onload;
        if(typeof window.onload != 'function') {
                window.onload = func;
        } else {
                window.onload = function() {
                        if(oldonload) {
                                oldonload();
                        }
                        func();
                }
        }
}
/* end addLoadEvent */

/* ds_ClearItem - Added by dschreck - 09-05-2006 */
function ds_ClearItem(ele) {
        if(confirm("Are you sure you wish clear this image? This action cannot be undone.")) {
                try {
                        document.getElementById(ele).value = '';
                } catch(e) {
                        alert("Failed to clear item. Contact support. Error: "+e);
                }
        } else {
                //
        }
}
/* end ds_ClearItem */




function del_entry(entry) {
        if (window.confirm("Are you sure?")) {
            window.location.href = "http://"+window.location.host+window.location.pathname+"?"+entry
        }
}

function popup(pagename,height,width) {
        var h=parseInt(height);
        var w=parseInt(width);
        var hw="HEIGHT="+h+",WIDTH="+w+",resizable=yes,scrollbars=yes"
          myWind=window.open(pagename,"",hw)
}

function popupmiddle(pagename,height,width) {
        var winl = (screen.width - width) / 2;
        var wint = (screen.height - height) / 2;
        var h=parseInt(height) + 20;
        var w=parseInt(width) + 20;
        var hw="HEIGHT="+h+",WIDTH="+w+",resizable=no,scrollbars=no,left="+winl+",top="+wint;
        myWind=window.open(pagename,"",hw);
}
function popupmiddle_extra(pagename,height,width,resize) {
        if(resize == null) { resize = 1; }
        var day = new Date();
        var id = day.getTime();
        var winl = (screen.width - width) / 2;
        var wint = (screen.height - height) / 2;
        var h=parseInt(height) + 20;
        var w=parseInt(width) + 20;
        var URL = pagename;

        eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable="+resize+",width="+w+",height="+h+",left="+winl+",top="+wint+",dependent=yes,alwaysRaised=yes');");
}

function view_popup(id) {
          var obj = document.getElementById('popup_'+id);
          if(obj.style.visibility == "visible") {
                  obj.style.visibility = "hidden";
                  obj.style.border = '0px solid #000';
                  obj.style.height = '0px';
          }
          else {
                  obj.style.visibility = 'visible';
                  obj.style.border = '1px solid #000';
                  obj.style.height = '250px';
          }
}