// <!-- Draw table
var euForm=null;
document.write('<table width="330" height="130" border="0" cellpadding="5" cellspacing="5" background="http://www.vrijspreker.nl/vs/skins/vrijspreker2007/eusuperstate-small.jpg" bgcolor="#003399"><form name="eutickerform" id="eutickerform"><tr>');
document.write('<td align="left" valign="top" style="font-family: Verdana, Arial, Helvetica, sans-serif; FONT-SIZE: 11px; COLOR: #ffffff; TEXT-DECORATION: none">');
document.write('<p><span style="font-size: 14px; font-weight: bold;">Eurocratie</span><br />');
document.write('Sinds 1 januari 2002 kost het <br />EU-lidmaatschap Nederland ruim:<br />');
document.write('<input style="FONT-SIZE: 9px" align="absTop" size="16" name="cost" />');
document.write('<br />Of per gezin:<br />');
document.write('<input style="FONT-SIZE: 9px" align="absTop" size="16" name="familycost" /><br />');
document.write('(<a style="COLOR: #ffffff;" href="http://www.vrijspreker.nl/wp/2007/09/eu-kosten-ticker/" target="_blank">bron</a>) </p></td>');
document.write('</td></tr></form></table>');

function EuCost()
{
	startdate = new Date()
	starttime = startdate.getTime()

	now(startdate.getFullYear(),startdate.getMonth(),startdate.getDate(),startdate.getHours(),startdate.getMinutes(),startdate.getSeconds())
}

function ChangeValue(number)
{
	var familycosts=(Math.round(number/5791698));
	numberstring =""
	var j=0
	var i=0
	while (number > 1)
	 {
	   numberstring = (Math.round(number-0.5) % 10) + numberstring
	   number= number / 10
	    j++
	    if (number > 1 && j==3) {
			numberstring = "." + numberstring
			j=0}
	    i++
	 }
	 
	familycostsstring =""
	j=0
	i=0
	while (familycosts > 1)
	 {
	   familycostsstring = (Math.round(familycosts-0.5) % 10) + familycostsstring
	   familycosts= familycosts / 10
	    j++
	    if (familycosts > 1 && j==3) {
			familycostsstring = "." + familycostsstring
			j=0}
	    i++
	 }
	 
  familycostsstring = "\u20AC " + familycostsstring;
	numberstring= "\u20AC " + numberstring;
	euForm.cost.value = numberstring;
	euForm.familycost.value = familycostsstring;
}

function now(year,month,date,hours,minutes,seconds)
{
	startdatum = new
	Date(year,month,date,hours,minutes,seconds)
	
	var annualcost2002 = 4467400000.0;
	var annualcost2003 = 4919500000.0;
	var annualcost2004 = 5268800000.0;
	var annualcost = 5268800000.0; // Costs of 2004 propagated
	var costpersecond = annualcost/365.0/24.0/60.0/60.0;
	nd = new Date ();
	Eustartdatum = new Date (2005,1,1);
	var newcost = (nd.getTime() - starttime)/1000;
	totalEucost = annualcost2002+annualcost2003+annualcost2004+((nd.getTime() - Eustartdatum.getTime())/1000*costpersecond); 

	ChangeValue(totalEucost);
	timerID = setTimeout("now(startdatum.getFullYear(),startdatum.getMonth(),startdatum.getDate(),startdatum.getHours(),startdatum.getMinutes(),startdatum.getSeconds())",100)
}

	// Firefox workaround
	function getElementById_s(id){
	var obj = null;
	if(document.getElementById){
		/* Prefer the widely supported W3C DOM method, if
		available:-
		*/
		obj = document.getElementById(id);
	} else if(document.all) {
				/* Emulate getElementById on document.all only browsers. */
		        var tempEl = null, el = document.all[id];
		        if(el){ //document.all returned something.
		            if((!el.id)||(el.id != id)){
		                /* Either this is a collection or the only element
		                   available under the property name provided as the
		                   - id - parameter is a named element:
		                */
		                if(el.length){ //assume it is a collection.
		                    /* But it might be an element with a NAME
		                       corresponding with the id parameter that has
		                       collection-like behaviour such as a form or a
		                       select element so proceed with caution:
		                    */
		                    for(var c = 0;c < el.length;c++){
		                        if((el[c].id)&&(el[c].id == id)){
		                            /* Set tempEl to the first match and
		                               break out of the - for - loop:
		                            */
		                            tempEl = el[c];
		                            break;
		                        }
		                    }
		                    /* el will be set to null if the loop did not
		                       find an element with the corresponding ID
		                       because the default null value of tempEl
		                       will not have changed:
		                    */
		                    el = tempEl;
		                }else{ //only a named element is available for id.
		                    /* getElementById should not return named elements
		                       only an IDed element so set el to null:
		                    */
		                    el = null;
		                }
		            } //else we have our element (the ID matches).
		        }else{ //el is undefined so make it null;
		            el = null;
		        }
		        /* The returned value will be the first element confirmed as
		           having the corresponding ID or it will be null:
		        */
		        return el;
	}
	/* If no appropriate element retrieval mechanism exists on
	this browser this function always returns null:-
	*/
	return obj;
}

euForm=getElementById_s( "eutickerform" );
EuCost();
// -->