<!--
/*
+----------------------------------------------------------------------------------------------
| Site: Bau Natürlich (http://www.bau-natuerlich.com)
| CMS:  gotopage 3.1
| Copyright (c) 2006 Rosman (http://www.rosman.co.at)
|
| Author(s): Johan Rosman <johan@rosman.co.at>
+----------------------------------------------------------------------------------------------
| Purpose
| let tools (i.e. print and email form) be openened in a seperate window
+----------------------------------------------------------------------------------------------
| Version   Date         Comment
| 3.01      2006/03/28   initial version
+----------------------------------------------------------------------------------------------
*/

if ( !window._tools ) {
    var _tools = new Object();
    _tools.pages = new Array();

    /* open page (print preview and email form) in a new window */
    _tools.openwin = function () {
        if ( this.id ) var _id = this.id;
        else var _id = _event.id;
        window.open( _tools.pages[_id], "pagetool",
                     "width=" + Math.ceil ( screen.width * 0.8 ) + ",height=" + Math.ceil ( screen.height * 0.9 ) +
                     ",top=0,left=0,resizable=yes,scrollbars=yes,menubar=no,toolbar=no,status=no,location=no");
    } // openwin

    /* initialise tools */
    _tools.init = function () {
        var _div = new _dhtml ( 'tools' );
        var _a = _div.obj.getElementsByTagName ( 'A' );
        for ( var _i=0; _i<_a.length; _i++ ) {
            if ( _class.is_a ( _a[_i], 'tool' ) ) {
                _tools.pages[_a[_i].id] = _a[_i].href;
                _a[_i].href = '#';
                _event.register_handler ( _a[_i], 'click', _tools.openwin );
            }
        }
    }  // init

    _event.register_handler ( window, 'load', _tools.init );
}
-->
