<!--
var requiredVersion = 6;
var useRedirect = true; 
var flash2Installed = false;
var flash3Installed = false;
var flash4Installed = false;
var flash5Installed = false;
var flash6Installed = false;
var maxVersion = 7;
var actualVersion = 0;
var hasRightVersion = false;
var jsVersion = 1.0;
var isIE = false;
var isWin = false;
var defaultbgcolor = 'EEEEEE';

isIE = (navigator.appVersion.indexOf("MSIE") != -1) ? true : false;	
isWin = (navigator.appVersion.indexOf("Windows") != -1) ? true : false;
jsVersion = 1.1;
if(isIE && isWin){
	document.write('<SCRIP' + 'T LANGUAGE=VBScript\> \n');
	document.write('on error resume next \n');
	document.write('flash2Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.2"))) \n');
	document.write('flash3Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.3"))) \n');
	document.write('flash4Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.4"))) \n');
	document.write('flash5Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.5"))) \n');	
	document.write('flash6Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.6"))) \n');
	document.write('flash7Installed = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.7"))) \n');
	document.write('</SCRIP' + 'T\> \n'); 
}

function detectFlash(flashSource, flashWidth, flashHeight, alternativeSource, bgcolor){	
	if (navigator.plugins){
		if (navigator.plugins["Shockwave Flash 2.0"]
		|| navigator.plugins["Shockwave Flash"]){
			var isVersion2 = navigator.plugins["Shockwave Flash 2.0"] ? " 2.0" : "";
			var flashDescription = navigator.plugins["Shockwave Flash" + isVersion2].description;
			var flashVersion = parseInt(flashDescription.charAt(flashDescription.indexOf(".") - 1));
			flash2Installed = flashVersion == 2;		
			flash3Installed = flashVersion == 3;
			flash4Installed = flashVersion == 4;
			flash5Installed = flashVersion == 5;
			flash6Installed = flashVersion == 6;
			flash7Installed = flashVersion == 7;
		}
	}
	for (var i = 2; i <= maxVersion; i++) {	
		if (eval("flash" + i + "Installed") == true) actualVersion = i;
	}
	if (actualVersion >= requiredVersion) {
		launchFlash(flashSource, flashWidth, flashHeight, bgcolor);
	} else {
		launchFlashAlternative(alternativeSource);
	}
}

function launchFlash(flashSource, flashWidth, flashHeight, bgcolor){
//	alert ("lenght="+bgcolor.length);
//	alert ("bgcolor="+bgcolor);
//	if (bgcolor.lenght<1) {
//		alert ("hei");
//	   bgcolor = defaultbgcolor;
//	   }	
//	alert('hei');
	document.write('<object id="myFlash" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="' + flashWidth + '" height="' + flashHeight + '">');
  	document.write('<param name=movie value="' + flashSource + '">');
  	document.write('    <param name=quality value=high>');
	document.write('    <param name=bgcolor value="#' + bgcolor + '">');
	document.write('<param name=wmode value=transparent>');
  	document.write('    <embed name="myFlash" wmode="transparent" swLiveConnect="true" src="' + flashSource + '" bgcolor="#' + bgcolor + '" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="' + flashWidth + '" height="' + flashHeight + '">');
  	document.write('    </embed>'); 
  	document.write('</object>');
}

function launchFlashAlternative(alternativeSource){
	document.write('<b>Du har ikke Flash 6 installert. Du finner Flash 6 plugin hos <a target="_blank" style="text-decoration: underline;" href="http://www.macromedia.com">Macromedia</a>.</b><br/><br/>');
}

function openWindow(url) {
   var availheight=((screen.availHeight-500)/2);
   var availwidth=((screen.availWidth-600)/2);
    winStats='toolbar=no,location=no,directories=no,menubar=no,';
    winStats+='scrollbars=yes,width=600,height=500';
    if (navigator.appName.indexOf("Microsoft")>=0) {
       winStats+=',left='+availwidth+',top='+availheight;
     }else{
       winStats+=',screenX='+availwidth+',screenY='+availheight;
     }
    floater=window.open(url,"sprettopp",winStats)     
}

// -->