﻿// JScript File

/*
-----------------------------------------------------------------------------
<summary>
Ermittelt die Fensterbreite
</summary>
<remarks>
Ermittelung der Fensterbreite
</remarks>
<history>
</history>
-----------------------------------------------------------------------------
*/

function getSize()
{
    var __aspnetForm = document.forms[0];
    if (!__aspnetForm) {
        __aspnetForm = document.aspnetForm;
    }

	var s = {width:0, height:0};
    if(typeof window.innerWidth != 'undefined')
    {
        s.width = window.innerWidth;
        s.height = window.innerHeight;        
    }
    else
    {
        var obj = getBody(window);
        s.width = parseInt(obj.clientWidth);
        s.height = parseInt(obj.clientHeight);
    }
    if(__aspnetForm.__width){
	    __aspnetForm.__width.value=s.width;
    }
}

function getBody(w)
{
    return (w.document.compatMode && w.document.compatMode == 'CSS1Compat') ?
    w.document.documentElement :
    w.document.body || null;
}
