/* ---------------------------------------------------------------
   FILENAME:	cal.js
   CLIENT:		Vereinigung Nordostschweizerischer Marktorte (VNOSM)
   PROJECT:		JavaScript Library - Calendar
   AUTHOR:		Urs Tobler  uto@bluewin.ch
   HISTORY:		2007-02-29	Initial Coding
   REVISION:	

   Copyright © 2007 Urs Tobler  uto@bluewin.ch
   --------------------------------------------------------------- */

function ShowMonth() {
	var n = new Date();
	var m = n.getMonth() + 1;
	var y = n.getFullYear();
	frames.cal_eve.location = "/cgi-bin/cal/calendar.pl?calendar=std&public_access_op=on&action=view_month&month=" + m + "&year=" + y;
}

function ShowDay() {
	var n = new Date();
	var m = n.getMonth() + 1;
	var d = n.getDate();
	var y = n.getFullYear();
	frames.cal_eve.location = "/cgi-bin/cal/calendar.pl?calendar=std&public_access_op=on&action=view_day&day=" + d + "&year=" + y + "&month=" + m;
}

function CalHlp(hlp) {
	var wW = 480;
	var wH = 360;
	var sX = (top.screenLeft) ? top.screenLeft : top.screenX;
	var sY = (top.screenTop) ? (top.screenTop-64) : top.screenY;
	if (window.outerWidth) var wX = top.window.outerWidth;
		else if (document.body.offsetWidth) var wX = top.document.body.offsetWidth;
	if (window.outerHeight) var wY = top.window.outerHeight;
		else if (document.all) var wY = (document.documentElement.clientHeight) ? top.document.documentElement.clientHeight : top.document.body.offsetHeight;
	var Hlp = window.open(hlp,"cal_hlp","dependent=1,scrollbars=1,width=" + wW + ",height=" + wH + ",left=" + (((wX/2)-(wW/2))+sX) + "px,top=" + (((wY/2)-(wH/2))+sY) + "px");
	Hlp.focus();
}

