var Fenster = null;
function openView(vSessID, vContent)
{
	var w=685;
	var h=410;
	LeftPosition = (screen.width)? (screen.width-w)/2 : 0;
	TopPosition = (screen.height)? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',dependent=yes,scrollbars=no,resizable=no,status=no';
	Fenster = window.open('view.php?content='+vContent+'&PHPSESSID='+vSessID,'Calendar',settings);
	Fenster.focus();
}

function openArchiv(cam)
{
	var w=685;
	var h=410;
	LeftPosition = (screen.width)? (screen.width-w)/2 : 0;
	TopPosition = (screen.height)? (screen.height-h)/2 : 0;
	settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',scrollbars=no,resizable=no,status=no';
	Fenster = window.open('http://80.81.25.29/archiv/view.php?cam='+cam,'Calendar',settings);
	Fenster.focus();
}

function enlarge(vSessID, vTime, vWidth, vHeight)
{
	var sWidth = screen.width-100;
	var sHeight = screen.height-80;
	if(sWidth < vWidth) {
		var wWidth = sWidth;
		var divWidth = sWidth;
	} else {
		var wWidth = vWidth;
		var divWidth = wWidth+2;
	}
	if(sHeight < vHeight) {
		var wHeight = sHeight-30;
		var divHeight = sHeight-78;
	} else {
		var wHeight = vHeight+50;
		var divHeight = vHeight+2;
	}
	settings ='height='+wHeight+',width='+wWidth+',directories=no,toolbar=no,location=no,menubar=no,scrollbars=no,status=no';
	Fenster = window.open('enlarge.php?w='+divWidth+'&h='+divHeight+'&time='+vTime+'&PHPSESSID='+vSessID,'Grossansicht',settings);
	Fenster.focus();
}

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

