function getFlashVersion() {
	// ie
	try {
		try {
			// avoid fp6 minor version lookup issues
			// see:
			// http://blog.deconcept.com/2006/01/11/getvariable-setvariable-crash-internet-explorer-flash-6/
			var axo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash.6');
			try {
				axo.AllowScriptAccess = 'always';
			} catch (e) {
				return '6,0,0';
			}
		} catch (e) {
		}
		return new ActiveXObject('ShockwaveFlash.ShockwaveFlash').GetVariable(
				'$version').replace(/\D+/g, ',').match(/^,?(.+),?$/)[1];
		// other browsers
	} catch (e) {
		try {
			if (navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) {
				return (navigator.plugins["Shockwave Flash 2.0"] || navigator.plugins["Shockwave Flash"]).description
						.replace(/\D+/g, ",").match(/^,?(.+),?$/)[1];
			}
		} catch (e) {
		}
	}
	return '0,0,0';
}

function pageWidth() {
	return window.innerWidth != null ? window.innerWidth
			: document.documentElement && document.documentElement.clientWidth ? document.documentElement.clientWidth
					: document.body != null ? document.body.clientWidth : null;
}
function pageHeight() {
	return window.innerHeight != null ? window.innerHeight
			: document.documentElement && document.documentElement.clientHeight ? document.documentElement.clientHeight
					: document.body != null ? document.body.clientHeight : null;
}
function posLeft() {
	return typeof window.pageXOffset != 'undefined' ? window.pageXOffset
			: document.documentElement && document.documentElement.scrollLeft ? document.documentElement.scrollLeft
					: document.body.scrollLeft ? document.body.scrollLeft : 0;
}
function posTop() {
	return typeof window.pageYOffset != 'undefined' ? window.pageYOffset
			: document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop
					: document.body.scrollTop ? document.body.scrollTop : 0;
}
function posRight() {
	return posLeft() + pageWidth();
}
function posBottom() {
	return posTop() + pageHeight();
}

var FlashVersion = getFlashVersion();

$(document).ready(function(){
	$('#panel-cookies p').html('<img src="img/ajax-loader.gif" /> Fetching Details');
	$('.panel').show();
	setTimeout("DisplayValues()",500);
});

function DisplayValues(){
	$('#machine-code').load('profile/update.php?screen_x=' + screen.width + '&screen_y=' + screen.height + '&browser_x=' + pageWidth() + '&browser_y=' + pageHeight() + '&colour_depth=' + screen.colorDepth + '&flash=' + FlashVersion);
	$('#panel-flash p').html(FlashVersion.replace(',','.').replace(',','.'));
	$('#panel-resolution p').html(screen.width + ' x ' + screen.height);
	$('#panel-browser-size p').html(pageWidth() + ' x ' + pageHeight());
	$('#panel-colour-depth p').html(screen.colorDepth + ' Bit');
	$('#panel-javascript p').html('Is Enabled');
}
