hasFlashVersion = false;
document.observe("dom:loaded", function() {
	if($("home")) {
		$("nav").hide();
	}
		$$('table.zebra_table').each(function(tbl){
		Element.down(tbl,'tbody').select('tr').each(function(tr,i){
			if((i+1)%2 == 0){
				tr.addClassName('even');
			}
		});
	});
	
});


function showNav() {
	if($("home")) {
		new Effect.Appear('nav', {afterFinish: function() {$("nav").setStyle({"display": "block"});}});
	}
}

function showStartBg() {
	if($("home")) {
		$("wrapper_content").setStyle({backgroundImage: 'url(/fileadmin/sys/img/start_bg.jpg)', width: '1000px', height: '590px'});
	}
	showNav();

}

function changeImage(element) {
//alert(element);
}
var version = "n3";

function detectFlash(flashVersion) {
	
	var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
	if (plugin) {
		var words = navigator.plugins["Shockwave Flash"].description.split(" ");
		for (var i = 0; i < words.length; ++i) {
			if (isNaN(parseInt(words[i]))) {
				continue;
			}
			var pluginVersion = words[i];
		}
		
		hasFlashVersion = pluginVersion >= flashVersion;
		
		} else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE") >= 0 && (navigator.appVersion.indexOf("Win") != -1)) {
			document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n');
		 	//FS hide this from IE4.5 Mac by splitting the tag
			document.write('on error resume next \n');
			document.write('hasFlashVersion = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash.' + flashVersion + '")))\n');
			document.write('</SCR' + 'IPT\> \n');
		}
	return hasFlashVersion;
}

/* T3 functions */
function decryptCharcode(n,start,end,offset){n=n+offset;if(offset>0&&n>end){n=start+(n-end-1);}else if(offset<0&&n<start){n=end-(start-n-1);}
return String.fromCharCode(n);}
function decryptString(enc,offset){var dec="";var len=enc.length;for(var i=0;i<len;i++){var n=enc.charCodeAt(i);if(n>=0x2B&&n<=0x3A){dec+=decryptCharcode(n,0x2B,0x3A,offset);}else if(n>=0x40&&n<=0x5A){dec+=decryptCharcode(n,0x40,0x5A,offset);}else if(n>=0x61&&n<=0x7A){dec+=decryptCharcode(n,0x61,0x7A,offset);}else{dec+=enc.charAt(i);}}
return dec;}
function linkTo_UnCryptMailto(s){location.href=decryptString(s,-2);}
