﻿function setSelectedTab(current_message_tab)
{
    var element = document.getElementById(current_message_tab);
    element.className = 'Tab_Header_Selected';
}
function showPreview(previewID)
{
    var left    = (screen.width / 2) - 400;
    var top     = (screen.height / 2) - 350;
    var win     = window.open('../home/preview.aspx?id=' + previewID, 'Preview', 'status=0, toolbar=0, width=890, height=530; top=' + top + ', left=' + left);
    win.focus();
}
function setFocus(textbox_id, label)
{
    var textbox = document.getElementById(textbox_id);
    if (textbox.value = label)
    {
        textbox.style.color = '#000000';
        textbox.value = '';
    }
}
function blurFocus(textbox_id, label)
{
    var textbox = document.getElementById(textbox_id);
    if (textbox.value == '')
    {
        textbox.style.color = '#666666';
        textbox.value = label;
    }
}
function showStatusUpdate()
{
    document.getElementById('currentStatus').style.display = 'none';
    document.getElementById('updateStatus').style.display = 'block';
}
function hideStatusUpdate()
{
    document.getElementById('currentStatus').style.display = 'block';
    document.getElementById('updateStatus').style.display = 'none';
}
function showExample(filename)
{
    var left    = (screen.width / 2) - 300;
    var top     = (screen.height / 2) - 250;
    var win     = window.open('../../images/' + filename, 'Example', 'status=0, toolbar=0, width=640, height=500; top=' + top + ', left=' + left);
    win.focus();
}
    