fnLocalInit=null;
function fnOpenWindow(url,parameters)
{
	parameters=parameters.replace(/\s+/g,'');

	var aParameters=parameters.split(',');
	var data=new Array();
	for (var i=0;i<aParameters.length;i++) {
		var pr=aParameters[i];
		var key = pr.substr(0,pr.indexOf('='));
		var value=pr.substr(pr.indexOf('=')+1);
		data[key]=value;
	}

	if ( (data['hposition'])&&(data['width'])&&(data['hposition']!='system') )
	{
		var posX=null;
		if (data['hposition']=='left')
		{
			posX=0;
		}
		if ( (window.screen)&&(window.screen.availWidth) )
		{
			if (data['hposition']=='center')
				posX=(window.screen.availWidth-data['width'])/2;
			if (data['hposition']=='right')
				posX=window.screen.availWidth-data['width'];
		}

		if (posX!=null)
			parameters+=",left="+parseInt(posX);
	}

	if ( (data['vposition'])&&(data['height'])&&(data['vposition']!='system') )
	{
		var posY=null;
		if (data['vposition']=='top')
		{
			posY=0;
		}
		if ( (window.screen)&&(window.screen.availHeight) )
		{
			if (data['vposition']=='center')
				posY=(window.screen.availHeight-data['height'])/2;
			if (data['vposition']=='bottom')
				posY=window.screen.availHeight-data['height'];
		}

		if (posY!=null)
			parameters+=",top="+parseInt(posY);
	}


	var oWnd=window.open(url,'',parameters);
	oWnd.focus();
}

glProcessWnd=false;
glProcessSource=null;
function fnProcessSetWnd(mode,source)
{
	glProcessWnd=mode;
	glProcessSource=source;
}
function fnProcess()
{
	if (!glProcessSource)
		return true;

	var oSrc=null;
	if (document.getElementById)
		oSrc=document.getElementById(glProcessSource);
	else
		if (document.all)
			oSrc=document.all[glProcessSource];

	if (!oSrc)
		return true;


	var url = oSrc.options[oSrc.selectedIndex].value;
	if (glProcessWnd) {
		window.open(url,'');
		return false;
	} else {
		var rel=oSrc.options[oSrc.selectedIndex].getAttribute('rel');
		if ( (rel)&&(rel=='bookmark') ) {
			window.open(url,'');
			return false;
		} else {
			var onsubm=oSrc.options[oSrc.selectedIndex].getAttribute('onsubmit');
			if (onsubm) {
				eval(onsubm); return false;
			}
			return true;
		}
	}
}


function setLowIeNav(obj) {
	var navItem = document.getElementById(obj);
	if(!navItem) return;
	var navLiCol = navItem.getElementsByTagName('li');
	for (var i = 0; i < navLiCol.length; i++) {
		if(navLiCol[i].parentNode.parentNode == navItem) {
			navLiCol[i].onmouseover = function () {
				if(/reverse/.test(this.className))
			        addClass(this,'reversehover');
				else
			        addClass(this,'hover');
			}
			navLiCol[i].onmouseout = function () {
				if(/reverse/.test(this.className))
			        removeClass(this,'reversehover');
				else
			        removeClass(this,'hover');
			}
		}
	}
	
	var divCol = document.getElementById('wrapper').getElementsByTagName('span');
	for (var i = 0; i < divCol.length; i++) {
		addClass(divCol[i],'z100');
	}
}

function findPos(obj) {
	var curleft = curtop = 0;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft
		curtop = obj.offsetTop
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft
			curtop += obj.offsetTop
		}
	}
	return [curleft,curtop];
}

function fixIe() {
	
}

/* Tools
---------------------- */
function getById(el) {
	return document.getElementById(el);
}

function getByTag(par,el) {
	var par = (par == '') ? document.body : par;
	return par.getElementsByTagName(el);
}

function addClass(obj,newClass) {
	if(!obj.className.match(new RegExp(newClass)))
		obj.className+=(obj.className.length>0? " ": "") + newClass;
}
	
function removeClass(obj,oldClass) {
	obj.className=obj.className.replace(new RegExp("( ?|^)"+oldClass+"\\b"), "");
}

function getByClass(cla,par,el) {
	var getEls;
	if (/.*native code.*/.test(document.getElementsByClassName)) { 
		getEls = function(cla,par,el) { 
			return par.getElementsByClassName(cla);
		}
	}
	else { 
		getEls = function(cla,par,el) { 
			var tagColl = par.getElementsByTagName(el);
			trimedColl = new Array;
			for (var i = 0; tagColl[i]; i++) {
				if(tagColl[i].className.match(new RegExp(cla)))
					trimedColl[trimedColl.length]=tagColl[i];
			}
			return trimedColl;
		} 
	} 
	getByClass = function(cla,par,el) { 
		var par = (par == '') ? document.body : par;
		var el = (el == '') ? '*' : el;
		return getEls(cla,par,el); 
	}
	return getByClass(cla,par,el);
}

var addEvent = function() {
  if (window.addEventListener) {
    return function(el, type, fn) {
      el.addEventListener(type, fn, false);
    };
  } else if (window.attachEvent) {
    return function(el, type, fn) {
      var f = function() {
        fn.call(el, window.event);
      };
      el.attachEvent('on' + type, f);
    };
  }
}();

function GET_XMLHTTPRequest() {
	var request;
	try{
		request = new ActiveXObject("Microsoft.XMLHTTP");
	}
	catch(ex1){
		try{
			request = new ActiveXObject("Msxml2.XMLHTTP");
		}
		catch(ex2){
			try{
				request = new ActiveXObject("Msxml3.XMLHTTP");
			}
			catch(ex3){
				request = null;
			}
		}
	}
	if(!request && typeof XMLHttpRequest != "undefined"){
		request = new XMLHttpRequest();
	}
	return request;
}

function getStyle(obj,cssRule) {
	if (document.defaultView && document.defaultView.getComputedStyle) {
		getStyle = function(obj,cssRule) {
			return document.defaultView.getComputedStyle(obj, "").getPropertyValue(cssRule);
		};
	}
	else {
		getStyle = function(obj,cssRule) {
			if (obj.currentStyle) {
				cssRule = cssRule.replace(/\-(\w)/g, function (match, p1) {
					return p1.toUpperCase();
				});
				return obj.currentStyle[cssRule];
			}
		};
	}
	return getStyle(obj,cssRule);
}

function createEl(tag,classN,content) {
	var el = document.createElement(tag);
	if(classN&&(classN!='')) el.className = classN;
	if(content&&(content!='')) el.innerHTML = content;
	return el;
}

function findPosition( oElement ) {
	if( typeof( oElement.offsetParent ) != 'undefined' ) {
		for( var posX = 0, posY = 0; oElement; oElement = oElement.offsetParent ) {
			posX += oElement.offsetLeft;
			posY += oElement.offsetTop;
		}
		return [ posX, posY ];
	} else {
		return [ oElement.x, oElement.y ];
	}
}

function getPageY() {
	var docHeight = window.innerHeight || document.documentElement.clientHeight || document.body.clientHeight;
	// Order maters here as for IE 6 documentElement.clientHeight != body.clientHeight
	var docScrollY = document.documentElement.scrollTop || document.body.scrollTop;
	return [docHeight,docScrollY];
}


function setLinks(linkTags){
	var linkCollection = [];
	for (var j = 0; j < linkTags.length; j++) {
		linkCollection[j] = document.getElementsByTagName(linkTags[j]);
		for (var i = 0; i < linkCollection[j].length; i++) {
			if ( linkCollection[j][i].href.indexOf('/group/link/download')!=-1 ) {
				linkCollection[j][i].onclick=trackBinaryDocument;
			}
			else if(/zoom/.test(linkCollection[j][i].getAttribute('rel'))) {
				new Zoom(linkCollection[j][i]);
			}
			else {
				if(/bookmark|external|corporate|sponsor/.test(linkCollection[j][i].getAttribute('rel'))) {
					linkCollection[j][i].onclick = function(e) {
						if (!e) var e = window.event;
						if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey)
							return true;

						window.open(this.href);
						return false;
					}
				}
			}
		}
	}
}


trackBinaryDocumentRequest=null;
function trackBinaryDocument(e)
{	
	var hr=this.href;
	if ( hr.indexOf("?")==-1) return true;
	hr=hr.substr( hr.indexOf("?")+1 );


	trackBinaryDocumentRequest = null;
	try {
		trackBinaryDocumentRequest = new XMLHttpRequest();
	} catch (trymicrosoft) {
		try {
			trackBinaryDocumentRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (othermicrosoft) {
		try {
			trackBinaryDocumentRequest = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (failed) {
			trackBinaryDocumentRequest = null;
		}
		}
	}
	
	if (!trackBinaryDocumentRequest) return true;

	var url="/tools/statDocument?"+hr;
	trackBinaryDocumentRequest.open("GET", url, true);
	trackBinaryDocumentRequest.onreadystatechange = onTrackBinaryDocumentReady;
	trackBinaryDocumentRequest.send(null);

	if (!e) var e = window.event;
	if (e.shiftKey || e.altKey || e.ctrlKey || e.metaKey)
		return true;

	window.open(this.href);
	return false;
}

function onTrackBinaryDocumentReady()
{
	return;
	if (!trackBinaryDocumentRequest) return;
	if (trackBinaryDocumentRequest.readyState != 4) return;
	if (trackBinaryDocumentRequest.status != 200) return;

	eval("binaryStats="+trackBinaryDocumentRequest.responseText);
	if (binaryStats.url) {
		var section=binaryStats.section;
		var subsection=binaryStats.subsection;
		var site=binaryStats.weboramaId;
		var frame=null;
		var channel=null;
		var section_grp=site;
		var subsection_grp=section;
		var content=binaryStats.content;

		var w_compteur = new wreport_counter(section,subsection,site,frame,channel,section_grp,subsection_grp);
		w_compteur.add_content(content);
		w_compteur.count();
	}
}

function playerStatusChange(previousState, newState)
{
}
function getUpdate(typ,pr1,pr2,swf) { 

	if (typ != 'state') return;
	if (pr1 != 2) return;
	
	if (!document.getElementById) return;
	var oContainer=document.getElementById(swf+"-container");
	if (!oContainer) return;
	if (oContainer.getAttribute("stats")) return;
	
	var flv=null;
	var site=null;
	var aParms=oContainer.getElementsByTagName("param");
	for (var i=0;i<aParms.length;i++) {
		if (aParms[i].name=="vw-flv") flv=aParms[i].value;
		if (aParms[i].name=="vw-site") site=aParms[i].value;
	}

	if ( (!flv)||(!site) ) return;
	oContainer.setAttribute("stats",true);
	

	trackBinaryDocumentRequest = null;
	try {
		trackBinaryDocumentRequest = new XMLHttpRequest();
	} catch (trymicrosoft) {
		try {
			trackBinaryDocumentRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (othermicrosoft) {
		try {
			trackBinaryDocumentRequest = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (failed) {
			trackBinaryDocumentRequest = null;
		}
		}
	}
	if (!trackBinaryDocumentRequest) return;

	var url="/tools/statFile?site="+site+"&url="+flv;
	trackBinaryDocumentRequest.open("GET", url, true);
	trackBinaryDocumentRequest.onreadystatechange = onTrackBinaryDocumentReady;
	trackBinaryDocumentRequest.send(null);
};

function VeoliaVideoCallback(action, video) {
	if (action!="play") return;
	var site=null;
	
	var aObjects=document.getElementsByTagName("object");
	var oVid=null;
	for (var i=0; (i<aObjects.length)&&(site==null);i++) {
	
		var aParms=aObjects[i].getElementsByTagName("param");
		var objSite=null; var found=false;
		for (var j=0;j<aParms.length;j++) {
			if ( (aParms[j].name=="vw-flv")&&(aParms[j].value==video) ) found=true;
			if (aParms[j].name=="vw-site") objSite=aParms[j].value;
		}
		
		if (found) site=objSite;
	}
	
	if (!site) return;
	trackBinaryDocumentRequest = null;
	try {
		trackBinaryDocumentRequest = new XMLHttpRequest();
	} catch (trymicrosoft) {
		try {
			trackBinaryDocumentRequest = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (othermicrosoft) {
		try {
			trackBinaryDocumentRequest = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (failed) {
			trackBinaryDocumentRequest = null;
		}
		}
	}
	if (!trackBinaryDocumentRequest) return;

	var url="/tools/statFile?site="+site+"&url="+video;
	trackBinaryDocumentRequest.open("GET", url, true);
	trackBinaryDocumentRequest.onreadystatechange = onTrackBinaryDocumentReady;
	trackBinaryDocumentRequest.send(null);
}

function getUrl(obj) {
	return obj.hash.split('#')[0];
}

function toggleMap(obj) {
	var opCollection = obj.getElementsByTagName('option');
	var currentLocation = getUrl(window.location);
	currentLocation = currentLocation.split("#");
	currentLocation = currentLocation[0];
	window.location = currentLocation+"#"+opCollection[obj.selectedIndex].value;
}

function setMap() {
	var sMap = document.getElementById('site-map');
	if(!sMap) return;
	var mapTitles = sMap.getElementsByTagName('h2');
	lTitles = []; var l = 0;
	rTitles = []; var r = 0;
	for (var i = 0; i < mapTitles.length; i++) {
		if(/left-channel/.test(mapTitles[i].parentNode.parentNode.className)) {
			lTitles[l]=mapTitles[i]; l++;
		}
		if(/right-channel/.test(mapTitles[i].parentNode.parentNode.className)) {
			rTitles[r]=mapTitles[i]; r++;
		}
	}
	if(lTitles.length > 0) {
		select = document.createElement('select');
		select.setAttribute('id','lMapSelector');
		for(var i = 0; i < lTitles.length; i++) {
			option = document.createElement('option');
			option.appendChild(document.createTextNode(lTitles[i].getElementsByTagName('a')[0].childNodes[0].nodeValue));
			lTitles[i].parentNode.setAttribute('id','lMapItem'+i);
			option.setAttribute('value','lMapItem'+i);
			select.appendChild(option);
		}
		select.onchange = function () {
			toggleMap(this);
		}
		document.getElementById('map-placeholder-l').appendChild(select);
	}
	if(rTitles.length > 0) {
		select = document.createElement('select');
		select.setAttribute('id','rMapSelector');
		for(var i = 0; i < rTitles.length; i++) {
			option = document.createElement('option');
			option.appendChild(document.createTextNode(rTitles[i].getElementsByTagName('a')[0].childNodes[0].nodeValue));
			rTitles[i].parentNode.setAttribute('id','rMapItem'+i);
			option.setAttribute('value','rMapItem'+i);
			select.appendChild(option);
		}
		select.onchange = function () {
			toggleMap(this);
		}
		document.getElementById('map-placeholder-r').appendChild(select);
	}

}


/* Overlay
---------------------- */
function Zoom(a) {
	initOverlay();
	this.a = a;
	this.overlay = getById('overlay');
	this.container = getById('overlayContainer');
	this.container.w = 400;
	this.container.h = 250;
	this.a.onclick = function (that) {
        return function () {
            that.click(this.href);
			return false;
        }
    }(this);
}

Zoom.prototype = {
	click: function (file) {
		this.file = file + '&js=true';
		this.overlay.innerHTML = '<span id="loading"></span>';
		getById('loading').style.top = ((getPageY()[0] - 36) / 2) + getPageY()[1] + 'px';
	//	this.changePosition();
		if(getById('ie6overlay'))
			removeClass(getById('ie6overlay'),'hidden');
		removeClass(this.overlay,'hidden');
		removeClass(this.container,'hidden');
		// this.changePosition();
		
		

		
		
		var req = GET_XMLHTTPRequest();
		if (req) {
			req.open("GET", this.file, true);
			req.setRequestHeader('User-Agent','XMLHTTP/1.0');
			req.onreadystatechange = function (that) {
		        return function (aEvt) {
					if (req.readyState != 4) return;
					if (req.status != 200 && req.status != 304) {
						that.handleError(req);
						return;
					}
		            if(req.readyState == 4){
						that.handleRequest(req);
					}
		        }
		    }(this);
			req.send(null);
		}
		else {
			getById('overlayContainer').innerHTML = 'Unable to load content';
			this.createNav();
			this.changePosition();
		}
	},
	changePosition: function () {
		this.container.style.width = this.container.w + 'px';
		this.container.style.height = this.container.h + 'px';
		this.container.style.marginLeft = -(this.container.w)/2 + 'px';
		var t = ((getPageY()[0] - this.container.h) / 2) + getPageY()[1];
		if(t < 0 ) {t = 0;}
		this.container.style.top = t + 'px';
		this.overlay.innerHTML = '';
	},
	handleRequest: function(req) {
		this.container.innerHTML = req.responseText;
		var innerContent = getById('overlayInnerContent');
		if(innerContent) {
			this.createNav();
			this.container.w = innerContent.offsetWidth;
			this.container.h = innerContent.offsetHeight;
			this.changePosition();
		}
	},
	handleError: function(req) {
		this.container.innerHTML = '<strong>Data error :</strong> HTTP error' + req.status + '';
		this.container.w = 400;
		this.container.h = 250;
		this.createNav();
		this.changePosition();
	},
	createNav: function () {
		if(!getById('overlayNav')){
			var div = document.createElement('div');
			div.id = 'overlayNav';
			this.container.appendChild(div);
		}
		this.nav = getById('overlayNav');
		this.nav.items = getByTag(this.nav,'a');
		for(var i = 0; this.nav.items[i]; i++) {
			new Zoom(this.nav.items[i]);
		}
		var aColl = getByTag(this.container,'a');
		for(var i = 0; aColl[i]; i++) {
			if(/zoom/.test(aColl[i].getAttribute('rel')))
			new Zoom(aColl[i]);
		}
		var c = document.createElement('a');
		c.href= "#";
		c.className = "closer";
		c.onclick = function (that) {
	        return function () {
				that.close();
				return false;
			}
		}(this);
		this.closer = this.nav.appendChild(c);
	},
	close: function () {
		addClass(this.container,'hidden');
		addClass(this.overlay,'hidden');
		if(getById('ie6overlay'))
			addClass(getById('ie6overlay'),'hidden');
		this.container.innerHTML = '';
		return false;
	}
}

function toolsHover() {
	var t = getById('tools');
	if(!t) return;
	var liColl = getByTag(t,'li');
	for(var i = 0; liColl[i]; ++i) {
		var s = liColl[i].getElementsByTagName('div')[2];
		if(s)
			s.appendChild(document.createElement('iframe'));
		liColl[i].onmouseover = function() {
			addClass(this,'hover');
			var ifr = this.getElementsByTagName('iframe')[0];
			if(ifr)
				ifr.style.height=ifr.parentNode.offsetHeight+7+'px';
		}
		liColl[i].onmouseout = function() {
			removeClass(this,'hover');
		}
	}
}

function initOverlay () {
	if(!getById('overlay')) {
		var ov = document.createElement('div');
		ov.id = "overlay";
		ov.className = 'hidden';
		ov.style.height = getById('page').offsetHeight + 'px';
		document.getElementsByTagName('body')[0].appendChild(ov);
		/*@cc_on @*/
		/*@if (@_win32)
		newerThanIe6 = eval('document.getElementsByTagName("body")[0].currentStyle.minWidth');
		if (!newerThanIe6) {
			var f = document.createElement('iframe');
			f.id= 'ie6overlay';
			f.className = 'hidden';
			document.getElementsByTagName('body')[0].appendChild(f);
		}
		/*@end @*/
	}
	if(!getById('overlayContainer')) {
		var ovCt = document.createElement('div');
		ovCt.id = "overlayContainer";
		ovCt.className = 'hidden';
		document.getElementsByTagName('body')[0].appendChild(ovCt); 
	}
}


function setFootprint() {
	var fp = getById('footprint');
	if(!fp) return;
	var fpCls = getById('fpCalls');
	var cls = getByClass('call',fpCls,'a');
	new Footprint(fp,cls);
}

function Footprint(fp,cls) {
	this.prt = fp;
	this.cId = -1;
	
	this.callers = cls;
	
	for(var i = 0; cls[i]; ++i) {
		cls[i].cId = i;
		cls[i].onclick = function (that) {
	        return function () {
				return false;
	        }
	    }(this);
		cls[i].onmouseover = function (that) {
	        return function () {
				that.roll(this.cId);
	        }
	    }(this);
		cls[i].onmouseout = function (that) {
	        return function () {
				that.rollOut(this.cId);
	        }
	    }(this);
	}
	
	this.tgts = getByClass('item',getById('fpContent'),'div');
	
	for(var i = 0; this.tgts[i]; ++i) {
		this.tgts.cId=i;
	}
	


}

Footprint.prototype = {
	roll: function(cId) {
		if(cId==this.cId) return;
		if(this.cId>-1)
			removeClass(this.tgts[this.cId],'current');
		addClass(this.tgts[cId],'current');

		this.cId = cId;
	},
	rollOut: function(cId) {

		removeClass(this.tgts[this.cId],'current');

		this.cId = -1;
	}
}

function setFPresults(){
	var fpr = getById('fpResults');
	if(!fpr) return;
	new FPresults(fpr);
}

function FPresults(prt){
	this.prt = prt;
	var cs = getByTag(getById('fpNav'),'a');
	this.calls = cs;
	this.max = cs.length;
	var cr = getByClass('result',getById('fpContents'),'div');
	this.tgts = cr;
	this.cId = 0;
	for(var i = 0; cs[i]; ++i) {
		cs[i].cId = i;
		cr[i].cId = i;
		cs[i].onclick = function (that) {
	        return function () {
				that.swap(this.cId);
				return false;
	        }
	    }(this);
	}
	this.setNav();
}

FPresults.prototype = {
	setNav: function() {
		var nav = createEl('div','fpPaging','<a href="#" class="prev" id="fpPrev">&laquo;</a> <a href="#" class="next" id="fpNext">&raquo;</a>');
		//this.prt.insertBefore(nav,getById('fpContents'));
		getById('fpNav').appendChild(nav);
		this.prev = getById('fpPrev');
		this.prev.onclick = function (that) {
	        return function () {
				that.rotate('prv');
				return false;
	        }
	    }(this);
		this.nxt = getById('fpNext');
		this.nxt.onclick = function (that) {
	        return function () {
				that.rotate('next');
				return false;
	        }
	    }(this);
		
	},
	swap: function(cId){
		if(cId==this.cId) return;
		removeClass(this.calls[this.cId],'current');
		removeClass(this.tgts[this.cId],'current');
		addClass(this.calls[cId],'current');
		addClass(this.tgts[cId],'current');
		this.cId = cId;
	},
	rotate: function(dir) {
		var nId = (dir=='next') ? (this.cId+1 < this.max) ? this.cId+1 : 0 : (this.cId-1 > -1) ? this.cId-1 : this.max-1;
		this.swap(nId);
	}
}


function setFPRotator() {
	var r = getById('fpRotator');
	if(!r) return;
	new FPRotator(r);
}

function FPRotator(prt){
	this.prt = prt;
	this.itms = getByTag(prt,'li');
	this.max = this.itms.length;
	this.cId = 0;
	for(var i = 0; this.itms[i]; ++i) {
		this.itms[i].cId = i;
	}
	this.rotate();
}

FPRotator.prototype = {
	swap: function(){
		var nId = (this.cId+1 < this.max) ? this.cId+1 : 0;
		removeClass(this.itms[this.cId],'current');
		addClass(this.itms[nId],'current');
		this.cId = nId;
	},
	rotate: function(dir) {
		
		this.rTimeout = setTimeout(function (that) {
			return function () {
				that.swap();
				that.rotate();
			}
		}(this), 5000);
		
	}
}


function normalizedForm() {
	var frms=getByClass("normalized","","form");
	for(var i = 0; frms[i]; ++i) {
		frms[i].onsubmit = function (that) {

			var cr=null;
			if (this.elements["cr"]) {
				for (var n=0;n<this.elements["cr"].length;n++) {
					if (this.elements["cr"][n].checked) {
						cr=this.elements["cr"][n].value;
					}
				}
			}
			var yr=null;
			if (this.elements["year"]) {
				for (var n=0;n<this.elements["year"].length;n++) {
					if (this.elements["year"][n].checked) {
						yr=this.elements["year"][n].value;
					}
				}
			}
			var geo=null;
			if (this.elements["geo"]) {
				for (var n=0;n<this.elements["geo"].length;n++) {
					if (this.elements["geo"][n].checked) {
						geo=this.elements["geo"][n].value;
					}
				}
			}

			var sub="";
			if (cr) sub+=cr;
			if (yr) 
				sub+= "?year="+yr;
			else
				if (geo) sub+= "?geo="+geo;
			
			var action=this.getAttribute("action");
			window.location.href=action+sub;


	        	return false;
	    	};
	}
}

/* LangSwitch
----- */
function setRHlang() {
	var c = getByClass('langSwitch',getById('content'),'ul');
	if(c&&c[0]) {
		for(var i = 0; c[i]; ++i) {
			var aC = getByTag(c[i],'a');
			
			var t = c[i].parentNode.nextSibling;
			while(t.nodeType!=1){
				t=t.nextSibling;
			}
			if(/IFRAME/.test(t.nodeName)) {
				new RHlang(t,aC);
			}
		}
	}
}

function RHlang(ifr,aC) {
	this.tgt = ifr;
	this.aColl = aC;
	for(var i = 0; aC[i]; ++i) {

		aC[i].onclick= function(that) {
			return function() {
				that.toggle(this);
				return false;
			}
		}(this);
	}
}

RHlang.prototype={
	toggle: function(a) {
		if(a.href==this.tgt.src)
			return;
		this.tgt.src=a.href;
		for(var i = 0; this.aColl[i]; ++i) {
			removeClass(this.aColl[i],'on');
			addClass(a,'on');
		}
	}
}

function repositionIframes() {
	var rhFrm = getById('fltContainer');
	if(rhFrm) {
		rhFrm.onload = function() {
			window.scroll(0,0);
		}
	}
}

/* Init
-------------------- */
var init = function() {
	if (arguments.callee.done) return;
	arguments.callee.done = true;
	if(!document.getElementsByTagName)
		return;
	addClass(document.getElementById('page'),'scripted');
	setLinks(['a','area']);
	setMap();
	setFootprint();
	setFPresults();
	setFPRotator();
	normalizedForm();
	if (fnLocalInit) fnLocalInit();
	setRHlang();
	repositionIframes();
	
	/*@cc_on @*/
	/*@if (@_win32)
	newerThanIe6 = eval('document.getElementsByTagName("body")[0].currentStyle.minWidth');
	if (!newerThanIe6) {
		setLowIeNav('navigation');
		fixIe();
	}
	setLowIeNav('subnavigation');
	/*@end @*/
}

if (document.addEventListener) {
    document.addEventListener("DOMContentLoaded", init, null);
}
else if (/WebKit/i.test(navigator.userAgent)) {
	var _timer = setInterval(function() {
		if (/loaded|complete/.test(document.readyState)) {
			clearInterval(_timer);
			init();
		}
	}, 10);
}
else {
	/*@cc_on @*/
	/*@if (@_win32)
	document.write("<script id=__ie_onload defer src=javascript:void(0)><\/script>");
	var script = document.getElementById("__ie_onload");
	script.onreadystatechange = function() {
		if (this.readyState == "complete") {
			init();
		}
	};
	/*@end @*/
}
window.onload = init;