﻿function MnuSelect(imgId)
{
    if (imgId.indexOf('Home') != -1) 
    {
        this.location = "Default.aspx";
    }
    else if (imgId.indexOf('About') != -1) 
    {
        this.location = "About.aspx";
    }
    else if (imgId.indexOf('Agentur') != -1)
    {
        this.location = "Agentur.aspx";
    }
    else if (imgId.indexOf('Philosophie') != -1)
    {
        this.location = "Philosophie.aspx";
    }
    else if (imgId.indexOf('Unternehmen') != -1)
    {
        this.location = "Unternehmen.aspx";
    }
    else if (imgId.indexOf('Team') != -1)
    {
        this.location = "Team.aspx";
    }
    else if (imgId.indexOf('Portofolio') != -1) 
    {
        this.location = "Portofolio.aspx";
    }
    else if (imgId.indexOf('Packaging') != -1) {
        this.location = "Packaging.aspx";
    }
    else if (imgId.indexOf('Corporate') != -1)
    {
        this.location = "Corporate.aspx";
    }
    else if (imgId.indexOf('Brand') != -1)
    {
        this.location = "Brand.aspx";
    }
    else if (imgId.indexOf('Form') != -1)
    {
        this.location = "Form.aspx";
    }
    else if (imgId.indexOf('Web') != -1)
    {
        this.location = "Web.aspx";
    }
    else if (imgId.indexOf('Contact') != -1)
    {
        this.location = "Contact.aspx";
    }
    else if (imgId.indexOf('News') != -1)
    {
        this.location = "News.aspx";
    }
    else if (imgId.indexOf('Clients') != -1) {
        this.location = "Clients.aspx";
    }
}
function viewThumbnails(pageId)
{
    this.location = pageId;
}
function ValidateLogin()
{
    var client = findDOM("ClientTxt", 0);
    var pwd = findDOM("PwdTxt", 0);
    var clientH = findDOM("ClientHTxt", 0);
    var pwdH = findDOM("PwdHTxt", 0);
    var clientValue = client.value;
    clientH.value = clientValue;
    pwdH.value = pwd.value;
    document.forms[0].submit();
}
function findDOM(objectID, withStyle)
{
    var isDHTML = 0;
    var isID = 0;
    var isAll = 0;
    var isLayers = 0;
    if (document.getElementById)
    {
        isID = 1;
    }
    else
    {
        if (document.all)
        {
            isAll = 1;
            isDHTML = 1;
        }
        else
        {
            browserVersion = parseInt(navigator.appVersion);
            if ((navigator.appName.indexOf('Netscape') != -1) && (browserVersion == 4))
            {
                isLayers = 1;
                isDHTML = 1;
            }
        }
    }
    if (withStyle == 1)
    {
        if (isID)
        {
            return (document.getElementById(objectID).style);
        }
        else
        {
            if (isAll)
            {
                return (document.all[objectID].style);
            }
            else
            {
                if (isLayers)
                {
                    return (document.layers[objectID]);
                }
            }
        }
    }
    else
    {
        if (isID)
        {
            return (document.getElementById(objectID));
        }
        else
        {
            if (isAll)
            {
                return (document.all[objectID]);
            }
            else
            {
                if (isLayers)
                {
                    return (document.layers[objectID]);
                }
            }
        }
    }
}
