/**
 * NAT AG
 * @author Younes Labdidi
 * Copyright notice
 * (c) 2010 younes labdidi <younes.labdidi@nat.eu>
 * @date: 28/01/2010
 * All rights reserved
 */

	function detectBrowser(pageId){
		var ff 						= navigator.userAgent.indexOf('Firefox/3.5');
		var ff6 					= navigator.userAgent.indexOf('Firefox/3.6');
		var msie 					= navigator.userAgent.indexOf('MSIE 7');
		var msie_v8 				= navigator.userAgent.indexOf('MSIE 8');
		var gerMessage	 			= 'Achtung, Sie benutzen keinen der empfohlenen Internet Browser! \n\nZur fehlerfreien Nutzung aller NAT Intranet Webapplikationen benutzen Sie bitte einen der empfohlenen Internet Browser:\n* Microsoft Internet Explorer ab Ver. 7\n* Mozilla Firefox ab Ver. 3.5';
		var ungMessage              = 'Figyelem,Ön nem az ajánlott Internet Browser-t használja! \n\nHibamentes webalkalmazás érdekében használja az ajánlott Internet Browser egyikét:\n* Microsoft Internet Explorer 7\n* Mozilla Firefox 3.5';
		var engMessage	 			= 'Attention, you are not using any of the recommended Internet Browser! \n For an error-free use of all NAT intranet web applications please use one of the recommended Internet Browsers:\n* Microsoft Internet Explorer from version 7\n* Mozilla Firefox from version 3.5';
		var ungLang 	            = document.URL.indexOf('L=1');
		var engLang 	            = document.URL.indexOf('L=2');
		if(ungLang != -1){
			var message 			= ungMessage;
		}else if(engLang != -1){
			var message 			= engMessage;
		}else{
			var message 			= gerMessage;
		}
		if (pageId == 1 || pageId == 98 || pageId == 330 || pageId == 333 || pageId == 348 || pageId == 99 || pageId == 124 || pageId == 362 || pageId == 353) {
			if (ff == -1 && msie == -1 && msie_v8 == -1 && ff6 == -1) {
				alert(message);
			}
		}
	}
		
	function playSoundLogo(){
		var soundLogoSwf = document.getElementById('SoundLogo');
		var msie = navigator.userAgent.indexOf('MSIE');
		if(soundLogoSwf){
			soundLogoSwf.style.display='block';
			if(msie != -1){
				soundLogoSwf.Play();
			}
		}
		aktiv 	= window.setTimeout("gotoStartPage()", 3000);
	}
	
	function gotoStartPage(){
		document.location.href='/';
		window.clearTimeout(aktiv);
	}
	
	function openWindow (url,name) {
		 newWindow = window.open(url,name, "width=650,height=750,left=300,top=100,menubar=no,toolbar=no,statusbar=no,directories=no,locationbar=no,resizable=no,scrollbars=no");
	 	 newWindow.focus();
	}
	
	var status = true;
	function blinker(elementId){
		element  				= document.getElementById(elementId);
		if(status){
			element.className = "blink";
		}else{
			element.className = 'blinkout';
		}
		status=!status;
	}
	
	function setPwmBlinkInterval(){
		blinker("nat_pwm");
	}