var min_size = 70;
var tamagnoLetras = 100;
var max_size = 180;

function plusText(idElemento) {
	if (document.all || document.getElementById) {
		var elemento = null;
		if (idElemento == "body") {
			var aReturn = document.getElementsByTagName("body");
			elemento = aReturn[0];
		} else {
			elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento);
		}
		if (elemento) {	
			// el valor esta indicado en porcentaje:
			if (tamagnoLetras <= max_size) {
				tamagnoLetras += 10;
				if (elemento.length) {
					for (i=0; i<elemento.length; i++) {
						elemento[i].style.fontSize = (tamagnoLetras+'%');
						}
				} else {
					elemento.style.fontSize = (tamagnoLetras+'%');
				}
			}
		}
	}
}

function minusText(idElemento) {
	if (document.all || document.getElementById) {	
		var elemento = null;
		if (idElemento == "body") {
			var aReturn = document.getElementsByTagName("body");
			elemento = aReturn[0];
		} else {
			elemento = document.all ? document.all[idElemento] : document.getElementById(idElemento);
		}
		if (elemento) {	
			// el valor esta indicado en porcentaje:
			if(tamagnoLetras >= min_size) {
				tamagnoLetras -= 10;
				if (elemento.length) {
					for (i=0; i<elemento.length; i++) {
						elemento[i].style.fontSize = (tamagnoLetras+'%');
					}
				} else {
					elemento.style.fontSize = (tamagnoLetras+'%');
				}
			}
		}
	}
}
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}
function subdivision(o){
	if(o.className == "show"){
		o.className = "";
	}else{
		o.className = "show"
	}
}
function subdivisionbeta(o){
	$("#"+o.id+" p.more").slideToggle("fast");
}

var externalURL = "";
function getScrollXY() {
  var scrOfX = 0, scrOfY = 0;
  if( typeof( window.pageYOffset ) == 'number' ) {
    //Netscape compliant
    scrOfY = window.pageYOffset;
    scrOfX = window.pageXOffset;
  } else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) {
    //DOM compliant
    scrOfY = document.body.scrollTop;
    scrOfX = document.body.scrollLeft;
  } else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) {
    //IE6 standards compliant mode
    scrOfY = document.documentElement.scrollTop;
    scrOfX = document.documentElement.scrollLeft;
  }
  return [ scrOfX, scrOfY ];
}

function getWindowSize() {
  var myWidth = 0, myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
    myHeight = document.body.clientHeight;
  }
  return [ myWidth, myHeight ];
}
$(document).ready(function () {
	$("a").click(function (e) {
		if(!this.href.match(site) && !this.href.match('javascript:') && !this.rel.match('nointersitial')){
			callIntersitial(this.href);
			return false;
		}
	});
	pageInit();
});
function callIntersitial(str){
	try {
		pageTracker._trackPageview('/intersitial');
	} catch(err){}
  	size = getWindowSize();
	scrll = getScrollXY();
	$("#InterSitial").css("display","block");
	$("#InterSitial").css("left",(size[0]/2)-121);
	$("#InterSitial").css("top",((size[1]/2)-64)+scrll[1]);
	externalURL = str;
}