
/* mouseover */

var ImageNames=new Array(
        'home',
        'service',
        'wohnen',
        'immobilien',
        'gewerbe',
        'calau',
        'wbc',
        'kontakt'
        );

var Images=new Array(new Array(ImageNames.length), new Array(ImageNames.length));
var ImagePath='/_images/_nav2/';

for(var x=0; x<ImageNames.length; x++)
        {
        Images[0][x]=new Image();
        Images[0][x].src=ImagePath+ImageNames[x]+'.gif';
        Images[1][x]=new Image();
        Images[1][x].src=ImagePath+'_'+ImageNames[x]+'.gif';
        }


function SetImage(Maj,Min)
{
document.images[ImageNames[Min]].src=Images[Maj][Min].src;
}

function MOvr(Index)
{
SetImage(1,Index);
}

function MOut(Index)
{
SetImage(0,Index);
}


/* home */

function ShowService(i) {
                document.getElementById("0").style.display='none';
                document.getElementById(i).style.display='block';
}

function HideService(i) {
                document.getElementById(i).style.display='none';
                document.getElementById("0").style.display='block';
}


/* set footer */

function getWindowHeight() {
        var windowHeight = 0;
        if (typeof(window.innerHeight) == 'number') {
                windowHeight = window.innerHeight;
        }
        else {
                if (document.documentElement && document.documentElement.clientHeight) {
                        windowHeight = document.documentElement.clientHeight;
                }
                else {
                        if (document.body && document.body.clientHeight) {
                                windowHeight = document.body.clientHeight;
                        }
                }
        }
        return windowHeight;
}
function setFooter() {
        if (document.getElementById) {
                var windowHeight = getWindowHeight();
                if (windowHeight > 0) {
                        var contentHeight = document.getElementById('page_margins').offsetHeight;
                        var footerElement = document.getElementById('footer');
                        var footerHeight  = footerElement.offsetHeight;
                        if (windowHeight - (contentHeight + footerHeight) >= 0) {
                                footerElement.style.position = 'relative';
                                footerElement.style.top = (windowHeight - (contentHeight + footerHeight)) + 'px';
                        }
                        else {
                                footerElement.style.position = 'static';
                        }
                }
        }
}


/* show_flash */

function show_flash(src, movie, width, height, quality, menu, bgcolor, flashvars)
{
        document.write("<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0\" width=\"" +width+ "\" height=\"" +height+ "\" id=\"" +movie+ "\">");
        document.write("<param name=\"movie\" value=\"" +src+ "\" />");
        document.write("<param name=\"FlashVars\" value=\"" +flashvars+ "\">");
        document.write("<param name=\"quality\" value=\"" +quality+ "\" />");
        document.write("<param name=\"menu\" value=\"" +menu+ "\" />");
        document.write("<param name=\"bgcolor\" value=\"" +bgcolor+ "\" />");
        document.write("<param name=\"wmode\" value=\"transparent\" />");
        document.write("<embed src=\"" +src+ "\" wmode=\"transparent\" swLiveConnect=\"true\" menu=\"" +menu+ "\" FlashVars=\"" +flashvars+ "\" quality=\"" +quality+ "\" bgcolor=\"" +bgcolor+ "\" width=\"" +width+ "\" height=\"" +height+ "\" name=\"" +movie+ "\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />");
        document.write("</object>");
}
