_ud_seconds = (1000);
_ud_minutes = (_ud_seconds*60);
_ud_hours = (_ud_minutes*60);
_ud_days = (_ud_hours*24);
function UntilDate(d, get, dec)
{
	if (dec==null) dec = 0;
	
	dec = Math.pow(10,dec)

	if (get==null) get = _ud_days;
	
	td = new Date();
	return (Math.round(((Date.parse(d)-Date.parse(td))/(get))*dec))/dec;
}

function displayDate()
{
	var days = UntilDate(new Date("2010/5/1"));
	var cd = new Date();

	var dd = cd.getDate();
	var mm = cd.getMonth()+1;
	var yy = cd.getYear();

	var cd = new Date(yy+"/"+mm+"/"+dd);
	ct = Date.parse(cd);
	cd.setTime(ct+_ud_days);

	var hours = UntilDate(cd,_ud_hours);

	var cd = new Date();
	var hours = 23-cd.getHours();
	var min = 59-cd.getMinutes();
	var sec = 60-cd.getSeconds();

	/* Filling the boxes */
	
	var doc = document;
	var daysBox = doc.getElementById("showdays");
	var hoursBox = doc.getElementById("showhours");
	var minutesBox = doc.getElementById("showminutes");
	var secondsBox = doc.getElementById("showseconds");

	daysBox.innerHTML=days;
	hoursBox.innerHTML=hours;
	minutesBox.innerHTML=min;
	secondsBox.innerHTML=sec;
	
	window.setTimeout("displayDate()",1000);
	
}

function switchLang(id)
{
	if (id != null)
	{
		switch(id)
		{
			case "859": window.location="http://www.holland-expo2010.nl/"; 
			break;
			case "870": window.location="http://www.holland-expo2010.com/"; 
			break;
			case "872": window.location="http://www.holland-expo2010.cn/";
			break;
		}
	}
	return
}

function doSearch()
{
  var el = document.getElementById("SEARCHTXT");
  var idsite = siteid;
  if (idsite == 1)
	searchpageid = 59;
  else if (idsite == 61)
	searchpageid = 113;
  else if (idsite == 121)
	searchpageid = 173;
  if (el!=null) if (el.value != null) if (el.value != "") {
      to(searchpageid,"SEARCH="+el.value);
  }
}
function keydown(e) {
  if (e==null) return;
  try 
  {
    var keyCode = e.keyCode;
  }
  catch(e) 
  {
    alert(e.message);
  }
  if (keyCode==null) keyCode=e.which;
  if (keyCode==13) {
    try 
    {
	    if (e.cancelBubble!=null) e.cancelBubble=true;
	    if (e.returnValue!=null) e.returnValue=false;
	    if (e.keyCode!=null) e.keyCode=0;
	    if (e.which!=null) e.which=0;
    }
    catch(e)
    {
    }
    doSearch();
    return false;
  };
}

