function openPicWin(pFileName, pWinName, pWidth, pHeight) {
	var isNS = (document.layers) ? true : false;
	
	if (isNS) pHeight = pHeight + 19;
	var allSettings = 'width=' + pWidth + ',height=' + pHeight + ',menubar=no,scrollbars=no,status=no,resizable=yes';
	var w = window.open(pFileName, pWinName, allSettings);
	w.window.focus();
}

function changedisplay(id, todo) {
	document.getElementById(id).style.display = todo;	
}


function addLoadListener(fn)
{
	if (typeof window.addEventListener != 'undefined')
	{
		window.addEventListener('load', fn, false);
	}
	else if (typeof document.addEventListener != 'undefined')
	{
		document.addEventListener('load', fn, false);
	}
	else if (typeof window.attachEvent != 'undefined')
	{
		window.attachEvent('onload', fn);
	}
	else
	{
		return false;
	}
	
	return true;
};




function attachEventListener(target, eventType, functionRef, capture)
{
    if (typeof target.addEventListener != "undefined")
    {
        target.addEventListener(eventType, functionRef, capture);
    }
    else if (typeof target.attachEvent != "undefined")
    {
        target.attachEvent("on" + eventType, functionRef);
    }
    else
    {
        return false;
    }

    return true;
};



