window.onload = function ()
{
	if (self.init) init();
}
window.onresize = function ()
{
	if (self.init) init();
}

function init()
{
	getWindowDims();
	setWindowElementDims();
}

function getWindowDims()
{
	windowHeight = document.body.clientHeight;
}
function setWindowElementDims()
{
    borderHeight = 10 + 10 + 20;
    
    boxCornerSize = 9;
    searchHeight = 20 + (boxCornerSize * 2);

    sortHeight = 30;
    
    groupHeight = 0;
    
    if (document.getElementById('listGroup') != null)
    {
        groupHeight = document.getElementById('listGroup').offsetHeight + 10;
    }

	listHeight = windowHeight - searchHeight - sortHeight - borderHeight - groupHeight;
	document.getElementById('listBoxContent').style.height = listHeight - (boxCornerSize * 2);
}

// search value changers
function inputFocus(argValue, argField)
{
	if(argField.value==argValue)
		argField.value="";
}
function inputBlur(argValue, argField)
{
	if(argField.value=="")
		argField.value=argValue;
}



