//#######################################################################################################################
//#-----------------       Scripte, die sowohl in back- als auch in frontend funktionieren      ------------------------#
//#######################################################################################################################


//************************************************************
// Funktionen fuer Popup window
//************************************************************

function openImageViewer(url,winname,x,y,width,height){
  if(!winname)
    winname = 'imageviewer';
  if(!x)
  {
    y = 100;
    x = 100;
    width = 50;
    height = 50;
  }
	//var features = 'resizable=yes,scrollbars=no,top='+y+',left='+x+',width='+width+',height='+height;
	var features = 'resizable=yes,scrollbars=no,width='+width+',height='+height;
	if(!(window.top.win && window.top.win.open && !window.top.win.closed)){
		var w=window.open(url,winname,features); //'blank'
		w.opener=self;
		window.top.win = w;
	}else
		window.top.win.focus();
}

function openPage(url) {
  if(!frontend && isModified())
    alert('Sie m\u00fcssen den aktuellen Artikel speichern!');
  else
    document.location.href=url;
}


