function MM_reloadPage(reinit) {  //reloads the window if Nav4 resized
  if (reinit==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

function MM_findObj(n, d) {
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    	d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_showHideLayers() {
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3)
  if ((obj=MM_findObj(args[i]))!=null) {
		v=args[i+2];
	  if (obj.style) {
  		obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v;
		}
    obj.visibility=v;
	}
}

function popup(targetURL,scrWidth,scrHeight,dummy) {
	if (dummy == 1) {
		paramStr = "scrollbars=no,width=" + scrWidth + ",height=" + scrHeight + ",toolbar=no,resizable=no,top=0,left=0";
		window.open(targetURL,'popupWin',paramStr);
	} else if (dummy == 2) {
		paramStr = "scrollbars=yes,width=" + scrWidth + ",height=" + scrHeight + ",toolbar=no,resizable=yes,top=-3,left=-3";
		window.open(targetURL,'popupWin',paramStr);
	} else {
		paramStr = "scrollbars=yes,width=" + scrWidth + ",height=" + scrHeight + ",toolbar=no,resizable=no,top=0,left=0";
		window.open(targetURL,'popupWin',paramStr);
	}
}

function AvailabilityGoTo(lngMonth, lngYear) {
/* Custom Code to switch to next month */
var StringURL = "";
	StringURL += '?ID=43002815&MN=' + lngMonth + '&YR=';
	StringURL += lngYear + '&ST=' + getScrollTop()+ '&MealType=2';
	StringURL += '&CHFR=1';
	document.location.href = document.location.href.split("?")[0] + StringURL;
}

function getScrollTop() {
var scrollY = 0;

	if (document.body && typeof document.body.scrollTop != "undefined") {
		scrollY += document.body.scrollTop;
		if (document.body.parentNode && typeof document.body.parentNode.scrollTop != "undefined") {
			scrollY += document.body.parentNode.scrollTop;
		}
	}
	else if (typeof window.pageXOffset != "undefined")	{
		scrollY += window.pageYOffset;
	}
return scrollY;
}		

function showAvailability(LS,MN,YR){
var date = new Date();
var month = date.getMonth() + 1;
var year = date.getFullYear();
var strAvailabilityInclude;
	MN = MN ? MN : month;
	YR = YR ? YR : year;
	strAvailabilityInclude = '<' + 'script language="javascript"'
	strAvailabilityInclude += ' src="http://feratel-seefeld.concentrator.net/a3t2/tosc/availability.asp?IM=JS'
	strAvailabilityInclude += '&OC=SEEFELD'
	strAvailabilityInclude += '&ID=43002051'
	strAvailabilityInclude += '&LS='+LS
	strAvailabilityInclude += '&LG=1'
	strAvailabilityInclude += '&RR='
	strAvailabilityInclude += '&NR=3'
	strAvailabilityInclude += '&AT=2'
	strAvailabilityInclude += '&CF=TOSC2'
	strAvailabilityInclude += '&MN='+MN
	strAvailabilityInclude += '&YR='+YR
	strAvailabilityInclude += '&SFT=NO'
	strAvailabilityInclude += '"><'+ '/script>';
return strAvailabilityInclude;
}


