// JavaScript Document
function Webcam(Width, Height,CWidth, CHeight, Live){
	// Set the BaseURL to the url of your camera
	// Since this file is located inside the unit itself, no base url is specified here
	//var BaseURL = "http://216.237.82.150/";
	var BaseURL = "http://208.72.70.180/";
	//var BaseURL = "http://webcam.hotspringspool.com/";
	// This is the filepath to the video generating file inside the camera itself
	if(Live == true){ var File = 'axis-cgi/mjpg/video.cgi?resolution='+CWidth+'x'+CHeight;
	} else { var File = 'axis-cgi/jpg/image.cgi?resolution='+CWidth+'x'+CHeight; }
	// No changes required below this point
	var html = '';
	if ((navigator.appName == "Microsoft Internet Explorer")&&(navigator.platform != "MacPPC")&&(navigator.platform != "Mac68k") && Live==true)	{ 
	 // If Internet Explorer for Windows then use ActiveX 
		html =  '<object id="CamImage"';
		html += ' width="'+Width+'"';
		html += ' height="'+Height+'"';
		html += ' classid=CLSID:917623D1-D8E5-11D2-BE8B-00104B06BDE3';
		html += ' codebase="'+BaseURL+'activex/AxisCamControl.cab#Version=2,20,0,6">';
		html += '<param name="url" value="'+BaseURL+File+'"><br /><strong>Axis ActiveX Camera Control</strong><br />';
		html += 'The AXIS ActiveX Camera Control, which enables you ';
		html += 'to view live image streams in Microsoft Internet';
		html += ' Explorer, could not be registered on your computer.';
		html += '<br /></object>';
	} else {
		// If not IE for Windows use the browser itself to display
		html = '<img src="'+BaseURL+File;
		if(Live == true){ html += '&dummy=garb"';
		} else { theDate = new Date(); html += '&dummy='+theDate.getTime().toString(10)+'"'; }
		html += ' width="'+Width;
		html += ' height="'+Height;
		html += ' alt="Moving Image Stream">';
	} 
	document.write(html);
}