function SnapShot(imagewidth, imageheight, url, port, camname, compression, colorlevel, text, date, clock)
{
	var windowwidth = imagewidth + 20;
	var windowheight = imageheight + 59;
	var windowposw = (screen.width / 2) - (windowwidth / 2);
	var windowposh = (screen.height / 2) - (windowheight / 2);
	var windowargs = "scrollbars=no,toolbar=no,location=no,directories=no,status=no,menubar=no,resizable=no,width=" + windowwidth + ",height=" + windowheight + ",left=" + windowposw + ",top=" + windowposh;

	popupwindow = window.open("", camname, windowargs);
	popupwindow.document.writeln("<html><head><META HTTP-EQUIV=\"Expires\" CONTENT=\"0\"><META HTTP-EQUIV=\"Pragma\" CONTENT=\"no-cache\"><META HTTP-EQUIV=\"Cache-Control\" CONTENT=\"no-cache\"><title>Live Snapshot " + imagewidth + "x" + imageheight + " Axis " + camname + "<\/title><LINK REL=stylesheet TYPE=\"text/css\" HREF=\"css/style.css\"><\/head>");
	popupwindow.document.writeln("<body><body ondragstart=\"return false\" onselectstart=\"return false\">");
	popupwindow.document.writeln("<center><p id=1>Right Click the image and choose &quot;Save As&quot;<\/p>");
	popupwindow.document.writeln("<img src=\"http://" + url + ":" + port + "/axis-cgi/jpg/image.cgi?camera=1&resolution=" + imagewidth + "x" + imageheight +"&compression=" + compression + "&colorlevel=" + colorlevel + "&text=" + text + "&date=" + date + "&clock=" + clock + "\">");
	popupwindow.document.write("<\/center><\/body><\/html>");
}

function Reset(url) 
{
	page = window.open(url, 'PTZReset', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=1,height=1,left=3000,top=3000');
	page.focus();
	setTimeout("page.close()",5000);
}