posLeft = -1;
posTop = -1;
taxamnt_visibility = "hidden";
taxamnt_visible = false;

var IFrameObj; // our IFrame object
var video;
var isIE = (navigator.appName == "Microsoft Internet Explorer") ? true: false;
var isKo = (navigator.appName == "Konqueror") ? true: false;
var isOp = (navigator.appName == "Opera") ? true: false;

function serverGetAddy(video) {
	if (!document.createElement) {return true};
	
	var IFrameDoc;
	var URL = "http://www.harborcreektownship.org/cgi-bin/video/streamSrv.pl?"+ video;

	if (!IFrameObj && document.createElement) {
		// create the IFrame and assign a reference to the
		// object to our global variable IFrameObj.
		// this will only happen the first time 
		// callToServer() is called
		try {
			var tempIFrame=document.createElement('iframe');
			tempIFrame.setAttribute('id','COMM');
			tempIFrame.style.border='0px';
			tempIFrame.style.width='0px';
			tempIFrame.style.height='0px';
			IFrameObj = document.body.appendChild(tempIFrame);

			if (document.frames) {
				// this is for IE5 Mac, because it will only
				// allow access to the document object
				// of the IFrame if we access it through
				// the document.frames array
				IFrameObj = document.frames['COMM'];
			}
		} 
		catch(exception) {
			// This is for IE5 PC, which does not allow dynamic creation
			// and manipulation of an iframe object. Instead, we'll fake
			// it up by creating our own objects.
			iframeHTML='\<iframe id="COMM" style="';
				iframeHTML+='border:0px;';
				iframeHTML+='width:0px;';
				iframeHTML+='height:0px;';
			iframeHTML+='"><\/iframe>';
			document.body.innerHTML+=iframeHTML;
			IFrameObj = new Object();
			IFrameObj.document = new Object();
			IFrameObj.document.location = new Object();
			IFrameObj.document.location.iframe = document.getElementById('COMM');
			IFrameObj.document.location.replace = function(location) {
				this.iframe.src = location;
			}
		}
	}

	if (navigator.userAgent.indexOf('Gecko') !=-1 && !IFrameObj.contentDocument) {
		// we have to give NS6 a fraction of a second
		// to recognize the new IFrame
		setTimeout('serverGetAddy()',10);
		return false;
	}

	if (IFrameObj.contentDocument) {
		// For NS6
		IFrameDoc = IFrameObj.contentDocument; 
	} else if (IFrameObj.contentWindow) {
		// For IE5.5 and IE6
		IFrameDoc = IFrameObj.contentWindow.document;
	} else if (IFrameObj.document) {
		// For IE5
		IFrameDoc = IFrameObj.document;
	} else {
		return true;
	}

	IFrameDoc.location.replace(URL);
		
	
	//var answ = document.getElementById("ANSW");
	//if (!answ) {
		//return false;
	//}
	//var ret = "";

	///ret += "<div style=\"width:160px;height:300px;position:absolute;top:706px;left:640px\"><p class='normal_taxcalc_label'>...calculating</div>";

	//answ.innerHTML = ret;	
	
}

function handleServerResponse(addy) {
  var answ = document.getElementById("ANSW");  
  
  if (answ) {
	var ret = "";	
	ret = "<OBJECT height=\"304\" width=\"320\" CLASSID=\"clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6\" ID='WMP'><PARAM NAME='Name' VALUE=\"WMP1\"><PARAM NAME=\"URL\" VALUE=\"" + addy + "\"><param name=\"enableContextMenu\" value=\"false\"></OBJECT>";
	//ret = addy;
	answ.innerHTML = ret;	
  }
  
}