//    var ie = navigator.userAgent.match(/MSIE\s(\d)+/);
//    if (ie) {
//      var version = parseInt(ie[1]);
//     Prototype.Browser['IE' + version.toString()] = true;
//      Prototype.Browser.ltIE7 = (version < 7) ? true : false;
//    }

	var c = 0;
	var t;
	var timer_is_on = false;

	function doTimer(theImage){
		if(timer_is_on){ stopCount(); }
		timer_is_on = true;
		timedCount(theImage);
	}

	function timedCount(theImage){
	if(document.getElementById(theImage)){
		c++;
		document.getElementById(theImage).style.opacity = c*0.1;
		document.getElementById(theImage).style.filter = "alpha(opacity="+c*10+")";
		if (c*0.1 >= 1){
		stopCount();
		}
		else{
		t=setTimeout("timedCount('"+theImage+"')",0); // Might have to change 'this' to fadeIn.timedCount // setInterval
		}
	}
	}

	function stopCount(){
	clearTimeout(this.t);
	this.timer_is_on=false;
	this.c=0;
	}
	
function getAllCounties(){
var allCounties = ["Baker", "Benton", "Clackamas", "Clatsop", "Columbia", "Coos", "Crook", "Curry", "Deschutes", "Douglas", "Gilliam", "Grant", "Harney", "Hood_River", "Jackson", "Jefferson", "Josephine", "Klamath", "Lake", "Lane", "Lincoln", "Linn", "Malheur", "Marion", "Morrow", "Multnomah", "Polk", "Sherman", "Tillamook", "Umatilla", "Union", "Wasco", "Washington", "Wheeler", "Wallowa", "Yamhill"];
return allCounties;
}

function moveLoader(){
theTable = document.getElementById("loaderTable");
theCanvas = document.getElementById("canvas");
theTopTable = document.getElementById("topTable");
theCanvas.removeChild(theTable);
theTable.style.position = "static";
theTopTable.appendChild(theTable);
document.getElementById("loaderInfo").innerHTML = "Loading zoom images...";
}

function removeLoader(){
	document.getElementById("topTable").innerHTML = "";
}

function pixles(percent, images, imagesLoaded){
	percent = Math.round((102 / images) * (imagesLoaded),0);
	loaderImage = document.getElementById("loader");
	loaderText = document.getElementById("loaderPercent");
	loaderImage.style.background = "#00ff00 url('images/loaderFill.gif') "+percent+"px 0px repeat-y";
	loaderText.innerHTML = "&nbsp;"+(percent-2)+"%";
	if(percent-2 == 100){ removeLoader(); }
}

function getLinkInfo(markerName){
switch(markerName){
case "Baker":
	var baker = {
	  info: {
			mapCoords: [332,156,337,154,341,156,347,154,353,158,358,160,361,160,361,156,381,159,396,165,392,174,379,183,366,200,367,205,356,204,356,199,350,193,343,192,336,190,324,198,311,195,322,179,317,169,326,169,327,163,331,163],
			valid: false,
			cities: [],
			properties: [],
			coordsl: [],
			coordst: [],
			cities: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return baker;
break;
case "Benton":
	var benton = {
	  info: {
			mapCoords: [96,108,105,111,108,112,115,113,117,117,110,118,109,121,107,124,106,133,107,137,97,136,76,128,83,126,85,123,90,123],
			valid: true,
			cities: ["Corvallis"],
			coordsl: [327],
			coordst: [156],
			properties: [["Lancaster_Bridge", "Larson_Commons", "Pickford_Leonard", "South_Corvallis_Townhouses"]],
			info: {
					address: [["3384A NE Oxford Circle", "131 SW Prairie", "2600-2645 SW Leonard St.", "2566 SW Coho E."]],
					cities: [["Corvallis, Or. 97330", "Corvallis, Or. 97330", "Corvallis, Or. 97330", "Corvallis, Or. 97330"]]
				},
			link:  [["txcr/lan.htm", "home/larson.htm", "txcr/pick.htm", "hometxcr/southOne.htm"]],
			phone:	[["(541) 757-0842","(541) 738-8646","(541) 738-8646","(541) 738-8646"]],
			bedroom:[["2, 3 &amp; 4","1, 2 &amp; 3","Studio, 1, 2, 3 &amp; 4","1, 2 &amp; 3"]]
		}
	};
return benton;
break;
case "Clackamas":
	var clackamas = {
	  info: {
			mapCoords: [146,74,153,76,171,82,186,83,187,88,188,97,185,100,186,109,178,110,177,117,171,117,146,108,139,93,141,86,139,83,138,79,143,79],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return clackamas;
break;
case "Clatsop":
	var clatsop = {
	  info: {
			mapCoords: [109,8,127,14,131,21,131,24,125,43,114,41,101,37],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return clatsop;
break;
case "Columbia":
	var columbia = {
	  info: {
			mapCoords: [131,21,139,23,142,27,145,30,147,32,149,33,150,55,147,55,140,50,133,46,129,45,126,44],
			valid: true,
			cities: ["Saint Helens"],
			coordsl: [280],
			coordst: [260],
			properties: [["Crest_Apartments", "Norcrest_Apartments", "Northfork_Apartments", "Woodland_Trail"]],
			info: {
					address: [["244 North 14th Street", "544 N. 10th St.","184 Bradley Street","345 N. 16th Street"]],
					cities: [["Saint Helens, OR 97051", "Saint Helens, OR 97051", "Saint Helens, OR 97051", "Saint Helens, OR 97051"]]
				},
			link: [["rd/crest.htm", "rd/norcrest.htm","rd/northfork.htm", "rd/woodland.htm"]],
			phone:	[["(503) 397-4244","(503) 397-4938","(503) 397-4244","(503) 397-4938"]],
			bedroom:[["1 &amp 2","Studio, 1 &amp; 2","1, 2, &amp; 3","1, 2 &amp; 3"]]
		}
	};
return columbia;
break;
case "Coos":
	var coos = {
	  info: {
			mapCoords: [46,164,62,169,61,175,66,176,64,180,66,183,62,191,66,193,62,201,56,202,50,219,44,218,40,223,34,222,35,210,33,206,28,201,23,199,26,193],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return coos;
break;
case "Crook":
	var crook = {
	  info: {
			mapCoords: [213,153,232,155,229,164,245,167,245,172,249,172,249,178,258,181,254,200,248,199,243,214,224,210,224,204,220,202,221,198,205,194,206,188,196,184,198,174,194,170,197,159,201,160,203,156,211,156],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return crook;
break;
case "Curry":
	var curry = {
	  info: {
			mapCoords: [22,199,27,200,32,205,35,208,34,222,40,223,44,218,50,217,51,219,54,220,53,224,42,234,35,234,33,241,38,244,39,249,40,252,35,257,35,266,17,261,13,249,20,223,21,211,19,204],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return curry;
break;
case "Deschutes":
	var deschutes = {
	  info: {
			mapCoords: [167,150,197,159,194,170,198,175,196,185,207,188,205,194,221,198,221,203,225,205,224,210,240,214,237,219,192,205,175,202,149,193,150,181,159,174,166,165,165,156],
			valid: true,
			cities: ["Redmond"],
			coordsl: [210],
			coordst: [116],
			properties: [["Redmond_Triangle","Wintergreen"]],
			info: {
					address: [["787 NW Canal Blvd.","2050 SW Timber Ave."]],
					cities: [["Redmond, OR 97756","Redmond, OR 97756"]]
				},
			link:   [["rdtxcr/redmon.htm","rdtxcr/winter.htm"]],
			phone:	[["(541) 923-2142", "(541) 548-7816"]],
			bedroom:[["1 &amp; 2","1, 2 &amp; 3"]]
		}
	};
return deschutes;
break;
case "Douglas":
	var douglas = {
	  info: {
			mapCoords: [55,149,65,153,68,149,73,149,77,153,86,162,97,167,96,185,111,187,109,194,125,200,137,202,140,212,139,216,133,225,130,225,127,223,121,228,107,227,98,232,90,233,79,229,74,232,68,231,59,224,53,223,54,220,50,218,56,203,56,202,62,201,66,193,61,191,66,182,63,180,66,176,61,175,62,169,46,162],
			valid: true,
			cities: ["Myrtle_Creek", "Sutherlin", "Roseburg"],
			coordsl: [152, 170, 170],
			coordst: [260, 200, 236],
			properties: [["Meadowlark"],["Terrace_Manor"],["Westview_Commons"]],
			info: {
					address: [["721 SE Meadowlark"],["1051 E. Central"],["1067 Lookingglass Rd."]],
					cities: [["Myrtle Creek, OR 97457"],["Sutherlin, OR 97479"],["Roseburg, OR 97471"]]
				},
			link:   [["rd/meadow.htm"],["rd/terr.htm"],["hudhome/westv.htm"]],
			phone:	[["(541) 863-4972"],["(541) 315-0543"],["(541) 440-3777"]],
			bedroom:[["1 &amp; 2"],["1 &amp; 2"],["1"]]
		}
	};
return douglas;
break;
case "Gilliam":
	var gilliam = {
	  info: {
			mapCoords: [245,83,251,86,269,87,260,116,264,119,264,124,268,128,266,131,236,123,238,120,236,112,242,99,249,98],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return gilliam;
break;
case "Grant":
	var grant = {
	  info: {
			mapCoords: [271,139,333,155,331,164,328,164,327,169,317,170,322,180,311,195,323,198,319,207,319,213,291,205,291,210,254,200,267,149],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return grant;
break;
case "Harney":
	var harney = {
	  info: {
			mapCoords: [248,199,291,210,291,204,319,212,289,337,236,323,247,276,222,271,238,213,244,214],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return harney;
break;
case "Hood_River":
	var hood_river = {
	  info: {
			mapCoords: [185,72,192,70,204,73,205,75,196,101,186,98,188,93,186,84,183,79],
			valid: true,
			cities: ["Cascade_Locks"],
			coordsl: [159],
			coordst: [60],
			properties: [["Columbia_View"]],
			info: {
					address: [["40 SW Wasco St."]],
					cities: [["Cascade Locks, OR 97014"]]
				},
			link:   [["rd/columbia.htm"]],
			phone:	[["(541) 506-1718"]],
			bedroom:[["1 &amp 2"]]
		}
	};
return hood_river;
break;
case "Jackson":
	var jackson = {
	  info: {
			mapCoords: [74,232,78,230,92,233,100,232,107,228,122,228,103,286,62,274],
			valid: true,
			cities: ["Medford"],
			coordsl: [171],
			coordst: [173],
			properties: [["Stevens_Place", "Sky_Vista", "Lithia"]],
			info: {
					address: [["1105 Stevens St.","1916 Homeview Drive","1916 Homeview Drive"]],
					cities: [["Medford, OR 97504","Medford, OR 97504","Medford, OR 97504"]]
				},
			link:   [["hometxcr/stev.htm","hometxcr/skyvista.htm","hometxcr/lithia.htm"]],
			phone:	[["&#40;541&#41; 857&#45;0616","&#40;541&#41; 245&#45;9218","&#40;541&#41; 245&#45;9218"]],
			bedroom:[["1, 2, 3 &amp; 4","1, 2, &amp; 3","1 &amp; 2"]]
		}
	};
return jackson;
break;
case "Jefferson":
	var jefferson = {
	  info: {
			mapCoords: [173,124,178,124,237,141,232,155,212,151,210,156,202,155,201,160,166,150,169,139,175,132,175,128],
			valid: true,
			cities: ["Madras"],
			coordsl: [202],
			coordst: [179],
			properties: [["Jefferson_Court","Willow_Creek"]],
			info: {
					address: [["319 SW G St.","410 NE Oak St."]],
					cities: [["Madras, OR 97741","Madras, OR 97741"]]
				},
			link:   [["rd/jeffc.htm","rdtxcr/will.htm"]],
			phone: [["&#40;541&#41; 475&#45;7554","&#40;541&#41; 475&#45;2028"]],
			bedroom:[["1 &amp; 2","1, 2 &amp; 3"]]
		}
	};
return jefferson;
break;
case "Josephine":
	var josephine = {
	  info: {
			mapCoords: [54,225,60,225,67,231,74,232,62,274,34,266,35,256,41,251,38,249,38,244,33,240,36,234,41,235],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return josephine;
break;
case "Klamath":
	var klamath = {
	  info: {
			mapCoords: [149,193,175,202,158,255,180,262,166,304,103,285,122,227,127,223,131,225,134,224,140,213,137,202,139,197],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return klamath;
break;
case "Lake":
	var lake = {
	  info: {
			mapCoords: [174,201,237,219,222,272,249,277,243,290,236,324,196,314,190,310,166,304,179,261,158,254],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return lake;
break;
case "Lane":
	var lane = {
	  info: {
			mapCoords: [67,125,90,133,100,136,106,136,107,144,111,146,116,146,119,143,139,153,142,152,165,157,166,166,159,175,150,182,149,193,141,195,137,203,109,194,110,188,96,184,97,168,85,162,72,149,64,152,54,149,66,124],
			valid: true,
			cities: ["Creswell","Lowell","Junction_City","Eugene","Oakridge","Florence"],
			coordsl: [212,248,190,212,276,60],
			coordst: [216,214,126,184,256,118],
			properties: [["Camas"],["Covered_Bridge"],["Eric_Park","Norsemen_Village"],["Firwood_Manor","Richardson_Bridge"],["Ironwood_Village"],["Laurelwood_Homes","Munsel_Park","New_Winds","Siuslaw_Dunes"]],
			info: {
					address: [["420 S. 2nd St."],["501 N. Moss St."],["292 Oak St.","920 W. 1st Ave."],["1877 Brewer Ave","1210 Acorn Park St."],["47537 Teller Rd."],["1137 Maple St.","2021 E. 12th St.","750 Laurel Street","1750 W. 43rd St."]],
					cities: [["Creswell, OR 97426"],["Lowell, OR 97452"],["Junction City, OR 97448","Junction City, OR 97448"],["Eugene, OR 97401","Eugene, OR 97402"],["Oakridge, OR 97463"],["Florence, OR 97439","Florence, OR 97439","Florence, OR 97439","Florence, OR 97439"]]
				},
			link:   [["rdhome/camas.htm"],["rd/cove.htm"],["rd/eric.htm","rd/nors.htm"],["HUD/firwood.htm","txcr/richardsonbridge.htm"],["rdhome/iron.htm"],["PHA/laurelwood.htm","hometxcrrd/muns.htm","txcr/newwinds.htm","HUD/sius.htm"]],
			phone:	[["(541) 895-3990"],["(541) 937-2621"],["(541) 998-3935","(541) 998-2236"],["(541) 687-0946","(541) 484-7368"],["(541) 782-3714"],["(541) 902-0691","(541) 997-2661","(541) 902-2265","(541) 997-6036"]],
			bedroom:[["1 &amp; 2"],["1, 2 &amp; 3"],["1 &amp; 2","Studio, 1 &amp; 2"],["2, 3, &amp; 4","2 &amp; 3"],["1, 2 &amp; 3"],["1, 2, 3 &amp; 4","1 &amp; 2","1","1, 2 &amp; 3"]]
		}
	};
return lane;
break;
case "Lincoln":
	var lincoln = {
	  info: {
			mapCoords: [83,81,96,84,96,90,92,102,97,108,90,123,86,123,83,126,79,126,75,128,66,125,73,107,80,90],
			valid: true,
			cities: ["Lincoln_City","Newport","Waldport"],
			coordsl: [210,186,142],
			coordst: [100,167,277],
			properties: [["Jetty"],["Newport North &amp; South"],["Sa-Da-Munn"]],
			info: {
					address: [["426 SE Jetty Ave."],["116 NW 60th St."],["485 SW Willow"]],
					cities: [["Lincoln City, OR 97367"],["Newport, OR 97365"],["Waldport, OR 97394"]]
				},
			link:   [["rdtxcr/jetty.htm"],["hometxcr/newport.htm"],["rd/sada.htm"]],
			phone:	[["(541) 994-5115"],["(541) 265-8860"],["(541) 563-3508"]],
			bedroom:[["1 &amp; 2"],["1, 2 &amp; 3"],["Studio, 1 &amp; 2"]]
		}
	};
return lincoln;
break;
case "Linn":
	var linn = {
	  info: {
			mapCoords: [117,111,122,115,134,114,141,116,151,122,160,128,167,131,175,130,174,135,169,141,165,151,165,157,142,152,139,153,118,143,115,147,111,146,106,143,107,122,111,118,117,117,116,112],
			valid: true,
			cities: ["Lebanon","Sweet_Home","Harrisburg"],
			coordsl: [135,165,58],
			coordst: [156,206,230],
			properties: [["Anderlik_Manor"],["Linnhaven","Stonebrook"],["Sommerville"]],
			info: {
					address: [["780 W. Grant Street"],["1220 23rd Ave.","300 W Holly Rd."],["885 Sommerville Loop"]],
					cities: [["Lebanon, OR 97355"],["Sweet Home, OR 97386","Sweet Home, OR 97386"],["Harrisburg, OR 97446"]]
				},
			link:   [["rd/ander.htm"],["rd/linn.htm","rd/ston.htm"],["hometxcr/somm.htm"]],
			phone:	[["(541) 259-3949"],["(541) 367-4880","(541) 367-4437"],["(541) 995-8681"]],
			bedroom:[["1"],["Studio, 1, &amp; 2","1 &amp; 2"],["2 &amp; 3"]]
		}
	};
return linn;
break;
case "Malheur":
	var malheur = {
	  info: {
			mapCoords: [321,198,326,198,337,190,341,192,350,192,357,200,357,205,367,206,378,218,370,233,364,252,342,349,289,337],
			valid: true,
			cities: ["Vale"],
			coordsl: [282],
			coordst: [100],
			properties: [["Malheur_Village"]],
			info: {
					address: [["855 W. A St."]],
					cities: [["Vale, OR 97918"]]
				},
			link:   [["rd/malh.htm"]],
			phone:	[["(541) 473-3803"]],
			bedroom:[["1 &amp; 2"]]
		}
	};
return malheur;
break;
case "Marion":
	var marion = {
	  info: {
			mapCoords: [133,83,135,82,142,86,139,93,146,108,169,117,177,118,176,124,173,124,175,127,175,131,168,131,149,121,137,114,121,114,116,111,116,103,125,97,125,91,128,91],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return marion;
break;
case "Morrow":
	var morrow = {
	  info: {
			mapCoords: [267,86,294,85,290,105,297,107,296,111,302,115,292,144,265,136,265,130,268,127,263,123,263,118,259,116],
			valid: true,
			cities: ["Irrigon","Boardman"],
			coordsl: [272,200],
			coordst: [54,44],
			properties: [["Irrigon_Farm-Labor"],["Morrow_Estates","Trail"]],
			info: {
					address: [["Mailing: P.O. Box 970"],["212 Anderson Circle NE","295 NE Boardman Ave."]],
					cities: [["Boardman, OR 97818"],["Boardman, Or. 97818","Boardman, OR 97818"]]
				},
			link:   [["rd/irrigon.htm"],["home/morrow.htm","rd/trail.htm"]],
			phone:	[["(541) 481&#45;2855"],["(541) 481&#45;2855","(541) 481&#45;9464"]],
			bedroom:[["2, 3 &amp; 4"],["1, 2, 3 &amp; 4","1 &amp; 2"]]
		}
	};
return morrow;
break;
case "Multnomah":
	var multnomah = {
	  info: {
			mapCoords: [143,55,151,56,151,62,166,72,188,71,184,74,184,77,184,80,185,83,170,82,145,73,146,67,143,60],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return multnomah;
break;
case "Polk":
	var polk = {
	  info: {
			mapCoords: [96,84,116,88,126,91,125,98,116,104,117,112,109,111,96,106,92,101],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return polk;
break;
case "Sherman":
	var sherman = {
	  info: {
			mapCoords: [227,83,245,82,249,98,242,99,237,110,236,117,238,120,237,124,234,123,225,119,224,114,216,107,217,103,221,103,229,94],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return sherman;
break;
case "Tillamook":
	var tillamook = {
	  info: {
			mapCoords: [99,38,124,44,124,49,118,49,121,52,123,54,122,57,117,59,110,77,97,73,95,80,96,83,83,81],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return tillamook;
break;
case "Umatilla":
	var umatilla = {
	  info: {
			mapCoords: [293,85,320,84,357,95,356,105,352,106,352,112,347,112,345,125,340,125,339,128,332,125,330,129,325,127,317,126,318,138,321,139,319,151,292,144,302,114,296,111,296,106,290,104],
			valid: true,
			cities: ["Hermiston","Milton_Freewater","Pendleton"],
			coordsl: [123,307,172],
			coordst: [67,82,128],
			properties: [["Applewood_village"],["Orchard_Homes"],["Terwilliger"]],
			info: {
					address: [["549 NW 12th Place"],["311 N. Elizabeth"],["245 SW 5th St."]],
					cities: [["Hermiston, Oregon 97838"],["Milton Freewater, OR 97862"],["Pendleton, OR 97801"]]
				},
			link:   [["hometxcr/applewood.htm"],["rd/orch.htm"],["HUD/terw.php"]],
			phone:	[["(541) 567-1400"],["(541) 938-6661"],["(541) 276-0416"]],
			bedroom:[["1, 2, &amp; 3"],["1, 2, 3 &amp; 4"],["1"]]
		}
	};
return umatilla;
break;
case "Union":
	var union = {
	  info: {
			mapCoords: [352,105,356,105,357,103,366,106,362,116,364,120,360,127,365,127,363,138,367,140,368,149,369,151,378,154,377,158,362,156,362,161,352,158,348,154,342,155,337,152,332,154,325,153,319,150,321,138,318,137,317,127,325,127,330,128,331,125,340,128,340,125,345,125,347,112,351,112],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return union;
break;
case "Wasco":
	var wasco = {
	  info: {
			mapCoords: [206,74,211,76,219,83,228,83,227,89,228,96,221,103,217,103,216,109,225,115,224,119,236,124,234,129,234,135,236,141,176,123,178,110,186,110,185,99,188,97,196,101],
			valid: true,
			cities: ["The_Dalles"],
			coordsl: [240],
			coordst: [77],
			properties: [["Commodor_II"]],
			info: {
					address: [["312 Court Street"]],
					cities: [["The Dalles, OR 97058"]]
				},
			link:   [["txcr/commodor.htm"]],
			phone:	[["(541) 298-7600"]],
			bedroom:[["Studio &amp; 1"]]
		}
	};
return wasco;
break;
case "Washington":
	var washington = {
	  info: {
			mapCoords: [124,45,136,49,146,55,143,56,141,58,143,60,144,65,146,68,144,73,144,78,139,79,134,73,116,64,118,58,122,57,123,53,119,49,123,49],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return washington;
break;
case "Wheeler":
	var wheeler = {
	  info: {
			mapCoords: [235,124,238,123,265,131,265,137,271,139,258,181,248,178,249,172,244,171,245,167,229,164,237,141,233,135],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return wheeler;
break;
case "Wallowa":
	var wallowa = {
	  info: {
			mapCoords: [356,95,395,103,402,103,405,113,409,119,416,124,417,135,397,165,377,158,377,154,368,150,366,139,362,138,364,127,361,126,363,120,361,114,366,106,356,103],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return wallowa;
break;
case "Yamhill":
	var yamhill = {
	  info: {
			mapCoords: [115,64,134,74,139,78,139,83,133,82,127,91,100,84,95,79,98,74,110,77],
			valid: false,
			cities: [],
			coordsl: [],
			coordst: [],
			properties: [],
			info: {
					address: [],
					cities: []
				},
			link:   [],
			phone:	[],
			bedroom:[]
		}
	};
return yamhill;
break;
}
}

var Preloader = {
  callbacks: [],
  images: [],
  loadedImages: [],
  imagesLoaded: 0,

  add: function(image){
    if (typeof image == 'string') this.images.push(image);
    if (typeof image == 'array' || typeof image == 'object'){
      for (var i=0; i< image.length; i++){
        this.images.push(image[i]);
      }
    }
  },
  onFinish: function(func){
    if (typeof func == 'function') this.callbacks.push(func);
    if (typeof func == 'array' || typeof func == 'object'){
      for (var i=0; i< func.length; i++){
        this.callbacks.push(func[i]);
      }
    }
  },
  load: function(){
    for(var i=0; i<this.images.length; i++){
      this.loadedImages[i] = new Image();
      this.loadedImages[i].onload = function(){ Preloader.checkFinished.apply(Preloader); };
      this.loadedImages[i].src = this.images[i];
    }
  },

  checkFinished: function(){
    this.imagesLoaded++;
	pixles(0, this.images.length, this.imagesLoaded);
    if (this.imagesLoaded == this.images.length){ this.fireFinish(); }
  },
  
  fireFinish: function(){
    this.images = [];
    this.loadedImages = [];
    this.imagesLoaded = 0;
    for (var i=0; i<this.callbacks.length; i++){
      this.callbacks[i]();
    }
    this.callbacks = [];
  }
};

function pageLoad(){
	var allCounties = getAllCounties();
	var thePreLoadImages = [];
	var theLargePreLoadImages = [];
	for(var i=0;i<=allCounties.length-1;i++){
		theLargePreLoadImages[i] = "images/"+allCounties[i]+".gif";
	}
	for(var i=0;i<=allCounties.length-1;i++){
		thePreLoadImages[i] = "images/"+allCounties[i]+"_M.gif";
	}
	moreImages = ['images/btn_home_dn1.jpg','images/btn_about_dn1.jpg','images/btn_contact_dn1.jpg','images/btn_products_dn1.jpg','images/btn_support_dn1.jpg','images/foreground.gif','images/tab2.gif','images/tab3.gif'];
	for(var i=0;i<=moreImages.length-1;i++){
		thePreLoadImages.push(moreImages[i]);
	}
	var preLoaderLoad = function(){fullMap(), moveLoader(), Preloader.add(theLargePreLoadImages), Preloader.load()};
	Preloader.add(thePreLoadImages);
	Preloader.onFinish(preLoaderLoad);
	Preloader.load();
	document.getElementById("tab1Link").onmousedown =  function() { closeImage(); };
	document.getElementById("tab2Link").onmousedown = function() { showAllCities(); };
}

var fullMap = function(){
var allCounties = getAllCounties();
var theElement = document.getElementById("zoom_content");
theElement.style.opacity = 0;
theElement.style.filter = "alpha(opacity=0)";
doTimer("zoom_content");
var mapContent = "<img src='images/foreground.gif' usemap='#OregonMap' style='border: none; width:426px; height:360px; filter:alpha(opacity=0); opacity:0;' name='Oregon' id='Oregon' /><map name='OregonMap' id='OregonMap'>";
for(var i=0;i<=allCounties.length-1;i++){
	if(getLinkInfo(allCounties[i]).info.valid){
		mapContent += "<area shape='poly' href='' style='border:0px none;' id='"+allCounties[i]+"' coords='"+getLinkInfo(allCounties[i]).info.mapCoords+"' onMouseOver='countyHighlight(true, this.id);' onMouseOut='countyHighlight(false, this.id);' onMouseDown='showImage(this.id);' />";
	}
}
mapContent += "</map>";
theElement.innerHTML = "";
theElement.innerHTML = mapContent;

var linkContent = "";
var properties = 0;
var tempVar = [];
for(var i=0;i<=allCounties.length-1;i++){
	tempVar = getLinkInfo(allCounties[i].toString()).info.properties;
	for(var x=0;x<=tempVar.length-1;x++){
	properties = (properties+tempVar[x].length);
	}
	if(getLinkInfo(allCounties[i]).info.valid){
		linkContent += "<a id='"+allCounties[i]+"Link' class='countyLink' onMouseOver='countyHighlight(true, this.id);' onMouseOut='countyHighlight(false, this.id);' onmousedown='showImage(this.id);'><div style='width:74%; position:relative; text-align:left; float:left;'>"+allCounties[i].replace("_", " ").toString()+"</div><div style='position:relative; text-align:right; float:right;'>&#40;"+properties+"&#41;</div>"+"</a>";
		properties = 0;
	}
}
var theLinkElement = document.getElementById("info_content");
theLinkElement.innerHTML = "";
theLinkElement.innerHTML = linkContent;
};

function countyHighlight(ColorNo, countyName){
countyName = countyName.replace("Link", "");
	if(document.getElementById("Oregon")){
	var contentReplace = document.getElementById('zoom_content');
	contentReplace.style.opacity = 1;
	contentReplace.style.filter = "alpha(opacity=100)";
		if (ColorNo){
			if (document.getElementById("textDiv")){
				delTextDiv("countyInfo");
			}

	// *********** County Name Div (textDiv) *********** //
		var imageSRC = document.getElementById("Oregon").src;
		result = imageSRC.search(countyName);
		if(result <= 0){
			var theTextDiv = document.createElement("div");
			theTextDiv.id = "textDiv";
			document.getElementById("countyInfo").appendChild( theTextDiv );
//			textDiv.style.position='absolute';
//			textDiv.style.top = "30px";
//			textDiv.style.left = "30px";
			theTextDiv.innerHTML = '<table id="countyName" style="border: 1px solid blue; border-collapse:collapse;"><tr><td style="font: bold 15px arial, helvetica, sans-serif; color: green;">'+countyName.replace("_", " ").toString()+'</td></tr></table>';
		}
		
		// *********** Change Foreground Image *********** //
		document.getElementById("Oregon").style.opacity = 0;
		document.getElementById("Oregon").style.filter = "alpha(opacity="+0+")";
		document.getElementById("Oregon").src = "images/"+countyName+"_M.gif";
		doTimer("Oregon");

		// ******** Highlight Left Text Link ******** //
	//	theLink = document.getElementById(countyName+"Link");
	//	theLink.style.background = "yellow";
		}
		else{
		// ******** Change Foreground Image Back ******** //
		delTextDiv("countyInfo");
		document.getElementById("Oregon").src = "images/foreground.gif";

		// ******** UnHighlight Left Text Link ******** //
	//	theLink = document.getElementById(countyName+"Link");
	//	theLink.style.background = "none";
		}
	}
}

function setInfo(theCounty){
	var allArea = getLinkInfo(theCounty);
	var linkContent = [];
	var theLinkElement = document.getElementById("info_content");
	theLinkElement.innerHTML = "";
	var neededInfo = [];
	for(var i=0;i<=allArea.info.cities.length-1;i++){
		if(allArea.info.valid){
			neededInfo[i] = allArea.info.cities[i].toString()+"!"+i+"!"+theCounty.toString()+"!"+allArea.info.properties[i].length.toString()+"!";
		}
	}
	i=0;
	neededInfo.sort();
	var splitVar = [];
	for(i=0;i<=neededInfo.length-1;i++){
		splitVar = neededInfo[i].split("!",4);
		linkContent[i] = document.createElement('a');
		linkContent[i].id = splitVar[0]+"!"+splitVar[1]+"!Link"+splitVar[2]+"!";
		//linkContent[i].class = "countyLink";
		linkContent[i].onmouseover = showCityName;
		linkContent[i].onmouseout = function() { delPropertyInfoDiv('zoom_content'); };
		linkContent[i].onmousedown = showPropertyInfoTab;
		linkContent[i].innerHTML = "<div style='width:74%; position:relative; text-align:left; float:left;'>"+splitVar[0].replace("_", " ").toString()+"</div><div style='position:relative; text-align:right; float:right;'>&#40;"+splitVar[3].toString()+"&#41;</div>";
		theLinkElement.appendChild(linkContent[i]);
	}
}

function showAllCities(){
	document.getElementById("tab").style.backgroundImage = "url('images/tab2.gif')";
	var counties = getAllCounties();
	var allArea = [];
	var linkContent = [];
	var theLinkElement = document.getElementById("info_content");
	var neededInfo = [];
	var q = 0;
	theLinkElement.innerHTML = "";
	for(var i=0;i<=counties.length-1;i++){
		allArea[i] = getLinkInfo(counties[i]);
		if(allArea[i].info.valid){
			for(var x=0;x<=allArea[i].info.cities.length-1;x++){
				neededInfo[q] = allArea[i].info.cities[x]+"!"+x+"!"+counties[i]+"!"+allArea[i].info.properties[x].length;
				q++;
			}
		}
	}
	neededInfo.sort();
	var splitVar = [];
	for(var y=0;y<=neededInfo.length-1;y++){
		splitVar = neededInfo[y].split("!",4);
		//linkContent[y] = document.createElement('a');
		//linkContent[y].id = splitVar[0]+"!"+splitVar[1]+"!Link"+splitVar[2]+"!";
		//linkContent[i].class = "countyLink";
		//linkContent[y].onmouseover = showCityName;
		//linkContent[y].onmouseout = function() { delPropertyInfoDiv('zoom_content'); };
		theLinkElement.innerHTML += "<a id='"+splitVar[2]+splitVar[1]+"Link!' class='countyLink' onMouseOver='countyHighlight(true, \""+splitVar[2]+"\");' onMouseOut='countyHighlight(false, \""+splitVar[2]+"\");' onmousedown='showImage(\""+splitVar[2]+"\");'><div style='width:74%; position:relative; text-align:left; float:left;'>"+splitVar[0].replace("_", " ").toString()+"</div><div style='position:relative; text-align:right; float:right;'>&#40;"+splitVar[3]+"&#41;</div>"+"</a>";
		//linkContent[y].innerHTML = "<div style='width:75%; position:relative; text-align:left; float:left;'>"+splitVar[0].replace("_", " ").toString()+"</div><div style='position:relative; text-align:right; float:right;'>&#40;"+splitVar[3].toString()+"&#41;</div>";
		//theLinkElement.appendChild(linkContent[y]);
		//document.getElementById(splitVar[2]+splitVar[1]+"Link!").onmousedown = showPropertyInfoTab;
	}
}

function showPropertyInfoTab(){
delPropertyInfoDiv("zoom_content");
var tempVar = this.id.replace("Link","");
tempVar = tempVar.split("!",3);
var cityInt = tempVar[1];
var theImageName = tempVar[2];
var allArea = getLinkInfo(theImageName);
var leftC = allArea.info.coordsl[cityInt];
var topC = allArea.info.coordst[cityInt];
/*
var blockingDiv = document.createElement("div");
blockingDiv.id = "backgroundDiv";
document.getElementById("zoom_content").appendChild( blockingDiv );
blockingDiv.onmousedown = function(){ delPropertyInfoDiv("zoom_content"); };

var textDiv = document.createElement("div");
textDiv.id = "textDivPropertyInfo";
document.getElementById("zoom_content").appendChild( textDiv );
textDiv.style.position='absolute';

//textDiv.onmouseout = function(){ delPropertyInfoDiv("zoom_content"); };
textDiv.innerHTML = "<div id='cityProperties' style='position:relative; width:auto; height:auto;'><table id='cityPropertiesTable' style='border-collapse:collapse;'><tbody><tr><td class='tl' style='background:url(images/topLeft.gif) 0 0 no-repeat; width:10px; height:10px; overflow:hidden;' /><td class='tm' style='background:url(images/topMid.gif) 0 0 repeat-x; height:10px; overflow:hidden;' /><td class='tr' style='background:url(images/topRight.gif) 100% 0 no-repeat; width:10px; height:10px; overflow:hidden;' /></tr><tr><td class='ml' style='background:url(images/left.gif) 0 0 repeat-y; width:10px; overflow:hidden;' /><td class='mm' style='vertical-align:top; padding:0px;'><table style='border-collapse:collapse; vertical-align:top; text-align:center; background-color:black;'><tr><td style='border-left:solid 1px black; border-right:solid 1px black; background-color:white; color:black; font:bold 14px arial, helvetica, sans-serif;'>"+allArea.info.cities[cityInt].replace("_", " ").toString()+"</td></tr></table><div id='property_content' style='border: none; background-color:black; border-collapse:collapse;'></div></td><td class='mr' style='background:url(images/right.gif) 100% 0 repeat-y; overflow:hidden;' /></tr><tr><td class='bl' style='background:url(images/bottomLeft.gif) 0 100% no-repeat; width:10px; height:10px; overflow:hidden;' /><td class='bm' style='background:url(images/bottomMid.gif) 0 100% repeat-x; height:10px; overflow:hidden;' /><td class='br' style='background:url(images/bottomRight.gif) 100% 100% no-repeat; width:10px; height:10px; overflow:hidden;' /></tr></tbody></table></div>"

var contentReplace = document.getElementById('property_content');*/
var properties = allArea.info.properties[cityInt];
var addresses = allArea.info.info.address[cityInt];
var cityAddress = allArea.info.info.cities[cityInt];
var phone = allArea.info.phone[cityInt];
var bedrooms = allArea.info.bedroom[cityInt];
var pageLinks = allArea.info.link[cityInt];
/*for(i=0;i<=properties.length-1;i++){
contentReplace.innerHTML += '<table id="propertyList" style="border-collapse:collapse;" class="propertyLink"><tr style="border-bottom:solid 1px white;"><td><pre style="font:bold 12px arial, helvetica, sans-serif; position:relative; border-collapse:collapse; padding:0; margin:0;"><a href="'+pageLinks[i].toString()+'" style="border:0px none;"></a></pre></td></tr></table>';
}

textDiv.style.left = (leftC+30)+"px";
textDiv.style.top = (topC-(textDiv.offsetHeight*.3))+"px";

blockingDiv.style.position='absolute';
blockingDiv.style.width = "100px";
blockingDiv.style.height = textDiv.offsetHeight+"px";
blockingDiv.style.left = leftC+"px";
blockingDiv.style.top = (topC-(textDiv.offsetHeight*.3))+"px";
blockingDiv.style.background = "url(images/transparentFill.gif) 0 0 repeat";

*/
	document.getElementById("tab").style.backgroundImage = "url('images/tab3.gif')";
	var linkContent = [];
	var theLinkElement = document.getElementById("info_content");
	theLinkElement.innerHTML = "";
	for(i=0;i<=properties.length-1;i++){
			linkContent[i] = document.createElement('a');
			linkContent[i].href = pageLinks[i].toString();
			linkContent[i].id = allArea.info.cities[cityInt]+"!"+cityInt+"!Link"+theImageName.toString()+"!!";
			//linkContent[i].class = "countyLink";
			linkContent[i].onmouseover = showCityName;
			linkContent[i].onmouseout = function() { delPropertyInfoDiv('zoom_content'); };
			linkContent[i].innerHTML = "<div style='position:relative; text-align:left; float:left; border:1px solid grey; font: normal 11px arial, helvetica, sans-serif; width:98%;'>"+properties[i].replace("_", " ").toString()+"<br />"+bedrooms[i].toString()+" Bedrooms<br />"+phone[i].toString()+"<br />"+addresses[i].toString()+"<br />"+cityAddress[i].toString()+"</div>";
			theLinkElement.appendChild(linkContent[i]);
	}
}

function showImage(theImageName){
//	if (document.getElementById("textDiv")){
//	delTextDiv("countyInfo");
//	}
theImageName = theImageName.replace("Link","");
	
	var contentReplace = document.getElementById('zoom_content');
	contentReplace.style.opacity = 1;
	contentReplace.style.filter = "alpha(opacity=100)";

	// *********** Check to see if zoom image is already displayed *********** //
	if(document.getElementById("closeLink")){
	// *** Remove the closeLink image *** //
	document.getElementById("firstCanvas").removeChild(document.getElementById("closeLink"));
	// *** Change the countyName *** //
	document.getElementById("textDiv").innerHTML = '<table id="countyName" style="border: 1px solid blue; border-collapse:collapse;"><tr><td style="font: bold 15px arial, helvetica, sans-serif; color: green;">'+theImageName+'</td></tr></table>';
	}
	
	var i = 0;

	//  ******* Get Image *******  //
	var img = new Image();
	img.src = "images/"+theImageName+".gif";
	img.id = theImageName+"Zoom";
	img.style.width = 426+"px";
	img.style.height = 360+"px";
	img.style.border = "0px none";
	img.style.opacity = 0;
	img.style.filter = "alpha(opacity="+0+")";
	img.onmouseover = function() { delPropertyInfoDiv('zoom_content'); };
	img.onmousedown = function(){ delPropertyInfoDiv("zoom_content"); };

	contentReplace.innerHTML = "";
	img.style.background = "#FFFFFF";
	contentReplace.appendChild(img);
	doTimer(theImageName+"Zoom");

	// **********************Write Function HERE**************************** //
	var allArea = getLinkInfo(theImageName);
		if (allArea.info.valid){
			var markerA = [];
			var markerDiv = [];
			var markerImg = [];
			for(i=0;i<=allArea.info.cities.length-1;i++){
			markerImg[i] = new Image();
			markerImg[i].src = "images/markerHouse.gif";
			markerA[i] = document.createElement('a');
			markerDiv[i] = document.createElement('div');

			markerImg[i].id = allArea.info.cities[i]+"Marker";
			//markerImg[i].id = i+"_"+theImageName;
			markerImg[i].style.border = "0px none";
			markerA[i].id = allArea.info.cities[i]+"!"+i+"!Link"+theImageName;
			//**markerA[i].href = allArea.info.link[i];
			markerA[i].appendChild(markerImg[i]);
			//markerA[i].title = i+" "+theImageName;
			markerA[i].onmouseover = showCityName;
			//**markerA[i].onmouseout = function(){ delTextDiv("zoom_content"); };
//			markerA[i].setAttribute("onmouseover", "showCityName('"+allArea.info.properties[i]+"',"+allArea.info.coordsl[i]+","+allArea.info.coordst[i]+");");
//			markerA[i].setAttribute("onmouseout", "delTextDiv('zoom_content');");

			markerDiv[i].id = allArea.info.cities[i]+"Div";
			markerDiv[i].style.left = allArea.info.coordsl[i]+"px";
			markerDiv[i].style.top = allArea.info.coordst[i]+"px";
			markerDiv[i].style.position = "absolute";
			markerDiv[i].appendChild(markerA[i]);
			contentReplace.appendChild(markerDiv[i]);
			}
		}

	//  ******* Close Icon *******  //
	var closeImage = new Image();
	closeImage.src = "images/closebox.png";
	closeImage.id = "closeImage";
	closeImage.style.border = "none";
	closeImage.style.margin = 0;
	closeImage.style.padding = 0;

	var closeLink = document.createElement('a');
	closeLink.id = "closeLink";
	closeLink.href = "javascript: closeImage()";
	closeLink.style.position = "absolute";
	closeLink.style.left = 0;
	closeLink.style.top = 0;
	closeLink.appendChild(closeImage);
	document.getElementById("firstCanvas").appendChild(closeLink);
	//contentReplace.style.background = "";
	
	var tab = document.getElementById("tab");
	tab.style.backgroundImage = "url(images/tab2.gif)";
	setInfo(theImageName);
}

function closeImage(){
if((closeLinkClose = document.getElementById("closeLink")) != null){
document.getElementById("firstCanvas").removeChild(closeLinkClose);
}
fullMap();
delTextDiv("countyInfo");

var tab = document.getElementById("tab");
tab.style.backgroundImage = "url(images/tab1.gif)";
}

function showCityName(){
delPropertyInfoDiv("zoom_content");
var tempVar = this.id.replace("Link","");
tempVar = tempVar.split("!",3);
var cityInt = tempVar[1];
var theImageName = tempVar[2];
var allArea = getLinkInfo(theImageName);
var leftC = allArea.info.coordsl[cityInt];
var topC = allArea.info.coordst[cityInt];

var blockingDiv = document.createElement("div");
blockingDiv.id = "backgroundDiv";
document.getElementById("zoom_content").appendChild( blockingDiv );
blockingDiv.onmousedown = function(){ delPropertyInfoDiv("zoom_content"); };

var textDiv = document.createElement("div");
textDiv.id = "textDivPropertyInfo";
document.getElementById("zoom_content").appendChild( textDiv );
textDiv.style.position='absolute';

//textDiv.onmouseout = function(){ delPropertyInfoDiv("zoom_content"); };
textDiv.innerHTML = "<table id='cityPropertiesTable' style='position:relative; width:auto; height:auto; border-collapse:collapse;'><tbody><tr><td class='tl' style='background:url(images/topLeft.gif) 0 0 no-repeat; width:10px; height:10px; overflow:hidden;' /><td class='tm' style='background:url(images/topMid.gif) 0 0 repeat-x; height:10px; overflow:hidden;' /><td class='tr' style='background:url(images/topRight.gif) 100% 0 no-repeat; width:10px; height:10px; overflow:hidden;' /></tr><tr><td class='ml' style='background:url(images/left.gif) 0 0 repeat-y; width:10px; overflow:hidden;' /><td class='mm' style='vertical-align:top; padding:0px;'><table style='border-collapse:collapse; vertical-align:top; text-align:center; background-color:black; width:100%;'><tr><td style='border-left:solid 1px black; border-right:solid 1px black; background-color:white; color:black; font:bold 14px arial, helvetica, sans-serif;'>"+allArea.info.cities[cityInt].replace("_", " ").toString()+"</td></tr></table><div id='property_content' style='border: none; background-color:black; border-collapse:collapse;'></div></td><td class='mr' style='background:url(images/right.gif) 100% 0 repeat-y; overflow:hidden;' /></tr><tr><td class='bl' style='background:url(images/bottomLeft.gif) 0 100% no-repeat; width:10px; height:10px; overflow:hidden;' /><td class='bm' style='background:url(images/bottomMid.gif) 0 100% repeat-x; height:10px; overflow:hidden;' /><td class='br' style='background:url(images/bottomRight.gif) 100% 100% no-repeat; width:10px; height:10px; overflow:hidden;' /></tr></tbody></table>"

var contentReplace = document.getElementById('property_content');
var properties = allArea.info.properties[cityInt];
var addresses = allArea.info.info.address[cityInt];
var cityAddress = allArea.info.info.cities[cityInt];
var phone = allArea.info.phone[cityInt];
var bedrooms = allArea.info.bedroom[cityInt];
var pageLinks = allArea.info.link[cityInt];
for(i=0;i<=properties.length-1;i++){
contentReplace.innerHTML += '<table id="propertyList'+i+'_" style="border-collapse:collapse; width:100%;" class="propertyLink"><tr><td><pre style="font:bold 12px arial, helvetica, sans-serif; position:relative; border-collapse:collapse; border-bottom:solid 1px white; padding:0; margin:0;"><a href="'+pageLinks[i].toString()+'" style="border:0px none;">'+properties[i].replace("_", " ").toString()+'<br />'+bedrooms[i].toString()+' Bedrooms<br />'+phone[i].toString()+'</a></pre></td></tr></table>';
}
textDiv.style.left = (leftC+30)+"px";
textDiv.style.top = (topC-(textDiv.offsetHeight*.3))+"px";

blockingDiv.style.position='absolute';
blockingDiv.style.width = "100px";
blockingDiv.style.height = textDiv.offsetHeight+"px";
blockingDiv.style.left = leftC+"px";
blockingDiv.style.top = (topC-(textDiv.offsetHeight*.3))+"px";
blockingDiv.style.background = "url(images/transparentFill.gif) 0 0 repeat";
}

function delTextDiv(theElement){
	if(document.getElementById("textDiv")){
	var delDiv = document.getElementById("textDiv");
	document.getElementById(theElement).removeChild(delDiv);
	}
	if(document.getElementById("tempNamedDiv")){
	document.getElementById("tempNamedDiv").id = "textDiv";
	}
}

function delPropertyInfoDiv(theElement){
	if(document.getElementById("textDivPropertyInfo")){
	var delDiv = document.getElementById("textDivPropertyInfo");
	var delDivTwo = document.getElementById("backgroundDiv");
	document.getElementById(theElement).removeChild(delDiv);
	document.getElementById(theElement).removeChild(delDivTwo);
	}
}