linglemap="maplinglefarm.html"

function HideDityDiv(d) {
if(d.length < 1) { return; }
document.getElementById(d).style.display = "none";
}
function ShowDityDiv(d) {
if(d.length < 1) { return; }
for (var x = 1; x <= 18; x++)
   {
   HideDityDiv('d'+x);
   }
document.getElementById(d).style.display = "block";
}

function showDiv(id,flagit) {
if (flagit=="1"){
if (document.layers) document.layers[''+id+''].visibility = "show"
else if (document.all) document.all[''+id+''].style.visibility = "visible"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "visible"
}
else
if (flagit=="0"){
if (document.layers) document.layers[''+id+''].visibility = "hide"
else if (document.all) document.all[''+id+''].style.visibility = "hidden"
else if (document.getElementById) document.getElementById(''+id+'').style.visibility = "hidden"
}
}

function togDisp(id) {
if (document.getElementById(id).style.display == "block") {
	document.getElementById(id).style.display = "none"
} else {
	document.getElementById(id).style.display = "block"
}
}

function togVenueInputs(id) {
document.getElementById('errortext').innerHTML = '';
if (document.getElementById("PILTInputs")) document.getElementById("PILTInputs").style.display = "none"
if (document.getElementById("PMLTInputs")) document.getElementById("PMLTInputs").style.display = "none"
if (document.getElementById("OILTInputs")) document.getElementById("OILTInputs").style.display = "none"
if (!(id=="none")) {
	document.getElementById(id).style.display = "block"
}
}

function togVis(id) {
if (document.getElementById(id).style.visibility == "visible") {
	document.getElementById(id).style.visibility = "hidden"
} else {
	document.getElementById(id).style.visibility = "visible"
}
}

function showVenueInputs(id) {
showDiv("PILTInputs",0);
showDiv("OILTInputs",0);
if (!(id=="none")) {	
	showDiv(id,1);
}
}

function mapSrc(src) {
	document.getElementById("mapframe").src=src;
}

	// BEGIN STANDARD GLEN COMPONENTS
	
	// written by Glen Murphy : http://glenmurphy.com/ : you may use this code if you keep this line intact. 
	
	var d = document;
	
	if(d.layers) {
		var isNav = 1;
		var isIE = 0; isNS6 = 0;
		}
	else if(d.all) {
		var isIE = 1;
		var isNav = 0, isNS6 = 0;
		}
	else if (d.getElementByID) {
		var isNS6 = 1;
		var isNav = 0, isIE = 0;
		}
	
	function shiftTo(obj, x, y) {
		if(isIE) {
			theObj = eval("d.all."+obj+".style");
			theObj.pixelLeft = x;
			theObj.pixelTop = y;
			}
		else if(isNav) {
			theObj = eval("d."+obj);
			theObj.moveTo(x,y);
			}
		else {
			theObj = eval("d.getElementById('"+obj+"')");
			theObj.style.top = y;
			theObj.style.left = x;
			}
		}
	// END STANDARD GLEN COMPONENTS
			
	// START DRAGGABLE SPECIFIC CODE
	var offsetX, offsetY, curz = 1;
	var mx, my, activeelement;
			
	function engage(thing) {
		activeelement = thing;
		if(isIE) {
			offsetX = window.event.offsetX + 2;
			offsetY = window.event.offsetY + 2;
			theObj = eval("d.all."+thing+".style");
			}
		else if(isNav) {
			eval("offsetX = mousex - document."+activeelement+".left");
			eval("offsetY = mousey - document."+activeelement+".top");
			theObj = eval("d."+thing);
			}
		else {
			eval("offsetX = mousex - parseInt(d.getElementById('"+activeelement+"').style.left)");
			eval("offsetY = mousey - parseInt(d.getElementById('"+activeelement+"').style.top)");
			theObj = eval("d.getElementById('"+activeelement+"').style");
			}
		theObj.zIndex = curz++;
		}
		
	function release() {
		activeelement = null;
		}
		
	function mousemoved(evt) {
			if(isIE) {
				mousex = window.event.clientX+document.body.scrollLeft;
				mousey = window.event.clientY+document.body.scrollTop;
				}
			else if(isNav) {
				mousex = evt.pageX+window.pageXOffset;
				mousey = evt.pageY+window.pageYOffset;
				}
			else {
				mousex = evt.pageX;
				mousey = evt.pageY;
				}
    	if(activeelement) {
    	  wx = mousex - offsetX;
   			wy = mousey - offsetY;
   			wx = (wx>0) ? wx:0;
   			wy = (wy>0) ? wy:0;
    		shiftTo(activeelement,wx, wy);
				}
			return false;
			}	
			
	if(isNav) {
 		window.captureEvents(Event.MOUSEMOVE);
 		window.onmousemove = mousemoved;
		}
	else {
		document.onmousemove = mousemoved;
		}  		
	// END DRAGGABLE CODE
