﻿// get object
function obj(id){
    var o = document.getElementById("ctl00_Content_" + id);
    if(!o) o = document.getElementById("ctl00_Content_ctl01_" + id);
    return o;
}

// load planning calendar gantt chart
function loadPlanningCalendar(xml, w, h){
    if(document.getElementById("GanttChart")){
        var myChart = new FusionCharts("Controls/Gantt.swf", "myChartId", w, h, 0, 0);
        myChart.setDataXML(xml);
        myChart.render("GanttChart");
    }
}

// show program description light box
function showProgram(id, title) {
    var elem = document.getElementById('LyteboxTemp');
    elem.href = "Lightbox/lightdescriptor.aspx?ID=" + id;
    elem.rel = "lyteframe";
    elem.rev = "width: 800px; height: 600x; scrolling: auto;";
    elem.title = title;
    myLytebox.start(elem, false, true);
}

// show email form light box
function ShowEmailFormLytebox() {
    var elem = document.getElementById('LyteboxTemp');
    elem.href = "Lightbox/lightemailform.aspx";
    elem.rel = "lyteframe";
    elem.rev = "width: 632px; height: 480x; scrolling: auto;";
    elem.title = "";
    myLytebox.start(elem, false, true);
}

// direct link
function openDirectLink() {
    if (typeof (myLytebox) != "undefined")
        myLytebox.start(obj("lnkDirect"), false, true);
    else
        setTimeout("openDirectLink()", 50);
}



