// open song popup
function open_songwindow( song_id, preistipp, css ) {
	windowHeight = 640;
	windowWidth = 450;
	
	var maxHeight = screen.availHeight - 50;
	
	if (document.all && !window.opera) {
		windowWidth = windowWidth + 18; // add space for ie scrollbar
	}
	
	if ((windowHeight > maxHeight) && !document.all) {
		windowHeight = maxHeight;
		windowWidth = windowWidth + 16; // add space for scrollbar
	}
	
	songWindow=window.open( 'http://klingeltoene.musicbox.de/song.php?song=' + song_id + '&preistipp=' + preistipp + '&css=' + css, '',
		'toolbar=0,location=0,directories=0,status=1,menubar=0,' +
		'scrollbars=1,resizable=yes,' +
		'width=' + windowWidth + 
		',height=' + windowHeight);
	return true;
}

function open_urlwindow( url, width ) {
	windowHeight = 640;
	if (width>0){
		windowWidth = width;
	}else{
		windowWidth = 450;
	}
	var maxHeight = screen.availHeight - 50;
	
	if (document.all && !window.opera) {
		windowWidth = windowWidth + 18; // add space for ie scrollbar
	}
	
	if ((windowHeight > maxHeight) && !document.all) {
		windowHeight = maxHeight;
		windowWidth = windowWidth + 16; // add space for scrollbar
	}
	
	urlWindow=window.open( url, '',
		'toolbar=0,location=0,directories=0,status=1,menubar=0,' +
		'scrollbars=1,resizable=yes,' +
		'width=' + windowWidth + 
		',height=' + windowHeight);
	return true;
}

function open_urlwindow( url, width, height ) {
	if (width>0){
		windowWidth = width;
	}else{
		windowWidth = 450;
	}
	if (height>0){
		windowHeight = height;
	}else{
		windowHeight = 640;
	}
	
	var maxHeight = screen.availHeight - 50;
	
	if (document.all && !window.opera) {
		windowWidth = windowWidth + 18; // add space for ie scrollbar
	}
	
	if ((windowHeight > maxHeight) && !document.all) {
		windowHeight = maxHeight;
		windowWidth = windowWidth + 16; // add space for scrollbar
	}
	
	urlWindow=window.open( url, '',
		'toolbar=0,location=0,directories=0,status=1,menubar=0,' +
		'scrollbars=1,resizable=yes,' +
		'width=' + windowWidth + 
		',height=' + windowHeight);
	return true;
}