
window.onload = function WindowLoad() {
//	GetCorner();
//	GetDecHeight();
//	absmiddle();
//	OngletsResis('Onglets');
}

function GetCorner() {
	Corner('Nuage');
}

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 Corner(div) {
	if(document.getElementById(div)) {
		var GetDiv = document.getElementById(div);
		CorderTL = document.createElement('div');
		CorderTR = document.createElement('div');
		CorderBL = document.createElement('div');
		CorderBR = document.createElement('div');
		GetDiv.appendChild(CorderTL).className='tl';
		GetDiv.appendChild(CorderTR).className='tr';
		GetDiv.appendChild(CorderBL).className='bl';
		GetDiv.appendChild(CorderBR).className='br';
	}
	else if(getElementsByClass(div)) {
		var GetDiv = getElementsByClass(div);
		for(i=0; i<GetDiv.length; i++) {
			CorderTL = document.createElement('div');
			CorderTR = document.createElement('div');
			CorderBL = document.createElement('div');
			CorderBR = document.createElement('div');
			GetDiv[i].appendChild(CorderTL).className='tl';
			GetDiv[i].appendChild(CorderTR).className='tr';
			GetDiv[i].appendChild(CorderBL).className='bl';
			GetDiv[i].appendChild(CorderBR).className='br';
		}
	}
}
function GetDecHeight() {
  if (document.getElementById('ColLeft')) {
//	 var ColLeft = document.getElementById('ColLeft').offsetHeight - 80 - 4;
	 var ColLeft = document.getElementById('ColLeft').offsetHeight;
  }
  if (document.getElementById('ColRight')) { 
//	 var ColRight = document.getElementById('ColRight').offsetHeight + 139 + 4 +21;
	 var ColRight = document.getElementById('ColRight').offsetHeight + 80;
  }

  if (ColLeft != null && ColRight != null){
  
  	if(ColLeft<=ColRight) var val = ColRight;
  	else var val = ColLeft;
  	
  	if(val < 445 ) var val = 445;
  	
  	document.getElementById('DecoRight').style.height=val + 80 - 4 + 21 + 'px';
  	document.getElementById('ColLeft').style.height=val + 21 + 'px' ;
  	document.getElementById('ColRight').style.height=val - 139 + 80 - 21 - 4 + 'px';
  }
}

function OngletsResis(IdOnglet) {
	if (document.getElementById(IdOnglet)){
	var ListLi = document.getElementById(IdOnglet).getElementsByTagName('li');
	for (var i=0; i<ListLi.length; i++) {
	var MemoClass = ListLi[i].className;
		eval("ListLi["+i+"].onmouseover = function() { ListLi["+i+"].className='on' };");
		eval("ListLi["+i+"].onmouseout = function() { ListLi["+i+"].className='"+MemoClass+"' };");
		eval("ListLi["+i+"].onclick = function() { ListLi["+i+"].className='on' };");
		eval("ListLi["+i+"].onclick = function() { window.location='"+ListLi[i].firstChild.href+"' };");
	}
}
}

