var newwindow = '';

function popitup(url)
{
	if (newwindow.location && !newwindow.closed)
	{
		newwindow.location.href = url;
	}
	else
	{
		newwindow=window.open(url,'name','width=650,height=650,left=60,top=60');
		if (!newwindow.opener) newwindow.opener = self;
	}
	if (window.focus) {newwindow.focus()}
}

// count up

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec")

function countup(yr,m,d){
		
	var today=new Date()
	var todayy=today.getYear()
		
	if (todayy < 1000)
	todayy+=1900
	var todaym=today.getMonth()
	var todayd=today.getDate()
	var todaystring=montharray[todaym]+" "+todayd+", "+todayy
	var paststring=montharray[m-1]+" "+d+", "+yr
	var difference=(Math.round((Date.parse(todaystring)-Date.parse(paststring))/(24*60*60*1000))*1)

	if (difference > 0 && difference < 16){
	place='Utrecht'
	}
	
	else if (difference > 15 && difference < 30){
	place='Doorn'
	}

	document.write("We zijn nu "+difference+" dagen op reis! We zitten op dit moment in " + place + "!")
}


