/**
 * Opens a new window without location bar
 *
 * @param filename, String,
 * @param width, Integer,
 * @param height, Integer,
 * @return void
 * fenster.resizeTo(100+width,230+height);
 */
function popup(filename,width,height) {
  fenster = window.open(''+filename,'pop','scrollbars=no,toolbar=no,location=no,menubar=no,status=no,directories=no,width='+width+',height='+height+'');
  fenster.resizeTo(width,height);
} // end of the 'popup()' function

/**
 * Displays a confirmation box to ask if the action
 * is wanted (mostly deleting links)
 *
 * @param url, String,
 * @return void
 */
function confirmAction(URL, text) {
  check = confirm(text);
  if (check) {
    window.location.href = URL;
  }
} // end of the 'confirm()' function

/**
 *
 * Um Grösse anzuzeigen, folgenden Code einfügen: alert('Breite: '+win_width+'   Höhe: '+win_height);
 */
function resizeImageView(bild, win_width, win_height){
	window.self.focus()
	if (screen.height < win_height){
		new_height = (screen.height / win_height) * win_height;
		new_width = (screen.height / win_height) * win_width;
		document.getElementById(bild).height = new_height * 0.1;
		document.getElementById(bild).width = new_width * 0.1;	

	}
	if (screen.width < win_width){
		new_width = (screen.width / win_width) * win_width;
		new_width = (screen.width / win_width) * win_height;
		document.getElementById(bild).height = new_height * 0.1;
		document.getElementById(bild).width = new_width * 0.1;
	}
}

