var IE6 = false /*@cc_on || @_jscript_version < 5.7 @*/;
//if(IE6) window.onresize = center;

var ns4 = (document.layers)? true:false;
var ie4 = (document.all)? true:false;
var dom = (document.getElementById)? true:false;

function getHeight(DivId) {
	if (dom) return (document.getElementById(DivId).offsetHeight);
	if (ie4) return (document.all[DivId].clientHeight);
	if (ns4) return (document.layers[DivId].clip.height);
}
function center() {
	/*var Largeur = (getWindowSize()[0]-990)/2;
	var MainDiv = document.getElementById('Content');
	if(Largeur > 0) MainDiv.style.marginLeft = parseInt(Largeur)+'px';*/
}
function getWindowSize() {
	var MySize = new Array();
	if (window.innerWidth) MySize[0] = window.innerWidth;
	else MySize[0] = document.body.clientWidth;
	if (window.innerHeight) MySize[1] = window.innerHeight;
	else MySize[1] = document.body.clientHeight;
	return MySize;	
}

function getElementsByClass(maClass) {
	var tabRetour = new Array();
	var tabTmp = new Array();
	tabTmp = document.getElementsByTagName("*");
	j=0;
	for (i=0; i<tabTmp.length; i++) {
		if (tabTmp[i].className.indexOf(maClass)!='-1') {
			tabRetour[j]=tabTmp[i];
			j++;
		}
	}
	return tabRetour;
}
function absmiddle() {
	var align = document.getElementsByTagName('*');
	for(i=0; i<align.length; i++) {
		if(align[i].getAttribute("align")=='middle') {
			align[i].setAttribute("align","absmiddle");
		}
	}
}
function ApplyClassToInput() {
	var ListInput=document.getElementsByTagName('input');
	for (var k=0; k<ListInput.length; k++) {
		InputType=ListInput[k].getAttribute('type');
		InputClass=ListInput[k].className;
		ListInput[k].className = InputType;
	}
}
function Headerlihover() {
	var headerLI = document.getElementsByTagName('li');
	for (var i=0; i<headerLI.length; i++) {
		if (navigator.appName == "Microsoft Internet Explorer") {
			headerLI[i].setAttribute("onmouseover",function() { this.className= this.className + ' hover' });
			headerLI[i].setAttribute("onmouseout",function() { this.className = this.className.replace(' hover',''); });
		} else {
			headerLI[i].setAttribute('onmouseover','this.className= this.className + \' hover\'');
			headerLI[i].setAttribute('onmouseout','this.className = this.className.replace(\'hover\',\'\');');
		} 
	}
}
function Headertdhover() {
	var headerTD = document.getElementsByTagName('td');
	for (var i=0; i<headerTD.length; i++) {
		if (navigator.appName == "Microsoft Internet Explorer") {
			headerTD[i].setAttribute("onmouseover",function() { this.className= this.className + ' hover' });
			headerTD[i].setAttribute("onmouseout",function() { this.className = this.className.replace(' hover',''); });
		} else {
			headerTD[i].setAttribute('onmouseover','this.className= this.className + \' hover\'');
			headerTD[i].setAttribute('onmouseout','this.className = this.className.replace(\'hover\',\'\');');
		} 
	}
}
function Headertrhover() {
	var headerTR = document.getElementsByTagName('tr');
	for (var i=0; i<headerTR.length; i++) {
		if (navigator.appName == "Microsoft Internet Explorer") {
			headerTR[i].setAttribute("onmouseover",function() { this.className= this.className + ' hover' });
			headerTR[i].setAttribute("onmouseout",function() { this.className = this.className.replace(' hover',''); });
		} else {
			headerTR[i].setAttribute('onmouseover','this.className= this.className + \' hover\'');
			headerTR[i].setAttribute('onmouseout','this.className = this.className.replace(\'hover\',\'\');');
		} 
	}
}
function GetHeight() {

  	if(window.location !="http://www22.eif.org/index.htm" && window.location !="http://www22.eif.org/" && window.location !="http://www.eif.org/" && window.location !="http://www.eif.org/index.htm")
		{
	var Left = document.getElementById('Gauche');
	var Right = document.getElementById('Droite');
var ArticleBody = document.getElementById('ArticleBody');
		var ArticleBodyH = getHeight('ArticleBody');
ArticleBodyH=ArticleBodyH+100;
	var LeftH = getHeight('Gauche');
	var RightH = getHeight('Droite');

	Right.style.height=ArticleBodyH+'px'; 
	Left.style.height=ArticleBodyH+'px'; 
	
	}
	else
	{
	var Left = document.getElementById('Gauche');
	var Right = document.getElementById('Droite');
	var LeftH = getHeight('Gauche');

	var RightH = getHeight('Droite');

	//if(LeftH<RightH) Left.style.height=RightH+'px';
	//else if(LeftH>RightH) Right.style.height=LeftH-20+'px';
Right.style.height=ArticleBodyH+'px'; 
	Left.style.height=ArticleBodyH+'px'; 

	}
}
function OngletSize() {
	if(getElementsByClass('Onglets')[0]) {
		var div = getElementsByClass('Onglets');
		if(div[0].getElementsByTagName('img')[0]) {
			if(div[0].getElementsByTagName('img')[0].src.indexOf('spacer.gif')) {
				div[0].style.fontSize='0px';
				div[0].style.height='1px';
			}
		}
	}
}

function submitFormListSearch(indicepage,direction){
 document.formList.page.value=indicepage;
 document.formList.action.value='navigateSearch';
 document.formList.direction.value=direction;
 document.formList.submit();
}

function viewCompleteListingSearch(){
	document.formList.action.value='viewSearch';
	document.formList.listing.value='Y';
	document.formList.submit();
}

function viewPageByPageSearch(){
	document.formList.action.value='viewSearch';
	document.formList.listing.value='N';
	document.formList.submit();
}