var xmlDoc;
var links = new Array(6);
var version, temp, blnModernIE;

if (document.all) {
    temp = navigator.appVersion.split("MSIE");
    version = parseFloat(temp[1]);
    version >= 6 ? blnModernIE = true : blnModernIE = false;
}
            
//Chnage navigation links href's here:
links[0] = "/listing.htm";
links[1] = "/floorplan.htm";
links[2] = "/amenities.htm";
links[3] = "/community.htm";
links[4] = "/gallery.htm";
links[5] = "/contact.htm";

function Rollover(obj) {
	var path = obj.src;
	var n = path.substr(path.lastIndexOf(".")-1,1);
	(path.indexOf("_over") == -1 ) ? obj.src = "/images/link_over" + n + ".png" : obj.src = "/images/link" + n + ".png";
}

function GoToUrl(i) {
	window.location.href = links[i];
}

function RollIn(obj) {
	obj.style.backgroundImage = "url(/images/lens.png)";
	obj.style.backgroundRepeat = "no-repeat";
	obj.style.filter = "alpha(opacity=20)";
	obj.style.opacity = 0.2;
	obj.style.MozOpacity = 0.2;

}

function RollOut(obj) {
	obj.style.filter = "alpha(opacity=0)";
	obj.style.opacity = 0;
	obj.style.MozOpacity = 0;
}

function DrawNavBar() {
	document.write('<table cellpadding="1" cellspacing="1">'
		+ '	<tr>'
		+ '		<td colspan="7" style="height:118px"><!--Filler--></td>'
		+ '	</tr>'
		+ '	<tr>'
		+ '		<td style="padding-left:105px"></td>'
		+ '		<td class="navCell"><img src="/images/link0.png" style="width:140px;height:23px" onmouseover="Rollover(this)" onmouseout="Rollover(this)" onclick="GoToUrl(0)" /></td>'
		+ '		<td class="navCell"><img src="/images/link1.png" style="width:82px;height:22px" onmouseover="Rollover(this)" onmouseout="Rollover(this)" onclick="GoToUrl(1)" /></td>'
		+ '		<td class="navCell"><img src="/images/link2.png" style="width:74px;height:22px" onmouseover="Rollover(this)" onmouseout="Rollover(this)" onclick="GoToUrl(2)" /></td>'
		+ '		<td class="navCell"><img src="/images/link3.png" style="width:85px;height:22px" onmouseover="Rollover(this)" onmouseout="Rollover(this)" onclick="GoToUrl(3)" /></td>'
		+ '		<td class="navCell"><img src="/images/link4.png" style="width:100px;height:22px" onmouseover="Rollover(this)" onmouseout="Rollover(this)" onclick="GoToUrl(4)" /></td>'
		+ '		<td class="navCell"><img src="/images/link5.png" style="width:83px;height:22px" onmouseover="Rollover(this)" onmouseout="Rollover(this)" onclick="GoToUrl(5)" /></td>'
		+ '	</tr>'
		+ '</table>'
	);
}

function LoadXML(doc) {
	// code for IE
	if (window.ActiveXObject) {
		xmlDoc=new ActiveXObject("Microsoft.XMLDOM");
		xmlDoc.async=false;
		xmlDoc.load(doc);
		return true;
	}
	// code for Mozilla, Firefox, Opera, etc.
	else if (document.implementation && document.implementation.createDocument) {
		xmlDoc=document.implementation.createDocument("","",null);
		xmlDoc.load(doc);
		return false;
	}
	else {
		alert('XML Error: Your browser is too old and will not support the script on this page.');
		return false;
	}
}

function WriteFooter() {
	document.write('<a href="/">Home</a> | '
		+ '<a href="/listing.htm">Prices & Availability</a> | '
		+ '<a href="/floorplan.htm">Floor Plans</a> | '
		+ '<a href="/amenities.htm">Amenities</a> | '
		+ '<a href="/community.htm">Community</a> | '
		+ '<a href="/gallery.htm">Image Gallery</a> | '
		+ '<a href="/contact.htm">Contact Us</a>'
		+ '<br / >'
		+ '&copy; Copyright 2007 Kosh Enterprises'
	);
}
