// Set the BaseURL to the url of your camera
 // Example:  var BaseURL = "http://172.21.1.122/";
 // Since this file is located inside the unit itself, no base url is specified here
var BaseURL = "http://147.9.82.82/";
var BaseURL2 = "http://147.9.82.82/";
 // DisplayWidth & DisplayHeight specifies the displayed width & Height of the image.
 // You may change these numbers, the effect will be a strech or a shrink of the image
 var DisplayWidth = "320";
 var DisplayHeight = "230";

 // This is the filepath to the video generating file inside the camera itself
 var File = "axis-cgi/mjpg/video.cgi?resolution=352x240";
var output = "";

if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC")&&(navigator.platform != "Mac68k"))
{ 
 // If Internet Explorer for Windows then use ActiveX 
output =  "<OBJECT ID=\"CamImage\" WIDTH="
  output += DisplayWidth;
  output += " HEIGHT=";
  output += DisplayHeight;
  output += " CLASSID=CLSID:917623D1-D8E5-11D2-BE8B-00104B06BDE3 ";
  output += "CODEBASE=\"";
  output += BaseURL2;
  output += "activex/AxisCamControl.cab#Version=2,23,0,0\">";
  output += "<PARAM NAME=\"URL\" VALUE=\"";
  output += BaseURL;
  output += File;
  output += "\"> <BR><B>Axis ActiveX Camera Control</B><BR>";
  output += "The AXIS ActiveX Camera Control, which enables you ";
  output += "to view live image streams in Microsoft Internet";
  output += " Explorer, could not be registered on your computer.";
  output += "<BR></OBJECT>"; 
} 
else 
{

  // If not IE for Windows use the browser itself to display
  output = "<IMG SRC=\"";
  output += BaseURL;
  output += File;
  output += "&dummy=garb\" HEIGHT=\"";
  // The above dummy cgi-parameter helps some versions of NS
  output += DisplayHeight;
  output += "\" WIDTH=\"";
  output += DisplayWidth;
  output += "\" ALT=\"Moving Image Stream\">";
} 

document.write(output);

