
// Set the BaseURL to the URL of your camera
var BaseURL = "http://71.37.180.29/";
 
// DisplayWidth & DisplayHeight specifies the displayed width & height of the image.
// You may change these numbers, the effect will be a stretched or a shrunk image
//CHANGE THIS FOR DIFFERENT SIZES
var DisplayWidth = "600";
var DisplayHeight = "440";
 
// This is the path to the image generating file inside the camera itself
var File = "axis-cgi/mjpg/video.cgi?resolution=CIF";
// No changes required below this point
var output = "";
if ((navigator.appName == "Microsoft Internet Explorer") &&
   (navigator.platform != "MacPPC") && (navigator.platform != "Mac68k"))
{
  // If Internet Explorer under Windows then use ActiveX 
  output  = '<OBJECT ID="Player" width='
  output += DisplayWidth;
  output += ' height=';
  output += DisplayHeight;
  output += ' CLASSID="CLSID:DE625294-70E6-45ED-B895-CFFA13AEB044" ';
  output += 'CODEBASE="';
  output += BaseURL;
  output += 'activex/AMC.cab#version=4,1,5,1">';
  output += '<PARAM NAME="MediaURL" VALUE="';
  output += BaseURL;
  output += File + '">';
  output += '<param name="MediaType" value="mjpeg-unicast">';
  output += '<param name="ShowStatusBar" value="0">';
  output += '<param name="ShowToolbar" value="0">';
  output += '<param name="AutoStart" value="1">';
  output += '<param name="StretchToFit" value="1">';
 // Remove the // for the ptz settings below to use the code for click-in-image. 
//   output += '<param name="PTZControlURL" value="';
 //  output += BaseURL;
 //   output += '/axis-cgi/com/ptz.cgi?camera=1">';
 //  output += '<param name="UIMode" value="ptz-relative">'; // or "ptz-absolute"
  output += '<BR><B>Axis Media Control</B><BR>';
  output += '<p>The AXIS Media Control, which enables you ';
  output += 'to view live image streams in Microsoft Internet';
  output += ' Explorer, could not be registered on your computer.';
  output += ' <br/>.';
  output += ' To Enable this functionality. Please install the "AXIS Media Control</p>.';
output += ' <p>The component required to view our web cam is not installed on your computer please install the "AXIS Media Control" <br />';
/* CHANGE THIS TEXT PROVIDE INSTALLATION INSTRUCTIONS, Feel free to use this text if you like The images are available 
            at http://www.cheyenne.org/images/webcam/active_x.gif, http://www.cheyenne.org/images/webcam/active_x2.gif http://www.cheyenne.org/images/webcam/active_x3.gif
            DO NOT LINK DIRECTLY TO THESE IMAGES
output += ' <br/> In <Strong>Internet Explorer:</Strong><br />';
output += ' <ul> ';
output += ' <ol>1, Click on the pop up as shown below:';
output += ' <img src="images/webcam/active_x.gif" alt="Install Active X Control" />';
output += ' </ol>';
output += ' <ol>2, Choose <i>Install Active X Control</i> from the drop down, as shown bellow:';
output += ' <img src="images/webcam/active_x2.gif" alt="Install Active X Control" />';
output += ' </ol>';
output += ' <ol>3, Click on  <i>Install</i> in the popup, as shown bellow:';
output += ' <img src="images/webcam/active_x3.gif" alt="Install Active X Control" />';
output += ' </ol>';
output += ' </ul>';
*/
output += ' </p> ';
  output += '<BR></OBJECT>';
  //document.getElementById('camwrapper').className ='.hiddenimg';
} else {
  // If not IE for Windows use the browser itself to display
  theDate = new Date();
  output  = '<IMG SRC="';
  output += BaseURL;
  output += File;
  output += '&dummy=' + theDate.getTime().toString(10);
  output += '" HEIGHT="';
  output += DisplayHeight;
  output += '" WIDTH="';
  output += DisplayWidth;
  output += '" ALT="Camera Image">';
}
document.write(output);
//document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"
 
// Remove the // below to use the code for Motion Detection. 
  // document.Player.UIMode = "MDConfig";
  // document.Player.MotionConfigURL = "/axis-cgi/operator/param.cgi?ImageSource=0"
  // document.Player.MotionDataURL = "/axis-cgi/motion/motiondata.cgi";