if (typeof(sppc_cookie) == 'undefined') {
	var sppc_cookie = Math.round(Math.random() * 1000);
}
if (typeof(sppc_use_flash) == 'undefined') {
	var sppc_use_flash = 0;
	if (navigator.plugins && navigator.plugins.length) {
		if (navigator.plugins['Shockwave Flash'] || navigator.plugins['Shockwave Flash 2.0']) {
			sppc_use_flash = 1;
		}
	} else if (navigator.mimeTypes && navigator.mimeTypes.length) {
		x = navigator.mimeTypes['application/x-shockwave-flash'];
		if (x && x.enabledPlugin) {
			sppc_use_flash = 1;
		}
	} else if (navigator.userAgent && navigator.userAgent.indexOf('MSIE') >= 0 && (navigator.appVersion.indexOf('Win') != -1)) {
		// MSIE
		var flash_latest_version = 12;
		try {
			for (i = 3; i <= flash_latest_version; i++) {
				if (eval('new ActiveXObject("ShockwaveFlash.ShockwaveFlash.'+i+'")')) {
					sppc_use_flash = 1;
					break;
				}
			}
		} catch(e) {}
	} else {
		// Unknown
		sppc_use_flash = -1;
	}
}
var sppc_floatingad_last_show = 0;
if (document.cookie.length > 0) {
	c_name = "sppc_floatingad_last_show";
	c_start = document.cookie.indexOf(c_name + "=");
	if (c_start != -1) {
		c_start = c_start + c_name.length + 1;
		c_end = document.cookie.indexOf(";", c_start);
		if (c_end == -1) {
			c_end = document.cookie.length;
		}
		sppc_floatingad_last_show = unescape(document.cookie.substring(c_start, c_end));
	}
}
var sppc_dialog_width = 0;
var sppc_dialog_height = 0;
if (typeof window.innerWidth != 'undefined') {
	// the more standards compliant browsers (mozilla/netscape/opera/IE7) use window.innerWidth and window.innerHeight
	sppc_dialog_width = window.innerWidth;
	sppc_dialog_height = window.innerHeight;
} else if (typeof document.documentElement != 'undefined' &&
			  typeof document.documentElement.clientWidth != 'undefined' &&
			  document.documentElement.clientWidth != 0) {
	// IE6 in standards compliant mode (i.e. with a valid doctype as the first line in the document)
	sppc_dialog_width = document.documentElement.clientWidth;
	sppc_dialog_height = document.documentElement.clientHeight;
} else {
	// older versions of IE
	sppc_dialog_width = document.getElementsByTagName('body')[0].clientWidth;
	sppc_dialog_height = document.getElementsByTagName('body')[0].clientHeight;
}
var first_url = escape('http://flagads.net/floatingad?id_site='+sppc_site+'&id_user='+sppc_user+'&ident='+Math.round(Math.random() * 10000)+'&ref='+escape(document.URL)+'&sr='+escape(document.referrer)+'&ck='+sppc_cookie+'&uf='+sppc_use_flash+'&cls='+sppc_floatingad_last_show+'&dgw='+sppc_dialog_width+'&dgh='+sppc_dialog_height);
document.write(unescape("%3Cscript src='" + first_url + "' type='text/javascript' charset='UTF-8'%3E%3C/script%3E"));

