var flashVersion = 0;
function getFlashVersion() {
	var agent = navigator.userAgent.toLowerCase(); 	
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }  
	// NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
	if (navigator.plugins != null && navigator.plugins.length > 0) {
		var flashPlugin = navigator.plugins['Shockwave Flash'];
		if (typeof flashPlugin == 'object') { 
			if (flashPlugin.description.indexOf('7.') != -1) flashVersion = 7;
			else if (flashPlugin.description.indexOf('6.') != -1) flashVersion = 6;
			else if (flashPlugin.description.indexOf('5.') != -1) flashVersion = 5;
			else if (flashPlugin.description.indexOf('4.') != -1) flashVersion = 4;
			else if (flashPlugin.description.indexOf('3.') != -1) flashVersion = 3;
		}
	}
	// IE4+ Win32:  attempt to create an ActiveX object using VBScript	
	else if (navigator.appName.indexOf("Microsoft Internet Explorer") != -1) {
	    document.write('<scr' + 'ipt language="VBScript"\> \n');
		document.write('on error resume next \n');
		document.write('For i = 2 to 6\n');
		document.write('If Not(IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & i))) Then \n');
		document.write('Else \n');
		document.write('flashVersion = i \n');
		document.write('End If \n');
		document.write('Next \n');
		document.write('</scr' + 'ipt\> \n');
  	}	
	// WebTV 2.5 supports flash 3
	else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;
	// older WebTV supports flash 2
	else if (agent.indexOf("webtv") != -1) flashVersion = 2;
	// Can't detect in all other cases
	else {
		flashVersion = 0;
	}
	return flashVersion;
}

function getJavaScriptVersion() {
	document.write('<SCR' + 'IPT> \n');
	document.write('var js_v = 1.0; \n');
	document.write('</SCR' + 'IPT> \n'); 
	document.write('<SCR' + 'IPT LANGUAGE="JavaScript1.3"> \n'); 
	document.write('var js_v = 1.3; \n'); 
	document.write('</SCR' + 'IPT> \n');
	document.write('<SCR' + 'IPT LANGUAGE="JavaScript1.4"> \n');
	document.write('var js_v = 1.4; \n'); 
	document.write('</SCR' + 'IPT> \n'); 
	document.write('<SCR' + 'IPT LANGUAGE="JavaScript1.5"> \n');
	document.write('var js_v = 1.5; \n');
	document.write('</SCR' + 'IPT> \n');
	document.write('<SCR' + 'IPT LANGUAGE="JavaScript2.0"> \n');
	document.write('var js_v = 2.0; \n'); 
	document.write('</SCR' + 'IPT> \n');
	return js_v;
}

var live_url = '/page/netupdater/netupdater_live/test.php';

function oNMflashlive(onmid) {
	liveImage.src= live_url + '?onmid=' + onmid;
}

function oNMlive(onmid) {
    
    var w = '';
    var l = window.location.search.length;
    if (l>10 && location.search.substring(l-10, l)=='kampagne=1') w = '&w=true';
	var ft = 0;
	var v = "";
	v = navigator.appName;
	if (v != "Netscape") ft = screen.colorDepth;
	else ft = screen.pixelDepth;
	var a = "0";
	a = screen.width + "x" + screen.height;
	var r = "";
	r = top.document.referrer;
	if ((r == "") || (r == "[unknown origin]") || (r == "unknown") || (r == "undefined"))
		{r = document.referrer;
		if ((r == "[unknown origin]") || (r == "unknown") || (r == "undefined"))
			{r = "";}}
	r = r.replace(/&/g, "%LIVE");
	var h = "";
	h = window.location.hostname;
	var fv = getFlashVersion();
	var js_v = getJavaScriptVersion();
	var g = "?onmid=" + onmid + "&r=" + r + "&a=" + a + "&h=" + h + "&ft=" + ft + "&fv=" + fv + "&js=" + js_v + w;
	document.open();
	document.write("<img id='liveImage' src='" + live_url + g + "' alt='' border='0' height='1' width='1'>");
	document.close();
}