var xmlhttp = false ;


if (!xmlhttp && typeof XMLHttpRequest != 'undefined')
{
  try {
	xmlhttp = new XMLHttpRequest ();
  }
  catch (e) {
  xmlhttp = false}
}


function myXMLHttpRequest1 ()
{
  var xmlhttplocal;
  try {
  	xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")}
  catch (e) {
	try {
	xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")}
	catch (E) {
	  xmlhttplocal = false;
	}
  }

  if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') {
	try {
	  var xmlhttplocal = new XMLHttpRequest ();
	}
	catch (e) {
	  var xmlhttplocal = false;
	}
  }
  return (xmlhttplocal);
}

function myXMLHttpRequest2 ()
{
  var xmlhttplocal;
  try {
  	xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")}
  catch (e) {
	try {
	xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")}
	catch (E) {
	  xmlhttplocal = false;
	}
  }

  if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') {
	try {
	  var xmlhttplocal = new XMLHttpRequest ();
	}
	catch (e) {
	  var xmlhttplocal = false;
	}
  }
  return (xmlhttplocal);
}


function myXMLHttpRequest7 ()
{
  var xmlhttplocal;
  try {
  	xmlhttplocal = new ActiveXObject ("Msxml2.XMLHTTP")}
  catch (e) {
	try {
	xmlhttplocal = new ActiveXObject ("Microsoft.XMLHTTP")}
	catch (E) {
	  xmlhttplocal = false;
	}
  }

  if (!xmlhttplocal && typeof XMLHttpRequest != 'undefined') {
	try {
	  var xmlhttplocal = new XMLHttpRequest ();
	}
	catch (e) {
	  var xmlhttplocal = false;
	}
  }
  return (xmlhttplocal);
}

var mnmxmlhttp = Array ();
var mnmxmlhttp1 = Array ();
var mnmxmlhttp7 = Array ();
var mnmString = Array ();
var mnmString1 = Array ();
var mnmString7 = Array ();
var mnmPrevColor = Array ();
var responsestring = Array ();
var myxmlhttp = Array ();
var myxmlhttp1 = Array ();
var myxmlhttp7 = Array ();
var responseString = new String;


function pop(file,windowname,features)
{
helpwindow = window.open(file,windowname,features);
helpwindow.focus();
return false;
}

var i=0;
var ii = 0;
var f=0;
var ff = 0;
var j=0;
var jj = 0;

function ajax_update1()
{


		
	url2 = "cams/webcam2.php";
	target3 = document.getElementById ('content2');

	ff = f++;

	var content = "f=" + ff ;

	mnmxmlhttp = new myXMLHttpRequest2 ();
	if (mnmxmlhttp) {
			mnmxmlhttp.open ("POST", url2, true);
			mnmxmlhttp.setRequestHeader ('Content-Type',
					   'application/x-www-form-urlencoded');

			mnmxmlhttp.send (content);
			errormatch = new RegExp ("^ERROR:");

			target3 = document.getElementById ('content2');

			mnmxmlhttp.onreadystatechange = function () {
				if (mnmxmlhttp.readyState == 4) {
					mnmString = mnmxmlhttp.responseText;

					if (mnmString.match (errormatch)) {
						mnmString = mnmString.substring (6, mnmString.length);

						target4 = document.getElementById ('content2');
						target3.innerHTML = mnmString;

					} else {
						target4 = document.getElementById ('content2');
						target3.innerHTML = mnmString;

					}
				}
			}
		}


	url7 = "cams/webcam1.php";
	target7 = document.getElementById ('content7');

	jj = j++;

	var content4 = "j=" + jj ;

	mnmxmlhttp7 = new myXMLHttpRequest7 ();
	if (mnmxmlhttp7) {
			mnmxmlhttp7.open ("POST", url7, true);
			mnmxmlhttp7.setRequestHeader ('Content-Type',
					   'application/x-www-form-urlencoded');

			mnmxmlhttp7.send (content4);
			errormatch = new RegExp ("^ERROR:");

			target7 = document.getElementById ('content7');

			mnmxmlhttp7.onreadystatechange = function () {
				if (mnmxmlhttp7.readyState == 4) {
					mnmString7 = mnmxmlhttp7.responseText;

					if (mnmString7.match (errormatch)) {
						mnmString7 = mnmString7.substring (6, mnmString7.length);

						target6 = document.getElementById ('content7');
						target7.innerHTML = mnmString7;

					} else {
						target6 = document.getElementById ('content7');
						target7.innerHTML = mnmString7;

					}
				}
			}
		}


	url1 = "cams/webcam3.php";
	target1 = document.getElementById ('content3');

	ii = i++;

	var content1 = "i=" + ii ;

	mnmxmlhttp1 = new myXMLHttpRequest1 ();
	if (mnmxmlhttp1) {
			mnmxmlhttp1.open ("POST", url1, true);
			mnmxmlhttp1.setRequestHeader ('Content-Type',
					   'application/x-www-form-urlencoded');

			mnmxmlhttp1.send (content1);
			errormatch = new RegExp ("^ERROR:");

			target1 = document.getElementById ('content3');

			mnmxmlhttp1.onreadystatechange = function () {
				if (mnmxmlhttp1.readyState == 4) {
					mnmString1 = mnmxmlhttp1.responseText;

					if (mnmString1.match (errormatch)) {
						mnmString1 = mnmString1.substring (6, mnmString1.length);

						target0 = document.getElementById ('content3');
						target1.innerHTML = mnmString1;

					} else {
						target0 = document.getElementById ('content3');
						target1.innerHTML = mnmString1;

					}
				}
			}
		}



	setTimeout('ajax_update1()', 10000);

}

