// JavaScript Document

function openStartWindow( ){
	var new_window = window.open('start.html','main','toolbar=0,location=0,status=0,menubar=0,scrollbars=0,resizable=0,width=800,height=442');
	new_window.focus();
}

function openProjekteWindow( linkUrl ){
	projekte_window = window.open( linkUrl ,'projekte','toolbar=0,location=0,status=0,menubar=0,scrollbars=1,resizable=1,width=300,height=420');
	projekte_window.focus();
}

var matchFlashVersion = '';
var clientFlashPlugin = '';

if ( navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1) ) {
	document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); 
	document.write('on error resume next \n');
	document.write('matchFlashVersion = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & neededFlashVersion )))\n');
	document.write('</SCR' + 'IPT\> \n');
}

function checkFlashPlugin(){
	var matchFlashVersion = false;
	// speeds up plugin checking when using more then once in a page
	if( clientFlashPlugin == '' ){
		clientFlashPlugin = getFlashPlugin();
	}
	
	if ( clientFlashPlugin ) {
		var pluginDesc = navigator.plugins["Shockwave Flash"].description.split(" ");
	    for (var i = 0; i < pluginDesc.length; ++i){
			if (isNaN(parseInt(pluginDesc[i])))
				continue;
			var clientFlashVersion = pluginDesc[i]; 
	    }
		if( clientFlashVersion >= neededFlashVersion ){
			matchFlashVersion = true;
		}
	} 
	return matchFlashVersion;
}

function getFlashPlugin(){
	var actPlugins = 0;
	if( navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] ){
		actPlugins = navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin;
	}
	return actPlugins;
}

