function updateLinkURL(obj, url) {
    obj.href = url;
}

function getTopFrame() {
    var frm = self;
    while (!frm.document.getElementById('wrapper_frame')) {
        if (frm == frm.parent) return frm;

        frm = frm.parent;
    }
    return frm;
}

function changeImg(img, src) {
    img.src = src;
}

// for videos
var cur_vid_rec_no = 0;
var cur_vid_url = '';

function MouseOverVid(rec_no, guide, url, txt, duration) {
    cur_vid_rec_no = rec_no;
    cur_vid_url = url;

    hideShowDesc(true);
}

function MouseOutVid(obj) {
    hideShowDesc(false);
}

function hideShowDesc(how) {
    var d = document.getElementById('vid_desc_' + cur_vid_rec_no);
    if (d) d.style.display = how ? 'none' : '';

    d = document.getElementById('vid_nav_'  + cur_vid_rec_no);
    if (d) d.style.display = how ? '' : 'none';
}
