/*
 
Places and resizes clickable left- and right banner

*/

function WallpaperSetup()
{
    if (navigator.appVersion.indexOf("opera") == -1)
    {
        // Setup general values
        var ContentWidth = window.document.body.clientWidth;
        var AdWidth = (document.documentElement.clientWidth - ContentWidth) / 2;
        var ContentHeight = 0;

        //IE or Firefox banner height definition
        if (navigator.appVersion.indexOf("MSIE") != -1)
        {
            ContentHeight = window.document.body.scrollHeight;

            //Only body background in IE, because all content is transparent in Firefox 
            if(document.getElementById('divLeftAd') != null)
            {
                document.body.style.background = document.getElementById('divLeftAd').style.background;
                document.getElementById('divLeftAd').style.background = 'none';
            }
            if(document.getElementById('divRightAd') != null)
            {
                document.body.style.background = document.getElementById('divRightAd').style.background;
                document.getElementById('divRightAd').style.background = 'none';
            }
        }
        else
        {
            ContentHeight = window.innerHeight;
        }

        // Setup left banner div
        if(document.getElementById('imgDotClearLeft') != null)
        {
            document.getElementById('imgDotClearLeft').width = AdWidth;
            document.getElementById('imgDotClearLeft').height = ContentHeight;
        }

        // Setup right banner div
        if(document.getElementById('imgDotClearRight') != null)
        {
            document.getElementById('divRightAd').style.left = ContentWidth + AdWidth + 'px';
            document.getElementById('imgDotClearRight').width = AdWidth;
            document.getElementById('imgDotClearRight').height = ContentHeight;
        }
    }
}        

function ClickAd(url)
{
  window.open(url,"ClickAd","");
}
