﻿function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
//window.onload = externalLink

function PopupWindowEng()
{
PopupWindow('./images/mapa-eng.jpg',1077,903,false,false);
}
function PopupWindowPl()
{
PopupWindow('./images/mapa.jpg',1077,903,false,false);
}


function PopupWindow(pFileName, x, y, pScrollbars, pWindowName)
{
	if (typeof pWindowName == 'undefined')
	{
		pWindowName = 'popup';
	}
	
	if (typeof pScrollbars != 'undefined')
	{
		if (pScrollbars) {
			return window.open(pFileName, pWindowName, 'toolbar=no, scrollbars=yes, directories=no, status=no, menubar=no, resizable=no, width='+x+', height='+y);
		} else {
			return window.open(pFileName, pWindowName, 'toolbar=no, scrollbars=no, directories=no, status=no, menubar=no, resizable=no, width='+x+', height='+y);
		}
	}
	else
	{
		return window.open(pFileName, pWindowName, 'toolbar=no, scrollbars=auto, directories=no, status=no, menubar=no, resizable=no, width='+x+', height='+y);
	}
}




function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}
 
 function eraseCookie(name) {
	createCookie(name,"",-1);
}

 
function start(){

        	if(readCookie("CA") == null){
		createCookie("CA","1","2");
		return 0; 
		}
		else
		{
		return 0;
		}			
}


function start_eng(){

        	if(readCookie("CAE") == null){
		createCookie("CAE","1","2");
		return 0; 
		}
		else
		{
		return 0;
		}			
}

