/**
 * Module accueil_inits.js
 * @author ArtyMedia Communications (copyright 1997 - 2007)
 */

function center_inits() {
 	// Try to resize page contents according to resolution
	window.moveTo(0,0);    
	if (document.all) 
	{           
		window.resizeTo(screen.availWidth,screen.availHeight);    
	} 
	else 
	{              
		window.outerHeight = screen.availHeight;         
		window.outerWidth = screen.availWidth;       
	}
	
  //--------------center main doc container & fotter according to resolution ------------
	var availWidth = screen.availWidth;
	var availHeight = screen.availHeight;
	var cntnr;
  
    cntnr = document.getElementById('mainLayer');
    cntnr.align = "center";
    
// var coef = 1;
// if (screen.width>1024){
// coef = (screen.width / screen.height);
// if (coef>1.5) coef = (screen.height / screen.width);
// }

	cntnr.style.display = 'none';
	var lft=0.0;
	var tp =0.0;
	
// 	if (coef>1.0)
//      lft = Math.floor( ((availWidth - parseInt(cntnr.style.width,10) ) / 2) / coef );
//   else lft = 130.0;//Math.floor( ((availWidth - parseInt(cntnr.style.width,10) ) / (2 * 1.0) ));
// 	cntnr.style.left = "" + lft + "px";
// 	//alert(cntnr.style.left)
// 	var tp = Math.floor( (availHeight  - parseInt(cntnr.style.height,10) ) / 7);
// 	cntnr.style.top = ""+ tp + "px";
	
	if (screen.width<=1024){
    cntnr.style.left = "0.1pt";
    cntnr.style.top = "0.1pt";
  } else {
    lft =Math.floor((screen.width - 1024)/2);
    tp = Math.floor( (availHeight  - parseInt(cntnr.style.height,10) ) / 7);
    cntnr.style.left = "" + lft + "px";
    cntnr.style.top = ""+ tp + "px";
  }
	
	
	//alert(coef+":"+cntnr.style.left+":"+cntnr.style.top);


	cntnr.style.display = 'block';

} // /////////////

//window.onload=center_inits;
