
	var contentW = 800 ;

	var phaseTxt = new Array(
	   'Nieuwe Maan','','','','','','','','Eerste Kwartier','','','','','','','Volle Maan','','','','','','','','Laatste Kwartier','','','','','','','','');

with (document) {
  write("<style>");
  write("body {margin:0px; background:#14000D url('img/bg_blue_stars.gif') repeat fixed top left;}");
  write("#Box {visibility:hidden;background-color:white;}");
  write("#menusky {visibility:hidden;}");
  write("#content {position:absolute;top:100px;align:center;}");
  write(".content {z-index:10;background-color:white;padding:0px 40px 50px 10px;border:outset 2px #633100;}");
  write("</style>");
    var cycle=29.530589 ;
        // op dd 15-06-2011 startDate gecorrigeerd -> 18uur vroeger
        // new Date was:(2011,1,4,0,0,0)
    var startDate=new Date(2011,1,3,6,0,0) ; // Nieuwe Maan
    var currentDate=new Date() ;
        currentDate.setTime(currentDate.getTime() - (currentDate.getTimezoneOffset()*60000));
    var resultdays=(Date.parse(currentDate)-Date.parse(startDate))/1000/60/60/24 ;
    var phaseNr=(resultdays/cycle)-(Math.floor(resultdays/cycle)) ;
        phaseNr=Math.round(cycle*phaseNr) ;
  write('<img src="./img/Maangestalten/maan'+phaseNr+'.png" title="'+phaseTxt[phaseNr]+'" style="position:fixed;top:10px;right:20px;width:200px;float:right;z-index:-1;" />');
//twinkle
  write('<img src="http://www.eclecticastrology.nl/imagesliz/4.gif" width="18" height="18" style="position:fixed;top:400px;left:100px;z-index:-1;" border="0" />');
  write('<img src="http://www.eclecticastrology.nl/imagesliz/2.gif" width="18" height="18" style="position:fixed;top:600px;left:200px;z-index:-1;" border="0" />');
  write('<img src="http://www.eclecticastrology.nl/imagesliz/3.gif" width="18" height="18" style="position:fixed;top:330px;right:30px;z-index:-1;" border="0" />');
  write('<img src="http://www.eclecticastrology.nl/imagesliz/2.gif" width="18" height="18" style="position:fixed;top:500px;right:200px;z-index:-1;" border="0" />');
}


//if(this.routeImg) alert("okee");



function load() { 

//	var url = document.URL;
//		if (url.indexOf("index") != -1)  setTimeout('fadeIn(0.75)',1000);
//		else 
	setTimeout('fadeIn(0.95)',100);
	resizediv();
	}

function resizediv(evt) { 
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var rMargin = ns ? 130 : 110;
	var cWidth = ns ? window.innerWidth : document.body.clientWidth;

if (cWidth <= contentW+100) {
		document.getElementById("Box").style.width=(cWidth-rMargin)+"px";
		document.getElementById("content").style.width=(1*cWidth-90)+"px";
		document.getElementById("content").style.paddingLeft="30px";
	//	if (this.routeImg) {			document.getElementById("routeImg").style.width=(1*cWidth-330)+"px" };
		}
	else {	document.getElementById("Box").style.width=(contentW)+"px";
		document.getElementById("content").style.width="100%";
		document.getElementById("content").style.paddingLeft="0px";
	//	if (this.routeImg) {			document.getElementById("routeImg").style.width="100%" };
		}

	}


var COL=0;
function fadeIn(fs) {
		ID=null;
		COL=0;
		document.getElementById("Box").style.visibility='visible';
		document.getElementById('menusky').style.visibility = "visible";
		fadeIn2(fs);
}

function fadeIn2(fs) {
		COL=COL+fs;
		COL=(COL>1)?1:COL;
		document.getElementById("Box").style.filter='alpha(opacity='+parseInt(100*COL)+')';
		document.getElementById("Box").style.opacity=COL;
		document.getElementById("menusky").style.filter='alpha(opacity='+parseInt(100*COL)+')';
		document.getElementById("menusky").style.opacity=COL;
		if (COL<1)
		 setTimeout("fadeIn2("+fs+")",20);		
}


	if (window.addEventListener)
	  window.addEventListener("load", staticmenu, false)
	else if (window.attachEvent)
	  window.attachEvent("onload", staticmenu)
	else if (document.getElementById)
	  window.onload=staticmenu

  var startY = 0 //set y offset of block in pixels
  var verticalpos="fromtop" //enter "fromtop" or "frombottom"

function iecompattest() {
  return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function staticmenu() {
  
	menuheight=document.getElementById("menusky").offsetHeight
  var ns = (navigator.appName.indexOf("Netscape") != -1) || window.opera;
  var d = document;
  var startX = 0 ;
  
  function ml(id) {
		var el=d.getElementById(id);
		if(d.layers)el.style=el;
		el.sP=function(x,y){this.style.top=y+"px";};
		if (verticalpos=="fromtop")
		el.y = startY;
		else{
		el.y = ns ? pageYOffset + innerHeight : iecompattest().scrollTop + iecompattest().clientHeight;
		el.y -= startY;
		}
    
		return el;
	}
	window.stayTopLeft=function() {
		if (verticalpos=="fromtop"){
		var pY = ns ? pageYOffset : iecompattest().scrollTop;
		ftlObj.y += (pY + startY - ftlObj.y)/8;
		}
		else{
		  var pY = ns ? pageYOffset + innerHeight - menuheight: iecompattest().scrollTop + iecompattest().clientHeight - menuheight;
		ftlObj.y += (pY - startY - ftlObj.y)/8;
		}
    if (ftlObj.y<245) {
      ftlObj.y=245; // instelling top
    }
		ftlObj.sP(ftlObj.x, ftlObj.y);
		setTimeout("stayTopLeft()", 10);
	}
	ftlObj = ml("menusky");
	stayTopLeft();
		
		document.getElementById('menusky').style.display = "block";
}

