// Last change by Guus Ellenkamp, August 9, 2005

// Change by Robert , August 5, 2005

var homeHeader=new Array();
var homeDiv;

function homePage(){

var i;			

	homeDiv=createBasicDiv();
	document.body.appendChild(homeDiv);	
	
	homeDiv.text=new Array();
	homeDiv.header=new Array();
	homeDiv.header[homeDiv.header.length]=appendText(homeHeader1);
	homeDiv.text[homeDiv.text.length]=appendText(homeLine1);
	
//	tblCaption.innerHTML="Aandelenkalender Home";
	
	for(i=0;i<homeDiv.header.length;i++) {
		homeDiv.header[i].style.color="#000000";
		homeDiv.appendChild(homeDiv.header[i]);
	}
	
	for(i=0;i<homeDiv.text.length;i++) {
		homeDiv.text[i].style.color="#000000";
		homeDiv.appendChild(homeDiv.text[i]);
	}	
	homeDiv.resize=resizeHomePage;
//	homeDiv.div=false;
	return homeDiv;
}

function resizeHomePage(){

	var textSize, headerSize, windowWidth, windowHeight, i;	
	
	windowWidth=getWindowWidth();
	windowHeight=getWindowHeight();
	//test();
	textSize=Math.round(windowWidth/80) + "px";
	headerSize=Math.round(windowWidth/60) + "px";
	
	//for our acces to the body so that we can get 
	//the offset style
	
	blueBar=document.getElementById("blueBar");
	yellowBar=document.getElementById("yellowBar");
	leftBack=document.getElementById("leftBack");
	buildingPic=document.getElementById("buildingPic");
	//end 
	
	//the homeDiv style 
	if(typeof(homeDiv)=="object"){
		homeDiv.style.left=Math.round(leftBack.offsetLeft + leftBack.offsetWidth) + "px";
		homeDiv.style.top=Math.round(blueBar.offsetTop + blueBar.offsetHeight) + "px";
		homeDiv.style.width=Math.abs( windowWidth - Math.round(leftBack.offsetLeft + leftBack.offsetWidth + blueBar.offsetHeight)) + "px";	
		homeDiv.style.height=Math.abs(windowHeight - Math.round(blueBar.offsetTop + blueBar.offsetHeight)) + "px";
		
		//for our text
		
		homeDiv.header[0].style.fontSize=headerSize;
		homeDiv.header[0].style.left=Math.round((homeDiv.offsetWidth - homeDiv.header[0].offsetWidth)/2) + "px";		
		homeDiv.header[0].style.top=Math.round(buildingPic.offsetHeight/2) + "px";	
		
			
		homeDiv.text[0].style.fontSize=textSize;
		homeDiv.text[0].style.left=Math.round((homeDiv.offsetWidth - homeDiv.text[0].offsetWidth)/2) + "px";		
		homeDiv.text[0].style.top=Math.round(windowWidth/8) + "px";	
		i=1;
	
	/*	if(!objectReady(lang)){
			return false;
		}
		if(browserSnipper()){
		
			homeDiv.text[0].innerHTML=line1;
		}	*/
		while(i<homeDiv.text.length){
			homeDiv.text[i].style.fontSize=textSize;
			homeDiv.text[i].style.left=Math.round((homeDiv.offsetWidth - homeDiv.text[i-1].offsetWidth)/2) + "px";		
			homeDiv.text[i].style.top=Math.round(homeDiv.text[i-1].offsetTop +  homeDiv.text[i-1].offsetHeight) + "px";	
			
			i++;
		}
		
	}
	return true;
	//end homeDiv style
}	