﻿function hoverRow(whichRow, id)
{
	whichRow.style.backgroundColor = '#575353';
	whichRow.style.cursor = 'pointer';
	document.getElementById(id).src = '/Images/Com/Icons/white_selected_arrow.gif';
	MM_showHideLayers();
}
function unHoverRow(whichRow, id)
{
	document.getElementById(id).src = '/Images/Com/Icons/unselected_arrow.gif';
	whichRow.style.backgroundColor = '#222020';
}

function MM_preloadImages()
{ //v3.0
	var d = document; if (d.images)
	{
		if (!d.MM_p) d.MM_p = new Array();
		var i, j = d.MM_p.length, a = MM_preloadImages.arguments; for (i = 0; i < a.length; i++)
			if (a[i].indexOf("#") != 0) { d.MM_p[j] = new Image; d.MM_p[j++].src = a[i]; } 
	}
}

function MM_swapImgRestore()
{ //v3.0
	var i, x, a = document.MM_sr; for (i = 0; a && i < a.length && (x = a[i]) && x.oSrc; i++) x.src = x.oSrc;
}

function MM_findObj(n, d)
{ //v4.01
	var p, i, x; if (!d) d = document; if ((p = n.indexOf("?")) > 0 && parent.frames.length)
	{
		d = parent.frames[n.substring(p + 1)].document; n = n.substring(0, p);
	}
	if (!(x = d[n]) && d.all) x = d.all[n]; for (i = 0; !x && i < d.forms.length; i++) x = d.forms[i][n];
	for (i = 0; !x && d.layers && i < d.layers.length; i++) x = MM_findObj(n, d.layers[i].document);
	if (!x && d.getElementById) x = d.getElementById(n); return x;
}

function MM_swapImage()
{ //v3.0
	var i, j = 0, x, a = MM_swapImage.arguments; document.MM_sr = new Array; for (i = 0; i < (a.length - 2); i += 3)
		if ((x = MM_findObj(a[i])) != null) { document.MM_sr[j++] = x; if (!x.oSrc) x.oSrc = x.src; x.src = a[i + 2]; }
}


function MM_openBrWindow(theURL, winName, features)
{ //v2.0
	window.open(theURL, winName, features);
}

function MM_showHideLayers()
{ //v3.0

	var args = MM_showHideLayers.arguments;
	var obj = document.getElementById('layer0');

	if (args[2] == "hide")
	{
		obj.style.visibility = "visible";

		var arr = eval("a" + args[3]);

		var markup = '';

		markup = markup + "<div class=\"mapComm\">";
		markup = markup + "     <div style=\"font-size:20px; padding-bottom:6px; padding-top:11px; \">";
		markup = markup + "         <a href=\"" + arr[8] + "\" style=\"color:#FF0000;\">" + arr[1] + "</a>";
		markup = markup + "     </div>";


		markup = markup + "     <div class=\"floatR\" style=\"padding-right:0px; overflow:hidden;\">";
		markup = markup + "         <div class=\"mapcomm_pic\" style=\"padding: 14px 14px 0pt; width: 210px; height: 138px;\">";
		markup = markup + "             <a href=\"" + arr[8] + "\"><img src=\"" + arr[0] + "\" width=\"182\" height=\"112\" border=\"0\"></a>";
		markup = markup + "         </div>";
		markup = markup + "     </div>";

		markup = markup + "     <div>";
		markup = markup + "         <div><span style=\"font-size:12px; font-weight:bold;\">" + arr[6] + "</span><br />";
		markup = markup + "         <span style=\"font-size:12px;\">" + arr[7] + "</span></div>";
		markup = markup + "         <div><span class=\"cityLiveChat\" style=\"height:32px\">" + arr[10] + "</span></div>"; //live chat code
		markup = markup + "         <div style=\"clear:left;\"><span class=\"mapAddress\">";
		markup = markup + "         " + arr[9] + "<br />";
		markup = markup + "         " + arr[3] + ", " + arr[4] + "<br />";
		markup = markup + "         " + arr[5];
		markup = markup + "         </span></div>";
		markup = markup + "     </div>";

		markup = markup + "</div>";

		obj.innerHTML = markup;
	}
}

function hidelayer(layerName)
{
	//alert(layerName);
	//document.getElementById('layer0').style.visibility="visible"; 
	//document.getElementById(layerName).style.visibility="hidden";  
}


var winopts = "scrollbars=no,resizable=yes,height=380,width=550,copyhistory=0,";
var smallwindow = null;
function setEvent()
{
	return false;
}

function historywin(filename)
{
	fileURL = filename;
	if (parseInt(navigator.appVersion) < 4)
	{
		if (smallwindow != null) smallwindow.close();
	}
	timerID = setTimeout('Opener(fileURL)', 100);
}

function Opener(winname)
{
	filename = winname;

	winname = "historywin"

	smallwindow = window.open(filename, winname, winopts)

	if (navigator.appVersion.indexOf("(X11") != -1 || navigator.appVersion.indexOf("(Mac") != -1)
		smallwindow = window.open(filename, winname, winopts)

	if (navigator.appVersion.indexOf("MSIE") == -1)
		smallwindow.mainWin = this;
	WindowFocus();
}

function WindowFocus()
{

	if (navigator.appVersion.indexOf("2.") == -1 && navigator.appVersion.indexOf("MSIE") == -1)
	{
		smallwindow.focus();
	}
}


function heightTest(arg)
{

}

