function ventana(url,nombre,ancho,alto,scroll) {
newWindow = window.open(url,nombre,'resizable=yes,menubar=no,location=no,toolbar=no,status=no,scrollbars='+scroll+',directories=no,width='+ancho+',height='+alto+',left='+(screen.availWidth-ancho)/2+',top='+(screen.availHeight-alto)/2);
}



//------------------------------------------------------------------




function getCookie(name) {
  var cname = name + "=";
  var dc = document.cookie;
  if (dc.length > 0) {
    begin = dc.indexOf(cname);
    if (begin != -1) {
      begin += cname.length;
      end = dc.indexOf(";", begin);
      if (end == -1) end = dc.length;
        return unescape(dc.substring(begin, end));
    }
  }
  return null;
}

// --------------------------------------------------------------------------------------

function setCookie(name,value,days)
{
	// todo expira a un día
	days = 1;
	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 delCookie (name,path,domain) {
  if (getCookie(name)) {
    document.cookie = name + "=" +
    ((path == null) ? "" : "; path=" + path) +
    ((domain == null) ? "" : "; domain=" + domain) +
    "; expires=Thu, 01-Jan-70 00:00:01 GMT";
//     cambiaFuente('12', '');
  }
}

//-----------------------------------------------------------------------------------------------


// --------------------------------------------------------------------------------------
var firstCall = true;

// --------------------------------------------------------------------------------------
function cambia(fSize, increment) {
  
	if (firstCall) { firstCall = false;
		if (increment != "") cambia('12', '');
	}
  
	if (document.getElementsByTagName) {
		tags = new Array ("span");
		for (j=0; j<tags.length; j++) {
			var getElement = document.getElementsByTagName(tags[j]);
			var eachElement, currentFontSize, fontIncrease, newFontSize;
			for (i=0; i<getElement.length; i++) {
				eachElement = getElement[i];
				if (increment != "") {
					currentFontSize = parseInt(eachElement.style.fontSize);
					fontIncrease = parseInt(increment);
					newFontSize = currentFontSize + fontIncrease;

				} else if (fSize != "") newFontSize = parseInt(fSize);

				if (newFontSize > 15) newFontSize = 15;
				if (newFontSize < 11) newFontSize = 11;
				eachElement.style.fontSize = newFontSize + "px";
				setCookie('fontSize', newFontSize);
			}
		}
	}
}



//-----------------------------------------------------------------------------------------------