<!--
function changeObjectClass(oObject, oClassName)
{
	document.getElementById(oObject).className = oClassName
}

function showInhouseDetails(ppId)
{
	var vSplit
	var oFind

	for (i = 0; i < vProperties.length; i++)
	{
		vSplit = vProperties[i].split("|")
		if (vSplit[0] == ppId)
		{
			document.getElementById("houseDetails").style.display = "block"
			document.getElementById("houseDetails").style.left = findPosX(document.getElementById("ihprop_photo"))
			document.getElementById("houseDetails").style.top = findPosY(document.getElementById("ihprop_photo")) + 320
			document.getElementById("ihprop_mls").innerHTML = "<B>MLS ID:</B> " + vSplit[0]
			document.getElementById("ihprop_type").innerHTML = "<B>Type:</B> " + vSplit[1]
			document.getElementById("ihprop_listed").innerHTML = "<B>Listed For:</B> $" + formatNumber(vSplit[2], false, false, false, true) + " <A CLASS='red' STYLE='padding-left: 20px' HREF='" + vSplit[3] + "'><B><U>More Details</U></B></A>"
			//document.getElementById("ihprop_desc").innerHTML = "<BR>" + vSplit[10]
			document.getElementById("td" + ppId + "a").style.fontWeight = "bold"
			document.getElementById("td" + ppId + "b").style.fontWeight = "bold"
			//if (vSplit[5] == "sold") {document.getElementById("soldOverlay").style.display = "block"}
			document.getElementById("ihprop_photo").src = "http://mls.outerbeaches.com/obx/" + vSplit[4]

		}
		else
		{
			oFind = document.getElementById("td" + vSplit[0] + "a")
			if (oFind != null)
			{
				oFind.style.fontWeight = "normal"
				oFind.style.fontWeight = "normal"
			}
			oFind = document.getElementById("td" + vSplit[0] + "b")
			if (oFind != null)
			{
				oFind.style.fontWeight = "normal"
				oFind.style.fontWeight = "normal"
			}
		}
	}
	return (false);
}

function NewWindow(mypage, myname, w, h, scroll, url, menubar)
{
	var winl = (screen.width - w) / 2;
	var wint = (screen.height - h) / 2;

	winprops = 'height='+h+',width='+w+',top='+wint+',left='+winl+',scrollbars='+scroll+',resizable=no'
	if (menubar == 'yes') {winprops = winprops + ',menubar=yes'}
	if (url == '')
	{
		win = window.open(mypage, myname, winprops)
	}
	else
	{
		win = window.open(mypage + '&page=' + url, myname, winprops)
		if (!win.opener)
		{
			win.opener = self
		}
	}
	if (parseInt(navigator.appVersion) >= 4) { win.window.focus(); }
}

function correctPNG()
{
	for(var i=0; i<document.images.length; i++)
	{
		var img = document.images[i]
		var imgName = img.src.toUpperCase()
		if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
		{
			img.style.display = "block"
			var imgID = (img.id) ? "id='" + img.id + "' " : ""
			var imgClass = (img.className) ? "class='" + img.className + "' " : ""
			var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
			var imgStyle = "visibility: visible; display:inline-block;" + img.style.cssText 
			if (img.align == "left") imgStyle = "float:left;" + imgStyle
			if (img.align == "right") imgStyle = "float:right;" + imgStyle
			if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle		
			var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";" + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
			img.outerHTML = strNewHTML
			i = i-1
		}
	}
}

function replace(sString, sFind, sReplace)
{
	i = sString.indexOf(sFind);
	r = "";
	if (i == -1) return sString;
	r += sString.substring(0, i) + sReplace;
	if (i + sFind.length < sString.length)
	r += replace(sString.substring(i + sFind.length, sString.length), sFind, sReplace);
	return r;
}

function left(sString, n)
{
	if (n <= 0) {return "";}
	else if (n > String(sString).length) {return sString;}
	else {return String(sString).substring(0, n);}
}

function right(sString, n)
{
	if (n <= 0) {return "";}
	else if (n > String(sString).length) {return sString;}
	else {var iLen = String(sString).length; return String(sString).substring(iLen, iLen - n);}
}

function len(sString)
{
	return String(sString).length;
}

function instr(sString, sFind)
{
	for (iInstr = 0; iInstr < len(sString); iInstr++)
	{
		if (sFind == mid(sString, iInstr, 1))
		{
			return iInstr;
		}
	}
	return -1;
}

function mid(sString, iStart, len)
{
	if (iStart < 0 || len < 0) return "";

	var iEnd
	var iLen = String(sString).length;

	if (iStart + len > iLen)
		iEnd = iLen;
	else
		iEnd = iStart + len;

	return String(sString).substring(iStart, iEnd);
}

function addToFavorites()
{
	if (window.external)
	{
		window.external.AddFavorite(curUrl,curPageName)
	}
	else
	{
		alert("Sorry! Your browser doesn't support this function.");
	}
}

function formatNumber(num, decimalNum, bolLeadingZero, bolParens, bolCommas)
{ 
	if (isNaN(parseInt(num))) return "NaN";

	var tmpNum = num;
	var iSign = num < 0 ? -1 : 1;
	
	tmpNum *= Math.pow(10,decimalNum);
	tmpNum = Math.round(Math.abs(tmpNum))
	tmpNum /= Math.pow(10,decimalNum);
	tmpNum *= iSign;
	
	
	var tmpNumStr = new String(tmpNum);

	if (!bolLeadingZero && num < 1 && num > -1 && num != 0)
	{
		if (num > 0)
			tmpNumStr = tmpNumStr.substring(1,tmpNumStr.length);
		else
			tmpNumStr = "-" + tmpNumStr.substring(2,tmpNumStr.length);
	}
		
	if (bolCommas && (num >= 1000 || num <= -1000))
	{
		var iStart = tmpNumStr.indexOf(".");
		if (iStart < 0) {iStart = tmpNumStr.length;}

		iStart -= 3;
		while (iStart >= 1)
		{
			tmpNumStr = tmpNumStr.substring(0,iStart) + "," + tmpNumStr.substring(iStart,tmpNumStr.length)
			iStart -= 3;
		}		
	}

	if (bolParens && num < 0) {tmpNumStr = "(" + tmpNumStr.substring(1,tmpNumStr.length) + ")";}

	return tmpNumStr;
}

function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

-->