﻿ShowServerMessage();

function ShowServerMessage()
{
    if (document.title.indexOf(":")!=-1) 
    {
        var Title = document.title.split(":")[0];
        var Parameter = document.title.split(":")[1];
        alert(Parameter.split("&")[1].split("=")[1])
        document.title = Title;
    }
} 
function ShowClientMessage(Message)
{
    alert(Message);
}
function GetFieldText(FieldName)
{
    var FormControl = document.getElementById(FormName);
    var FormInput = FormControl.getElementsByTagName("Input");
    var FormTextarea = FormControl.getElementsByTagName("TextArea");
        
    for (index=0; index<FormInput.length; index++)
    {
        if (FormInput[index].id.indexOf("_" + FieldName) != -1) return FormInput[index].value;
    }
    for (index=0; index<FormTextarea.length; index++)
    {
        if (FormTextarea[index].id.indexOf("_" + FieldName) != -1) return FormTextarea[index].value;
    }
}
var CurPage = document.location.pathname.substring(document.location.pathname.lastIndexOf("/")+1, document.location.pathname.length-5)
var MenuItems = document.getElementById("MenuTable").getElementsByTagName("TD");
for (index=0; index<MenuItems.length; index++)
{
    if (MenuItems[index].title == CurPage) 
    {
        MenuItems[index].className = "BannerButton_Over";
        MenuItems[index].onmouseout = "";
        break;
    }
}