// stripes table cells with contrasting styles, creates some event handlers for mouseover effects
function zebra_stripe_cross_table()
{
    var t = document.getElementById('propertylistview');
    var rows = t.getElementsByTagName('tr');
    for(j=0;j<rows.length;j++) {
	if(j%2 == 0) {
	    cells = rows[j].getElementsByTagName('td');
	    for(k=0;k<cells.length;k++) {
		cells[k].style.cursor = 'pointer';
		links = cells[k].getElementsByTagName('a');
		for(l=0;l<links.length;l++) {
		    links[l].style.color = '#383838';
		    links[l].style.backgroundColor = 'transparent';
		}
		cells[k].onclick = 
		    function (evt) {			
			celllink = this.getElementsByTagName('a');
			window.location=celllink[0].href;			
		    }
		cells[k].onmouseover = 
		    function (evt) {
			this.style.backgroundColor = '#DFEAF2';
		    }
	        if(k%2 == 0) {
		    cells[k].style.backgroundColor = '#F2F2E6';
		    cells[k].onmouseout = 
		    	function (evt) {
			    this.style.backgroundColor = '#F2F2E6';
			}
		}
		else {
		    cells[k].onmouseout = 
		    	function (evt) {
			    this.style.backgroundColor = '#EDEBDC';
			}			
		}	
	    }
	}
	else {
	    cells = rows[j].getElementsByTagName('td');
	    for(k=0;k<cells.length;k++) {
		cells[k].style.cursor = 'pointer';
		links = cells[k].getElementsByTagName('a');
		for(l=0;l<links.length;l++) {
		    links[l].style.color = '#383838';
		    links[l].style.backgroundColor = 'transparent';
		}
		cells[k].onclick = 
		    function (evt) {			
			celllink = this.getElementsByTagName('a');
			window.location=celllink[0].href;			
		    }
		cells[k].onmouseover = 
		    function (evt) {
			this.style.backgroundColor = '#DFEAF2';
		    }
	        if(k%2 == 1) {
		    cells[k].style.backgroundColor = '#F2F2E6';
		    cells[k].onmouseout = 
		    	function (evt) {
			    this.style.backgroundColor = '#F2F2E6';
			}	
		}
		else {
		    cells[k].onmouseout = 
		    	function (evt) {
			    this.style.backgroundColor = '#EDEBDC';
			}			
		}	
	    }
	}	
    }

}   

// stripes list items with contrasting styles
function zebra_stripe_list()
{
    var list1 = document.getElementById('location_specs');
    var list2 = document.getElementById('features_specs');
    var rows1 = list1.getElementsByTagName('li');
    var rows2 = list2.getElementsByTagName('li');
    for(j=0;j<rows1.length;j++) {
	if(j%2 == 0) {
	    rows1[j].style.backgroundColor = '#F2F2E6';
	}
    }
    for(k=0;k<rows2.length;k++) {
	if(j%2 == 0) {
	    rows2[k].style.backgroundColor = '#F2F2E6';
	}
        j++;
    }
}   


function zebra_stripe_links()
{
    var list = document.getElementsByTagName('li');
    for(j=0;j<list.length;j++) {
	if(j%2 == 0) {
	    list[j].style.backgroundColor = '#F2F2E6';
	}
    }
}


function zebra_stripe_offices()
{
    var list = document.getElementsByTagName('li');
    for(j=0;j<list.length;j++) {
	list[j].style.cursor = 'pointer';
	links = list[j].getElementsByTagName('a');
	for(l=0;l<links.length;l++) {
	    links[l].style.color = '#084887';
	    links[l].style.backgroundColor = 'transparent';
	}
	list[j].onclick = 
	    function (evt) {			
		listlink = this.getElementsByTagName('a');
		window.location=listlink[0].href;			
	    }
	list[j].onmouseover = 
	    function (evt) {
		this.style.backgroundColor = '#DFEAF2';
	    }
	if(j%2 == 0) {
	    list[j].style.backgroundColor = '#F2F2E6';
	    list[j].onmouseout = 
		function (evt) {
		    this.style.backgroundColor = '#F2F2E6';
		}	    
	}
	else {
	    list[j].onmouseout = 
		function (evt) {
		    this.style.backgroundColor = '#EDEBDC';
		}	    	    
	}
    }
}

var map = null;

function offices() 
{
    zebra_stripe_offices();
    map = new VEMap('map');
    map.LoadMap(new VELatLong(26.291723, -80.100817), 13, 'r', false);
//    map.LoadMap(new VELatLong(26.331178, -80.074589), 19, 'a', false);
    var dboffice = new VEShape(VEShapeType.Pushpin, new VELatLong(26.316115, -80.087250));
    dboffice.SetTitle('Deerfield Beach Office');
    map.AddShape(dboffice);
    var broffice = new VEShape(VEShapeType.Pushpin, new VELatLong(26.331270, -80.074649));
    broffice.SetTitle('Boca Raton Office');
    map.AddShape(broffice);
//    var lhoffice = new VEShape(VEShapeType.Pushpin, new VELatLong(26.266170, -80.083641));
//    lhoffice.SetTitle('Lighthouse Point Office');
//    map.AddShape(lhoffice);
    var pboffice = new VEShape(VEShapeType.Pushpin, new VELatLong(26.254063, -80.100138));
    pboffice.SetTitle('Pompano Beach Office');
    map.AddShape(pboffice);
}
