function ConfDeleteJrn(jid)
{
        var delconf = confirm("Do you really want to delete Journey #" + jid +  " ?\nAll pitstop and consignment records of this journey will also be deleted.");
        if (delconf) { window.location = "del-journey.php?jid=" + jid; }
}

function ConfDeleteStp(sid, jid)
{
        var delconf = confirm("Do you really want to delete Stop #" + sid +  " of Journey #" + jid + " ?");
        if (delconf) { window.location = "del-stop.php?sid=" + sid + "&jid=" + jid; }
}

function ConfDeleteCsgn(cid, jid)
{
        var delconf = confirm("Do you really want to delete Consignment #" + cid +  " of Journey #" + jid + " ?");
        if (delconf) { window.location = "del-consignment.php?cid=" + cid + "&jid=" + jid; }
}

function OpenWindow(winname, url, height, width)
{
        var left = (screen.width/2)-(width/2);
        var top = (screen.height/2)-(height/2);
        window.open(url,winname,"width=" + width + ",height=" + height + ",top=" + top + ",left=" + left + ",toolbar=no,addressbar=no,location=no,menubar=no,titlebar=no,status=no,resizable=yes,scrollbars=yes");
}

ver=parseInt(navigator.appVersion)
ie4=(ver>3  && navigator.appName!="Netscape")?1:0
ns4=(ver>3  && navigator.appName=="Netscape")?1:0
ns3=(ver==3 && navigator.appName=="Netscape")?1:0

function playSound()
{
        if (ie4) document.all['BGSOUND_ID'].src='sound.mp3';
        if ((ns4||ns3) && navigator.javaEnabled() && navigator.mimeTypes['audio/x-midi'] && self.document.Bach.IsReady())
        {
                self.document.Bach.play()
        }
}

function stopSound()
{
        if (ie4) document.all['BGSOUND_ID'].src='silence.mid';
        if ((ns4||ns3) && navigator.javaEnabled() && navigator.mimeTypes['audio/x-midi'])
        {
                self.document.Bach.stop()
        }
}

function emptyTxt()
{
        document.frmNewsletter.email.value = "";
}

