var homeDiv;
var text= new Array();
	//initialize teh element of our text
	text[0]="R";
	text[1]="elax in a breathtaking panorama overlooking the islands";
	text[2]="and experience celestial comfort with the modern";
	text[3]="amenities and sumptuous food of Bohol Plaza";
	text[4]="Resort and Restaurant. Live the romance";
	text[5]="of the night with the glitter of stars";
	text[6]="that transforms the view into";
	text[7]="a world of fantasy.";
	
	
var basicText= new Array();	


function homePage(){
var windowWidth, img = new Array();
	homeDiv=createDiv();
	document.body.appendChild(homeDiv);
	windowWidth=getWindowWidth();
	
	for(i=0;i<text.length;i++){
		//create an p element
		basicText[i]=document.createElement("P");
		basicText[i].style.position="absolute";
		basicText[i].style.fontFamily=fontFamily2;
		basicText[i].innerHTML=text[i]
		clearMargins(basicText[i]);
		homeDiv.appendChild(basicText[i]);
		
	}	
		
	homeDiv.resize=resizeHomePage;
	//we load some image
	img[0]="deluxe.jpg"
	img[1]="ambassador.jpg"
	img[2]="family.jpg"
	
	loadImages(img);
	
	return homeDiv;

}

function resizeHomePage(){
var i, windowWidth,topPos, leftPos, width;
	
	windowWidth=getWindowWidth();
	width=bgImage.offsetWidth;
	
	homeDiv.style.width=bgImage.offsetWidth + "px";
	homeDiv.style.height=bgImage.offsetHeight + "px";
	homeDiv.style.left=bgImage.offsetLeft + "px";
	homeDiv.style.top=bgImage.offsetTop + "px";
	//set the style of first letter 
	basicText[0].style.fontSize=Math.round(homeDiv.offsetWidth/20) + "px";
	basicText[0].style.width=Math.round(homeDiv.offsetWidth/25) +"px";

	for(i=1;i<basicText.length;i++){
		//set the font size  for the rest of element
		basicText[i].style.fontSize= Math.round(homeDiv.offsetWidth/40) + "px";	

	}
	xWidth=basicText[0].offsetWidth + basicText[1].offsetWidth;
		
	basicText[0].style.left=Math.round((homeDiv.offsetWidth - xWidth)/2) + Math.round(homeDiv.offsetWidth/7)+ "px";
	basicText[0].style.top=Math.round(bgImage.offsetHeight/1.6) + "px";
	
	//position the second element concatenate of the first element 
	//to be seen like a one line
	basicText[1].style.top = basicText[0].offsetTop + Math.round(homeDiv.offsetWidth/40)+ "px";
	basicText[1].style.left=Math.round(basicText[0].offsetLeft + (basicText[0].offsetWidth/1.3)) + "px";
	
	
	xwidth=Math.round(bgImage.offsetWidth /1.8);	
	for(i=2;i<basicText.length;i++){
		//for the rest of the element the left and top 
		basicText[i].style.top=Math.round(basicText[i-1].offsetTop + basicText[i-1].offsetHeight) + "px";
		basicText[i].style.left=Math.round((xwidth-basicText[i].offsetWidth)/2) + Math.round(xwidth/1.5)+  "px";
	}
	
		
return true;
}