﻿var arrTechWebComponents = new Array();
var pctlTechWebComponentsCurrent = null;

function GetTechWebComponent(id)
{
    var x;
    for (x in arrTechWebComponents)
    {
        if (arrTechWebComponents[x].id == id)
        {
            return arrTechWebComponents[x];
        }
    }
    return null;    
}

function TechWebComponents_ShowPopup(popup)
{
    TechWebComponents_HideCurrentPopup();
    popup.Show();
    pctlTechWebComponentsCurrent = popup;
}

function TechWebComponents_HideCurrentPopup()
{
    if (pctlTechWebComponentsCurrent != null)
    {
        pctlTechWebComponentsCurrent.Hide();
        pctlTechWebComponentsCurrent = null;
    }
}

function ValidateFrame()
{
    if (window.parent._main == null)
    {
        //window.location = "Main.aspx?redirect=1"
        window.location = "Main.aspx";
    }
}

