// JavaScript Document


// GENERIC

function changeLang(language)
{
	var url = document.URL;
	url = url.replace(/\\/g, '/');
	url = url.slice(url.lastIndexOf('/') + 1);
	url = '../' + language + '/' + url;
	window.location = url;
	return false;
}

function changeLangParallel(language)
{
	var url = document.URL;
	url = url.replace(/\\/g, '/');
	url = url.slice(url.lastIndexOf('/') - 23);
	url = '../' + language + '/' + url;
	window.location = url;
	return false;
}

function changeLangBio(language)
{
	var url = document.URL;
	url = url.replace(/\\/g, '/');
	url = url.slice(url.lastIndexOf('/') - 19);
	url = '../' + language + '/' + url;
	window.location = url;
	return false;
}


// FRAME SOURCE

function setIFrameSrc(frame, url)
{ frames[frame].location.href = url; }

function setCalendar()
{ 
	var now = new Date();
	var theDay = new Date();
	theDay.setMonth(8);
	theDay.setDate(9);
	var lastDay = new Date();
	lastDay.setMonth(10);
	lastDay.setDate(8);

	if (now < theDay)
	{ setIFrameSrc('load', '_cal/20090909.html'); }
	else if (now > lastDay)
	{ setIFrameSrc('load', '_cal/20091109.html'); }
	else
	{
		var url =  '_cal/2009';
		url += ((now.getMonth() + 1) < 10)?('0' + (now.getMonth() + 1)):(now.getMonth() + 1);
		url += (now.getDate() < 10)?('0' + now.getDate()):(now.getDate());
		url += '.html';
		setIFrameSrc('load', url); 
	}
}

function setContent()
{
	if (location.search.length > 0){
	url = unescape(location.search.substring(1))
	window.frames["load"].location=url
	}
}

//JUMP MENU

function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

