// JavaScript Document
var sampImage;
var fontFamily1="Monotype Corsiva";
function resizeLocation(){
var windowWidth, windowHeight, allResized;
	
	windowWidth=getWindowWidth();	
	windowHeight=getWindowHeight();
	myBorder=Math.round(windowWidth/1000)+"px solid #BF617E";
    myBorderWidth = Math.round(windowWidth/1000);
	
	if (!scaleToWidth(homePic6, mainDiv.offsetWidth)) { return false; }
	if (!myLocation.appendChild(homePic6)) { return false; }
	homePic6.style.position="absolute";
	homePic6.style.visibility="hidden";
//	greenPic.style.height=Math.round(homePic6.offsetHeight) + "px";
	
	//for the title text
	fontSize=Math.round(bodyDiv.offsetWidth/30) + "px";
	if (!myLocation.appendChild(locationTitle)) { return false; }
	locationTitle.style.top=myMargin*3 + "px";
	locationTitle.style.left=myMargin*1.5 + "px";
	locationTitle.style.margin=myMargin + "px";
	locationTitle.style.fontSize=fontSize;
	locationTitle.style.width=Math.round(mainDiv.offsetWidth*0.5) + "px";
	locationTitle.style.position="absolute";
	
	//for the sub title
	fontSize=Math.round(bodyDiv.offsetWidth/70) + "px";
	if (!myLocation.appendChild(locationsubTitle)) { return false; }
	locationsubTitle.style.top=myMargin*8 + "px";
	locationsubTitle.style.left=Math.round(mainDiv.offsetWidth/8) + "px";
	locationsubTitle.style.margin=myMargin + "px";
	locationsubTitle.style.fontSize=fontSize;
	locationsubTitle.style.width=Math.round(mainDiv.offsetWidth*0.5) + "px";
	locationsubTitle.style.position="absolute";
	
	//for the text
	fontSize=Math.round(bodyDiv.offsetWidth/40) + "px";
	if (!myLocation.appendChild(locationTxt)) { return false; }
	locationTxt.style.top=Math.round(homePic6.offsetHeight/5) + "px";
	locationTxt.style.left=Math.round(mainDiv.offsetWidth/11) + "px";
	locationTxt.style.fontSize=fontSize;
	locationTxt.style.position="absolute";
	
	fontSize=Math.round(bodyDiv.offsetWidth/70) + "px";
	if (!myLocation.appendChild(locationTxt1)) { return false; }
	locationTxt1.style.top=Math.round(homePic6.offsetHeight/3.8) + "px";
	locationTxt1.style.left=Math.round(mainDiv.offsetWidth/6.5) + "px";
	locationTxt1.style.fontSize=fontSize;
	locationTxt1.style.position="absolute";
	locationTxt1.style.width=Math.round(mainDiv.offsetWidth*0.4) + "px";
	
	if (!myLocation.appendChild(locationTxt2)) { return false; }
	locationTxt2.style.top=Math.round(homePic6.offsetHeight/3.1) + "px";
	locationTxt2.style.left=Math.round(mainDiv.offsetWidth/11) + "px";
	locationTxt2.style.fontSize=fontSize;
	locationTxt2.style.position="absolute";
	locationTxt2.style.width=Math.round(mainDiv.offsetWidth*0.4) + "px";
	
	fontSize=Math.round(bodyDiv.offsetWidth/40) + "px";
	if (!myLocation.appendChild(locationTxt3)) { return false; }
	locationTxt3.style.top=Math.round(homePic6.offsetHeight/2.7) + "px";
	locationTxt3.style.left=Math.round(mainDiv.offsetWidth/11) + "px";
	locationTxt3.style.fontSize=fontSize;
	locationTxt3.style.position="absolute";
	
	fontSize=Math.round(bodyDiv.offsetWidth/70) + "px";
	if (!myLocation.appendChild(locationTxt4)) { return false; }
	locationTxt4.style.top=Math.round(homePic6.offsetHeight/2.2) + "px";
	locationTxt4.style.left=Math.round(mainDiv.offsetWidth/11) + "px";
	locationTxt4.style.fontSize=fontSize;
	locationTxt4.style.width=Math.round(mainDiv.offsetWidth*0.6) + "px";
	locationTxt4.style.position="absolute";
			
	//for the map
	if (!myLocation.appendChild(map)) { return false; }
	if (!scaleToWidth(map, mainDiv.offsetWidth*0.35)) { return false; }
	map.style.top=myMargin*2 + "px";
	map.style.left=Math.round(mainDiv.offsetWidth/1.7) + "px";
	map.style.position="absolute";

	myLocation.style.height = Math.round(homePic6.offsetHeight) + "px";
				
	myLocation.style.visibility="hidden";
	
	return true;
}

function createlocationPage(){
	//create home page
	myLocation = createDiv();
	myLocation.style.position="absolute";
	clearMargins(myLocation);
	
	loading=displayText("Please wait Loading...");
	loading.style.visibility="hidden";
	loading.style.fontFamily="verdana";
	mainDiv.appendChild(loading);

	//for the detection of the browser in our main picture
	if (browserInfo().browserShortName=="Firefox") {
		
		//alert("Firefox")				
		homePic6 = xImage("images/vista_bg2.jpg");
		homePic6.oncontextmenu=protectImage;
		
	} else { if (browserInfo().browserShortName=="IE") {
	
		//alert("IE")
		homePic6 = xImage("images/vista_bg1.jpg");
		homePic6.oncontextmenu=protectImage;
		homePic6.style.height="620px";		
		}
		else {
			//alert("IE")
		homePic6 = xImage("images/vista_bg1.jpg");
		homePic6.oncontextmenu=protectImage;
		homePic6.style.height="620px";	
		}
	}
	//end of our browser detection
	
	//for the title of the page
	locationTitle= document.createElement("p");
	locationTitle.innerHTML="Vista Verde Village";
	locationTitle.style.fontFamily="monotype corsiva";
	locationTitle.style.textDecoration="underline";
	locationTitle.style.fontWeight="bold";
	
	locationsubTitle= document.createElement("p");
	locationsubTitle.innerHTML="Pueblo de Oro Township, Cagayan de Oro City";
	locationsubTitle.style.fontFamily="verdana";
	locationsubTitle.style.fontWeight="bold";
	
	locationTxt= document.createElement("p");
	locationTxt.innerHTML="Prices";
	locationTxt.style.fontFamily="verdana";
	
	locationTxt1= document.createElement("p");
	locationTxt1.innerHTML="Inner Lot	- 4,150 per sq. m.<br>Corner  Lot	- 4,500 per sq. m.";
	locationTxt1.style.fontFamily="verdana";
	
	locationTxt2= document.createElement("p");
	locationTxt2.innerHTML="Total Allocated Lots = 133 Lots";
	locationTxt2.style.fontFamily="verdana";
	
	locationTxt3= document.createElement("p");
	locationTxt3.innerHTML="Terms of Payments";
	locationTxt3.style.fontFamily="verdana";
	
	locationTxt4= document.createElement("p");
	locationTxt4.innerHTML="1.	Spots cash avail 10% discount<br>2.	30%  outright down payment can avail 10% discount<br>3.	Deffered payment payable up to 30 months @ 0% interest<br>4.	 In-House financing payable up to 4  yrs. ( 50% w/o interest )<br>5.	 Bank financing payable up to 10 years<br>6.	 Pag-ibig financing payable up to 25 years";
	locationTxt4.style.fontFamily="verdana";
	
	//for the map
	map = xImage("images/smallmao.jpg");
	map.oncontextmenu=protectImage;
	map.onclick=basicMenuClick;
	map.id="Map";
	map.onmouseover=onMouseOver;
				
	myLocation.resize=resizeLocation;
		
return myLocation;
}	
