// Set the BaseURL to the URL of your camera

var BaseURL = "http://cam.wsbanja.nl:9001/";



// 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

var DisplayWidth = "220";

var DisplayHeight = "180";

var DisplayHeightpop = "600";

var DisplayWidthpop = "1024";



function reloadImage() {

  theDate = new Date();

  var url = BaseURL;

  url += File;

  url += '&dummy=' + theDate.getTime().toString(10);

  // The dummy above enforces a bypass of the browser image cache

  // Here we load the image

  document.theImage.src = url;



  // Reload the image every ten seconds (2000 ms)

  theTimer = setTimeout('reloadImage()', 2000);

}



// This is the path to the image generating file inside the camera itself

var File = "axis-cgi/mjpg/video.cgi?resolution=240x180";

// 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 

  // 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

  //var DisplayWidth = "240";

  //var DisplayHeight = "180";



  // This is the path to the image generating file inside the camera itself

  var File = "axis-cgi/jpg/image.cgi?resolution=240x180";



  // Force an immediate image load

  var theTimer = setTimeout('reloadImage()', 1);



  document.write('<a href="javascript:void(0);" onclick="window.open(\'http://www.wsbanja.nl/live-feed-camerabewaking.html\', null,\'width=1024,height=600,left=\'+(screen.availWidth/2-512)+\',top=\'+(screen.availHeight/2-300)+\'\');return false;"><img name="theImage" src="" height="' + DisplayHeight + '"');

  document.write('width="' + DisplayWidth + '" alt="Live image"></a>');

  // document.write('width="' + DisplayWidth + '" alt="Live image"><br /><br /><a onclick="window.open('[~24~]','Live feed camerabewaking','width=1024,height=600,left='+(screen.availWidth/2-512)+',top='+(screen.availHeight/2-300)+'');return false;" href="[~24~]">contact</a><br /><br />');

} else {

  // If not IE for Windows use the browser itself to display

  theDate = new Date();

  output  = '<a href="javascript:void(0);" onclick="window.open(\'http://www.wsbanja.nl/live-feed-camerabewaking.html\', null,\'width=1024,height=600,left=\'+(screen.availWidth/2-512)+\',top=\'+(screen.availHeight/2-300)+\'\');return false;"><IMG SRC="';

  output += BaseURL;

  output += File;

  output += '&dummy=' + theDate.getTime().toString(10);

  output += '" HEIGHT="';

  output += DisplayHeight;

  output += '" WIDTH="';

  output += DisplayWidth;

  output += '" ALT="Camera Image"></a>';

  document.write(output);

}

//document.Player.ToolbarConfiguration = "play,+snapshot,+fullscreen"
