
	var popupwidth,popupheight;
	popupwidth = 1024;
	popupheight = 700;
	var wWidth,wHeight;
	var continueURL;
	
	Event.observe(
		window, 'load', function() {
			checkResolution();
		}
	);
	Event.observe(document, 'keydown', function(e) {
			onkeydown(e);
		}	
	);

	function onkeydown(e){
		if($('overlay')){
			if(e.keyCode==122){
				document.location = continueURL;
				hidePopupbox();
				return;
			}
			else{
				return;
			}
		}
		else{
			return;	
		}
	}
	
	function checkResolution(){
		if(!window.innerWidth){
			if(!(document.documentElement.clientWidth == 0)){
				wWidth = document.documentElement.clientWidth;
				wHeight = document.documentElement.clientHeight;
			}
			else{
				wWidth = document.body.clientWidth;
				wHeight = document.body.clientHeight;
			}
		}
		else{
			wWidth = window.innerWidth;
			wHeight = window.innerHeight;
		}

		if(wHeight<700 || wWidth<1024){
			cLink = $$('li a');
			$('Popup_close').onclick = hidePopupbox;
			for(i=0;i<cLink.length;i++){
				if(cLink[i].href.substring(0,10)!='javascript') cLink[i].onclick = showPopupbox;
			} 
			if($('overlay')){ // RESIZING WHEN OVERLAY ACTIVE, REPOSITION POPUP
				$('Popup').style.left=(wWidth-452)/2+'px';
				$('Popup').style.top=(wHeight-255)/2-100+'px'; //(wHeight-255)/2+'px';
				$('overlay').style.width=wWidth;
				$('overlay').style.height=wHeight;
			}
		}
	}
	
	function showPopupbox(){
		var arrURL,ISOLang,strOpenWindow,strResolutionWarning;
		if(screen.width>1024){
			if(screen.width>1280){
				popupwidth = 1280;
			}
			else{
				popupwidth = screen.width;
			}
		}
		if(screen.height>768){
			if(screen.height>960){
				popupheight = 900;
			}
			else{
				popupheight = screen.height;
			}
		}
		continueURL = this.href;
		window.open(continueURL,'pop','status=no,width='+popupwidth+',height='+popupheight+'');
		return false;
	}
	
	function Overlay(){
		if($('overlay')) return;
		objBody = document.getElementsByTagName("body").item(0);
		objOverlay = document.createElement('div');
		objOverlay.id = "overlay";
		objOverlay.setAttribute("id", "overlay");
		objBody.appendChild(objOverlay);
		
		$('overlay').style.width=wWidth;
		$('overlay').style.height=wHeight;
		$('overlay').style.top = '0px';
		//$('overlay').onclick = hidePopupbox;
	}

	function hidePopupbox(){
		$('Popup').style.display = "none";
		hideOverlay();
	}

	function hideOverlay(){
		$('overlay').remove();
	}

	var arrOpenWindow = new Array();
	var arrResWarning = new Array();


arrOpenWindow[0] = new Array('EU_EN','OPEN WINDOW');
arrOpenWindow[1] = new Array('AT_DE','FENSTER ÖFFNEN');
arrOpenWindow[2] = new Array('DE_DE','FENSTER ÖFFNEN');
arrOpenWindow[3] = new Array('NL_NL','OPEN VENSTER');
arrOpenWindow[4] = new Array('PT_PT','ABRIR JANELA');
arrOpenWindow[5] = new Array('ES_ES','ABRIR VENTANA');
arrOpenWindow[6] = new Array('PL_PL','Otwórz w oknie');
arrResWarning[0] = new Array('EU_EN','YOUR BROWSER SCREEN SIZE IS TOO SMALL<br/>CLICK ON "OPEN WINDOW"<br/>OR PRESS THE "F11" KEY ON YOUR KEYBOARD<br/>TO OPEN THE WEBSITE IN A BIGGER WINDOW');
arrResWarning[1] = new Array('AT_DE','IHRE BROWSER BILDSCHIRMGRÖSSE IST ZU KLEIN<br/>KLICKEN SIE AUF “FENSTER ÖFFNEN”<br/>ODER DRÜCKEN SIE “F11” AUF IHRER TASTATUR<br/>UM DIE WEBSITE IN EINEM GRÖSSEREN FENSTER ZU ÖFFNEN');
arrResWarning[2] = new Array('DE_DE','IHRE BROWSER BILDSCHIRMGRÖSSE IST ZU KLEIN<br/>KLICKEN SIE AUF “FENSTER ÖFFNEN”<br/>ODER DRÜCKEN SIE “F11” AUF IHRER TASTATUR<br/>UM DIE WEBSITE IN EINEM GRÖSSEREN FENSTER ZU ÖFFNEN');
arrResWarning[3] = new Array('NL_NL','UW SCHERMGROOTTE IS TE KLEIN<br/>KLIK OP "OPEN WINDOW"<br/>OF DRUK DE "F11" TOETS IN OP UW TOETSENBORD<br/>OM DE WEBSITE IN EEN GROTER VENSTER TE OPENEN');
arrResWarning[4] = new Array('PT_PT','AUMENTE O TAMANHO DA JANELA DO SEU BROWSER<br/>CARREGUE EM "ABRIR JANELA"<br/>OU PRESSIONE A TECLA "F11" NO SEU TECLADO<br/>PARA ABRIR O WEBSITE NUMA JANELA MAIOR');
arrResWarning[5] = new Array('ES_ES','EL TAÑAMO DE PANTALLA DE SU NAVEGADOR es demasiado pequeño <br/> haga clic en "Abrir ventana" <br/> o pulse el "F11" en el teclado <br/> PARA ABRIR EL SITIO WEB EN UNA VENTANA MÁS GRANDE');
arrResWarning[6] = new Array('PL_PL','Rozdzielczość Twojego ekranu jest zbyt mała, aby poprawnie wyświetlić tę stronę. Musisz otworzyć ją w oknie');

function getLabelFromArry(arr,isolang,firstindex,indexvalue){
	var returnValue = "";
	for(var i = 0;i<arr.length;i++){
		if(arr[i][0]==isolang){
			if(arr[i][firstindex].constructor.toString().indexOf("Array") == -1){
				returnValue =arr[i][firstindex];
			}
			else{
				returnValue = arr[i][firstindex][indexvalue];
			}
		}
	}
	return returnValue;
}
