function go2URL(address,target)
{
	window.open(address,target);
}

function newWindow(address)
{
	var maxW = screen.width;
	var maxH = screen.height;
	var w = 800;
	var h = 600;
	var _top = Math.floor((maxH - h) / 2);
	var _left = Math.floor((maxW - w) / 2);
	
	var win = window.open(address,'doiW',"toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w+",height="+h);
	win.moveTo(_left,_top);
	win.focus();
}

function newWindow1(address)
{
	var maxW = screen.width;
	var maxH = screen.height;
	var w = 430;
	var h = 450;
	var _top = Math.floor((maxH - h) / 2);
	var _left = Math.floor((maxW - w) / 2);
	
	var win = window.open(address,'doiW',"toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=yes,width="+w+",height="+h);
//	win.moveTo(_left,_top);
	win.focus();
}

function gl(theAnchor)
{
	// remove focus -- do this first to avoid coming the new window into the background
	if( theAnchor.blur ) {
		theAnchor.blur();
	}

    // open new window;
    // no spaces in string, bug in function window.open() // toolbar=yes
    var w = window.open(theAnchor.href, theAnchor.target, 'width=430,height=450,resizable=yes,scrollbars=yes');
    
    // bring window to top
    if( !w.opener ) {
    	w.opener = self;
    }
    	
    if( w.focus != null ) {
    	w.focus();
    }
	
	// avoid standard hyperlink processing
    return false;
}

function ed(theAnchor)
{
	// remove focus -- do this first to avoid coming the new window into the background
	if( theAnchor.blur ) {
		theAnchor.blur();
	}

    // open new window;
    // no spaces in string, bug in function window.open()
    var w = window.open(theAnchor.href, theAnchor.target, 'width=510,height=580,resizable=yes,scrollbars=yes');
    
    // bring window to top
    if( !w.opener ) {
    	w.opener = self;
    }
    	
    if( w.focus != null ) {
    	w.focus();
    }
	
	// avoid standard hyperlink processing
    return false;
}

function pr(theAnchor)
{
	// remove focus -- do this first to avoid coming the new window into the background
	if( theAnchor.blur ) {
		theAnchor.blur();
	}

    // open new window;
    // no spaces in string, bug in function window.open()
    var w = window.open(theAnchor.href, theAnchor.target, 'width=450,height=550,resizable=yes,scrollbars=yes');
    
    // bring window to top
    if( !w.opener ) {
    	w.opener = self;
    }
    	
    if( w.focus != null ) {
    	w.focus();
    }
	
	// avoid standard hyperlink processing
    return false;
}


function pr_do()
{
	if(window.print) {
		window.print();
	}
	
	return false;
}

function pr_init_links()
{
	for( i = 0; i < document.links.length; i++ )
	{
		document.links[i].onclick = new Function('return pr_do();');
	}
	
	for( i = 0; i < document.forms.length; i++ )
	{
		document.forms[i].onsubmit = new Function('return pr_do();');
	}
}



function pageSel(baseUrl, maxPage, maxOffset, rowsPerPage)
{
	var i;
	
	i=prompt('Gehe zu Seite:', '');
	if( i!=null && i!='' ) 
	{
		// goto page
		i = (i-1) * rowsPerPage;
		
		window.location.href = baseUrl + i;
	}
	return false;
}
