/*Change the current_map variable to the currently selected area

List of areas (note: spelling, casing, and spaces must be exact)
Napa
Carneros
MtVedeer
Yountville
OakKnoll
StagsLeap
Atlas
Oakville
Rutherford
StHelena
Chilles
Howell
SpringMt
Calistoga
DiamondMt

example: var current_map = "Calistoga";
*/
document.write('<div id="appelation_map_hover"><style type="text/css">' +
'a img{' +
'border: none;'+
'}'+
'</style>'+
'<div style="position:relative;" id="mapFrame">'+
'<!--Text for Hover Images-->'+
'<a href="http://www.napalinks.com/napa_z/z_index.html"><img src="http://www.napalinks.com/map/txtNapa.png" id="txtNapa" style="display: none; position: absolute; z-index: 5; left: 120px; top: 385px;" onmouseover="over_map(event, this)" onmouseout="out_map(event, this)" class="Napa"/></a>'+
'<a href="http://www.napalinks.com/los_carneros_z/z_index.html"><img src="http://www.napalinks.com/map/txtCarneros.png" id="txtCarneros" style="display: none; position: absolute; z-index: 5; left: 70px; top:414px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/mount_veeder_z/z_index.html"><img src="http://www.napalinks.com/map/txtMtVeeder.png" id="txtMtVedeer" style="display: none; position: absolute; z-index: 5; left: 26px; top:285px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/yountville_z/z_index.html"><img src="http://www.napalinks.com/map/txtYountville.png" id="txtYountville" style="display: none; position: absolute; z-index: 5; left: 74px; top:285px;" onmouseover="over_map(event, this)" onmouseout="out_map(event, this)" class="Yountville"></a>'+
'<a href="http://www.napalinks.com/oak_knoll_z/z_index.html"><img src="http://www.napalinks.com/map/txtOakKnoll.png" id="txtOakKnoll" style="display: none; position: absolute; z-index: 5; left: 87px; top:338px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/stags_leap_z/z_index.html"><img src="http://www.napalinks.com/map/txtStagsLeap.png" id="txtStagsLeap" style="display: none; position: absolute; z-index: 5; left: 126px; top:286px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/atlas_peak_z/z_index.html"><img src="http://www.napalinks.com/map/txtAtlas.png" id="txtAtlas" style="display: none; position: absolute; z-index: 5; left: 161px; top:280px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/oakville_z/z_index.html"><img src="http://www.napalinks.com/map/txtOakville.png" id="txtOakville" style="display: none; position: absolute; z-index: 5; left: 110px; top:245px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/rutherford_z/z_index.html"><img src="http://www.napalinks.com/map/txtRutherford.png" id="txtRutherford" style="display: none; position: absolute; z-index: 5; left: 90px; top:200px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/st_helena_z/z_index.html"><img src="http://www.napalinks.com/map/txtStHelena.png" id="txtStHelena" style="display: none; position: absolute; z-index: 5; left: 85px; top:141px;" onmouseover="over_map(event, this)" onmouseout="out_map(event, this)" class="StHelena"></a>'+
'<a href="http://www.napalinks.com/chiles_valley_z/z_index.html"><img src="http://www.napalinks.com/map/txtChilles.png" id="txtChilles" style="display: none; position: absolute; z-index: 5; left: 145px; top:136px" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/howell_mountain_z/z_index.html"><img src="http://www.napalinks.com/map/txtHowell.png" id="txtHowell" style="display: none; position: absolute; z-index: 5; left: 103px; top:80px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/spring_mountain_z/z_index.html"><img src="http://www.napalinks.com/map/txtSpringMt.png" id="txtSpringMt" style="display: none; position: absolute; z-index: 5; left: 26px; top:129px;" onmouseout="out_map(event, this)"></a>'+
'<a href="http://www.napalinks.com/calistoga_z/z_index.html"><img src="http://www.napalinks.com/map/txtCalistoga.png" id="txtCalistoga" style="display: none; position: absolute; z-index: 5; left: 30px; top: 40px;" onmouseover="over_map(event, this)" onmouseout="out_map(event, this)" class="Calistoga"></a>'+
'<a href="http://www.napalinks.com/diamond_mountain_z/z_index.html"><img src="http://www.napalinks.com/map/txtDiamond.png" id="txtDiamondMt" style="display: none; position: absolute; z-index: 5; left: 15px; top: 60px;" onmouseout="out_map(event, this)"></a>'+
'<!--Hover Images -->'+
'<img src="http://www.napalinks.com/map/Napa.gif" id="imgNapa"  style="position: absolute; left: 61px; top:356px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" usemap="#Napa" />'+
'<img src="http://www.napalinks.com/map/Carneros.gif" style="position: absolute; left: 20px; top:364px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgCarneros" usemap="#Carneros" />'+
'<img src="http://www.napalinks.com/map/MtVedeer.gif" style="position: absolute; left: 26px; top:215px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgMtVedeer" usemap="#MtVedeer" />'+
'<img src="http://www.napalinks.com/map/Yountville.gif" style="position: absolute; left: 64px; top:265px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgYountville" usemap="#Yountville" />'+
'<img src="http://www.napalinks.com/map/OakKnoll.gif" style="position: absolute; left: 77px; top:318px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgOakKnoll" usemap="#OakKnoll" />'+
'<img src="http://www.napalinks.com/map/StagsLeap.gif" style="position: absolute; left: 116px; top:276px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgStagsLeap" usemap="#StagsLeap" />'+
'<img src="http://www.napalinks.com/map/Atlas.gif" style="position: absolute; left: 151px; top:260px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgAtlas" usemap="#Atlas" />'+
'<img src="http://www.napalinks.com/map/Oakville.gif" style="position: absolute; left: 70px; top:235px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgOakville" usemap="#Oakville" />'+
'<img src="http://www.napalinks.com/map/Rutherford.gif" style="position: absolute; left: 63px; top:188px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgRutherford" usemap="#Rutherford" />'+
'<img src="http://www.napalinks.com/map/StHelena.gif" style="position: absolute; left: 54px; top:101px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgStHelena" usemap="#StHelena" />'+
'<img src="http://www.napalinks.com/map/Chilles.gif" style="position: absolute; left: 158px; top:116px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgChilles" usemap="#Chilles" />'+
'<img src="http://www.napalinks.com/map/Howell.gif" style="position: absolute; left: 93px; top:40px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgHowell" usemap="#Howell" />'+
'<img src="http://www.napalinks.com/map/SpringMt.gif" style="position: absolute; left: 26px; top:99px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgSpringMt" usemap="#SpringMt" />'+
'<img src="http://www.napalinks.com/map/Calistoga.gif" style="position: absolute; left: 4px; top:4px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" id="imgCalistoga"  usemap="#Calistoga"/>'+
'<img src="http://www.napalinks.com/map/Diamond.gif" id="imgDiamondMt" style="position: absolute; left: 6px; top:50px; display: none; z-index: 4; border: none; opacity: .60; filter: alpha(opacity=10); -ms-filter:\'progid:DXImageTransform.Microsoft.Alpha(opacity=10)\';" usemap="#DiamondMt"/>'+
'<!--Main Map Image-->'+
'<img src="http://www.napalinks.com/map/base.gif" width="220" height="476" usemap="#Map" border="0"/>'+
'<map name="Map">'+
'<area shape="poly" coords="69,366,64,380,79,387,93,391,99,395,101,390,103,389,101,382,101,379" href="http://www.napalinks.com/napa_z/z_index.html" class="Napa" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="28,403,33,412,35,423,30,433,27,443,32,450,42,455,51,454,62,451,72,453,79,446,78,436,86,434,95,419,87,410,93,395,65,382,63,394,52,392,47,390" href="http://www.napalinks.com/los_carneros_z/z_index.html" class="Carneros" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="26,221,43,320,40,343,42,366,46,386,59,390,65,360,74,353,78,327,73,307,40,216" href="http://www.napalinks.com/mount_veeder_z/z_index.html" class="MtVedeer" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="85,327,84,341,78,355,71,361,84,368,100,373,112,375,121,379,126,388,135,355,131,338,119,323,101,320" href="http://www.napalinks.com/oak_knoll_z/z_index.html" class="OakKnoll" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="68,291,70,296,77,304,81,311,84,319,93,313,104,313,114,315,112,303,117,293,117,284,123,277,132,273,127,266,114,269,102,273,96,280,85,284,70,276,64,283,66,284" href="http://www.napalinks.com/yountville_z/z_index.html" class="Yountville" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="126,286,124,295,119,303,120,313,125,320,131,326,140,323,138,306,141,294,134,280" href="http://www.napalinks.com/stags_leap_z/z_index.html" class="StagsLeap" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="155,284,165,300,169,317,167,337,177,353,190,364,200,361,206,342,199,316,208,310,208,287,194,279,185,264,163,275" href="http://www.napalinks.com/atlas_peak_z/z_index.html" class="Atlas" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="80,245,82,260,90,275,103,265,117,261,134,259,145,259,151,254,145,248,141,242,133,241,126,234,104,235,98,242" href="http://www.napalinks.com/oakville_z/z_index.html" class="Oakville" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="78,198,74,209,71,215,62,218,70,222,76,231,79,240,91,238,100,231,126,230,125,209,114,190" href="http://www.napalinks.com/rutherford_z/z_index.html" class="Rutherford" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="62,171,77,195,110,185,124,186,128,177,120,167,111,162,97,160,100,151,96,141,103,135,105,116,91,97,75,111,71,129,72,150" href="http://www.napalinks.com/st_helena_z/z_index.html" class="StHelena"  onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="201,236,209,236,205,211,196,187,192,165,178,157,174,142,176,129,170,122,162,128,162,141" href="http://www.napalinks.com/chiles_valley_z/z_index.html" class="Chilles" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="114,118,123,135,132,145,140,156,148,155,146,140,152,132,151,110,140,91,136,75,132,62,125,56,105,42,102,77,103,101" href="http://www.napalinks.com/howell_mountain_z/z_index.html" class="Howell" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="32,106,40,121,39,137,30,153,33,171,39,175,47,162,61,169,66,158,69,150,67,131,71,112" href="http://www.napalinks.com/spring_mountain_z/z_index.html" class="SpringMt" onmouseover="over_map(event, this)"/>'+
'<area shape="poly" coords="10,42,24,45,34,54,41,62,48,76,55,84,65,98,72,105,82,99,90,88,88,76,95,69,92,59,82,66,72,56,56,53,56,38,64,23,56,15,45,25,43,7,39,6,36,18,26,13,9,22" href="http://www.napalinks.com/calistoga_z/z_index.html" class="Calistoga" onmouseover="over_map(event, this)" />'+
'<area shape="poly" coords="9,52,10,64,24,79,30,99,61,106,51,89,40,76,34,62,21,52" href="http://www.napalinks.com/diamond_mountain_z/z_index.html" class="DiamondMt" onmouseover="over_map(event, this)"/>'+
'</map>'+
'</div>'+
'<!--Main Map-->'+
'<!--Maps for each Hover Image-->'+
'<map name="Napa">'+
'<area shape="poly" coords="11,1,1,24,22,33,33,40,39,44,54,45,60,35,54,27,44,22" href="http://www.napalinks.com/napa_z/z_index.html" class="Napa" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Carneros">'+
'<area shape="poly" coords="4,39,8,52,9,60,7,71,5,83,6,93,18,100,29,101,42,98,52,96,62,88,60,78,70,78,78,60,73,50,76,32,47,16,39,23,34,23,27,24" href="http://www.napalinks.com/los_carneros_z/z_index.html" class="Carneros" onmouseout="out_map(event, this)"/>'+
'<area shape="poly" coords="50,-4,38,12,59,21,70,28,76,32,91,33,94,26,85,20,76,15" href="http://www.napalinks.com/napa_z/z_index.html" class="Napa" onmouseover="over_map(event, this)"/>'+
'</map>'+
'<map name="MtVedeer">'+
'<area shape="poly" coords="3,3,4,74,10,121,10,146,19,165,37,175,46,150,52,140,54,107,53,83,15,0" href="http://www.napalinks.com/mount_veeder_z/z_index.html" class="MtVedeer" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="OakKnoll">'+
'<area shape="poly" coords="3,6,2,23,0,37,-7,43,3,54,19,60,28,62,40,65,53,76,57,37,56,17,46,3,23,1" href="http://www.napalinks.com/oak_knoll_z/z_index.html" class="OakKnoll" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Yountville">'+
'<area shape="poly" coords="4,32,7,37,12,45,15,53,23,62,33,54,43,57,59,59,55,41,60,31,59,22,66,16,71,11,67,3,53,2,39,3,32,12,24,17,4,4,-2,18,3,25" href="http://www.napalinks.com/yountville_z/z_index.html" class="Yountville" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="StagsLeap">'+
'<area shape="poly" coords="6,6,4,17,0,25,0,37,7,44,15,50,26,48,24,28,27,14,17,2" href="http://www.napalinks.com/stags_leap_z/z_index.html" class="StagsLeap" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Atlas">'+
'<area shape="poly" coords="0,22,9,42,14,57,12,73,21,93,38,103,50,101,58,80,52,56,61,49,59,22,48,13,33,-2,8,7" href="http://www.napalinks.com/atlas_peak_z/z_index.html" class="Atlas" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Oakville">'+
'<area shape="poly" coords="1,5,3,31,13,47,29,39,42,34,59,31,71,31,81,21,71,12,70,6,59,2,49,2,26,0,20,9" href="http://www.napalinks.com/oakville_z/z_index.html" class="Oakville" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Rutherford">'+
'<area shape="poly" coords="13,7,9,18,7,27,1,32,7,38,14,47,18,54,30,52,40,49,65,46,64,22,55,2" href="http://www.napalinks.com/rutherford_z/z_index.html" class="Rutherford" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="StHelena">'+
'<area shape="poly" coords="7,73,20,98,53,90,67,89,71,80,68,65,58,60,46,60,48,54,44,43,52,36,52,16,35,-3,12,9,9,30,13,52" href="http://www.napalinks.com/st_helena_z/z_index.html" class="StHelena"  onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Chilles">'+
'<area shape="poly" coords="38,119,53,122,49,90,41,65,37,41,23,37,20,22,17,5,11,3,0,6,0,31" href="http://www.napalinks.com/chiles_valley_z/z_index.html" class="Chilles" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Howell">'+
'<area shape="poly" coords="6,88,17,101,26,110,38,121,58,126,57,108,60,95,59,68,51,46,48,31,43,16,36,7,5,1,2,37,0,64" href="http://www.napalinks.com/howell_mountain_z/z_index.html" class="Howell" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="SpringMt">'+
'<area shape="poly" coords="1,3,7,19,8,33,1,47,3,73,13,77,20,64,40,76,48,61,51,47,45,25,47,4" href="http://www.napalinks.com/spring_mountain_z/z_index.html" class="SpringMt" onmouseout="out_map(event, this)"/>'+
'</map>'+
'<map name="Calistoga">'+
'<area shape="poly" coords="2,46,17,49,24,58,32,63,40,76,48,85,60,97,66,106,79,103,88,93,88,80,93,68,87,54,77,65,72,50,56,50,57,38,65,20,51,8,43,18,40,-2,34,5,29,13,17,3,2,19" href="http://www.napalinks.com/calistoga_z/z_index.html" class="Calistoga" onmouseout="out_map(event, this)"/>'+
'<area shape="poly" coords="6,52,3,64,15,86,24,105,61,105,50,92,39,79,30,68,16,54" href="http://www.napalinks.com/diamond_mountain_z/z_index.html" class="DiamondMt" onmouseover="over_map(event, this)"/>'+
'</map>'+
'<map name="DiamondMt">'+
'<area shape="poly" coords="3,0,0,14,14,32,23,51,57,59,49,38,38,25,31,12,18,2" href="http://www.napalinks.com/diamond_mountain_z/z_index.html" class="DiamondMt" onmouseout="out_map(event, this)"/>'+
'</map>'+
'</div>');

var hovers = new Array();
hovers[0] = "Napa";
hovers[1] = "Carneros";
hovers[2] = "MtVedeer";
hovers[3] = "Yountville";
hovers[4] = "OakKnoll";
hovers[5] = "StagsLeap";
hovers[6] = "Atlas";
hovers[7] = "Oakville";
hovers[8] = "Rutherford";
hovers[9] = "StHelena";
hovers[10] = "Chilles";
hovers[11] = "Howell";
hovers[12] = "SpringMt";
hovers[13] = "Calistoga";
hovers[14] = "DiamondMt";

for(var i = 0; i < hovers.length; i++){
	if(current_map == hovers[i]){
		document.getElementById("img" + hovers[i]).style.display="block";
		document.getElementById("txt" + hovers[i]).style.display="block";
		document.getElementById("img" + hovers[i]).style.opacity=1;
		document.getElementById("img" + hovers[i]).style.filter="alpha(opacity=100)"
	}
}
if(current_map == ""){
	document.getElementById("txtNapa").style.display="block";
	document.getElementById("txtYountville").style.display="block";
	document.getElementById("txtStHelena").style.display="block";
	document.getElementById("txtCalistoga").style.display="block";
}

function over_map(event, element) {
	if(element.className !== undefined) {
		var imgId = "img" + element.className;
		var txtId = "txt" + element.className;
		
		//Turn off all other hovers before displaying this one
        for(var i = 0; i < hovers.length; i++)
        {
			if(("img" + hovers[i] != imgId) && (hovers[i] != current_map)) {
            	document.getElementById("img" + hovers[i]).style.display="none";
				//document.getElementById("txt" + hovers[i]).style.display="none";
			}
        } 
		
		document.getElementById(imgId).style.display="block";
		//document.getElementById(txtId).style.display="block";
	}
}

function out_map(event, element) {
	if(element.className !== undefined) {
		var imgId = "img" + element.className;
		var txtId = "txt" + element.className;
		if((event.relatedTarget.id != element.className) && (element.className != current_map) && (event.relatedTarget.id != txtId)){
			document.getElementById(imgId).style.display="none";
			//document.getElementById(txtId).style.display="none";
		}
	}
}

