window.defaultStatus ='PlanetaECO';
window.status = 'PlanetaECO';
//window.statusbar.visible = "false";
document.all.tags("TITLE")[0].text = 'PlanetaECO';


function MM_swapImgRestore() { //v3.0

  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;

}



function MM_preloadImages(){

  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();

    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)

    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}

}



function MM_findObj(n, d){

  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {

    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}

  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];

  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); return x;

}



function MM_swapImage(){

  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)

   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}

}



function MM_openBrWindow(theURL,winName,features){

  window.open(theURL,winName,features);

}



function MM_showHideLayers() { //v3.0

  var i,p,v,obj,args=MM_showHideLayers.arguments;

  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];

    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v='hide')?'hidden':v; }

    obj.visibility=v; }

}



function popup_center_margin(url, margen){
	miheight=screen.availHeight-margen;
	miwidth=screen.availWidth-margen;
	
	mitop= (screen.height - miheight) / 2;
	mileft= (screen.width - miwidth) / 2;
	
	window.open (url, "'popup', top=" + mitop + ", left= " + mileft + ", height=" + miheight+ ", width=" + miwidth + ", resizable=yes toolbar=no, scrollbar=no, status=no, location=no")
}

function popup_center_size_old(url, miwidth, miheight){
	
	mitop= (screen.availHeight - miheight) / 2;
	mileft= (screen.availWidth - miwidth) / 2;
	
	window.open (url, "popup", "top=" + mitop + ", left= " + mileft + ", height=" + miheight + ", width=" + miwidth + ", resizable=yes toolbar=no, scrollbar=no, status=no, location=no")
}

function popup_center_size(winame, scroll, url, miwidth, miheight){
	
	mitop= (screen.availHeight - miheight) / 2;
	mileft= (screen.availWidth - miwidth) / 2;
	
	window.open (url, winame, "top=" + mitop + ", left= " + mileft + ", height=" + miheight + ", width=" + miwidth + ", resizable=yes toolbar=no, scrollbars=" + scroll + ", status=no, location=no")
}


function upload(tabla,campo_id,id,campo_img,path,oldfile,reload){

	file	=	'upload.asp?tabla='+ tabla +'&campo_id='+ campo_id +'&id='+ id +'&campo_img='+ campo_img +'&path='+ path +'&oldfile='+ oldfile +'&reload='+ reload

	

	open_popup(file,'upload',300,80)

}



function Calendario(path,formulario,campo)

{

	var top, left, width, height

	width		=	180

	height	=	210

	left		=	(screen.availWidth-width) / 2

	top			=	(screen.availHeight-height) / 2

	

	var popUp = window.open(path +'/calendario/calendario.asp?formulario='+ formulario +'&campo='+ campo,'calendario','top=' + top + ',left=' + left + ',height=' + height + ',width=' + width + 'scrolling=no');

	popUp.opener = self;

}


function expandingWindow(website) {
var heightspeed = 10; // vertical scrolling speed (higher = slower)
var widthspeed = 30;  // horizontal scrolling speed (higher = slower)
var leftdist = 0;    // distance to left edge of window
var topdist = 0;     // distance to top edge of window
if (document.all) {
var winwidth = window.screen.availWidth - leftdist;
var winheight = window.screen.availHeight - topdist;
var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");
for (sizeheight = 1; sizeheight < winheight; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < winwidth; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}


function expandingWindowSize(website,widthmio,heightmio) {
var heightspeed = 4; // vertical scrolling speed (higher = slower)
var widthspeed = 6;  // horizontal scrolling speed (higher = slower)

var leftdist = (screen.availWidth - widthmio)/2;    // distance to left edge of window
var topdist = (screen.availHeight - heightmio)/2;     // distance to top edge of window

var width = 1
var height = 1

if (document.all) {

//var winwidth = window.screen.availWidth;
//var winheight = window.screen.availHeight;

var sizer = window.open("","","left=" + leftdist + ",top=" + topdist + ",width=1,height=1,scrollbars=yes");

for (sizeheight = 1; sizeheight < heightmio; sizeheight += heightspeed) {
sizer.resizeTo("1", sizeheight);
}
for (sizewidth = 1; sizewidth < widthmio; sizewidth += widthspeed) {
sizer.resizeTo(sizewidth, sizeheight);
}
sizer.location = website;
}
else
window.location = website;
}

function right(e) {
if (navigator.appName == 'Netscape' && 
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' && 
(event.button == 2 || event.button == 3)) {
alert("Gracias por visitarnos");
return false;
}
return true;
}

//document.onmousedown=right;
//document.onmouseup=right;
//if (document.layers) window.captureEvents(Event.MOUSEDOWN);
//if (document.layers) window.captureEvents(Event.MOUSEUP);
//window.onmousedown=right;
//window.onmouseup=right;


// var message = new Array();
// Set your messages below -- follow the pattern.
// To add more messages, just add more elements to the array.
// message[0] = "Gruppo Consiglio";

// Set the number of repetitions (how many times the arrow
// cycle repeats with each message).
// var reps = 2;
// var speed = 150;  // Set the overall speed (larger number = slower action).

// DO NOT EDIT BELOW THIS LINE.
// var p = message.length;
// var T = "";
// var C = 0;
// var mC = 0;
// var s = 0;
// var sT = null;
// if (reps < 1) reps = 1;
// function doTheThing() {
// T = message[mC];
// A();
// }
// function A() {
// s++;
// if (s > 8) { s = 1;}
// you can fiddle with the patterns here...
// if (s == 1) { document.title = '>ญญญ '+T+' ญญญ<'; }
// if (s == 2) { document.title = '>>ญญ '+T+' ญญ<<'; }
// if (s == 3) { document.title = '>>>ญ '+T+' ญ<<<'; }
// if (s == 4) { document.title = 'ญ>>> '+T+' <<<ญ'; }
// if (s == 5) { document.title = 'ญญ>> '+T+' <<ญญ'; }
// if (s == 6) { document.title = 'ญญญ> '+T+' <ญญญ'; }
// if (s == 7) { document.title = 'ญญญญ '+T+' ญญญญ'; }
// if (s == 8) { document.title = 'ญญญญ '+T+' ญญญญ'; }
// if (C < (8 * reps)) {
// sT = setTimeout("A()", speed);
// C++;
// }
// else {
// C = 0;
// s = 0;
// mC++;
// if(mC > p - 1) mC = 0;
// sT = null;
// doTheThing();
//    }
// }
// doTheThing();


//function popupCenterSize(url, width, height)

//{

//	var width, height, mitop, mileft, url
	
//	mitop= (screen.availHeight - height) / 2
//	mileft= (screen.availWidth - width) / 2
	
//	window.open (url +',top=' + mitop + ',left=' + mileft + ',height=' + height + ',width=' +width+ , 'resizable=no, toolbar=no, scrollbar=no, status=no, location=no')
	
//	}

//function popupCenterMargin(url, margen)

//{
//	miheight=screen.availHeight-margen
//	miwidth=screen.availWidth-margen
	
//	mitop= (screen.availHeight - miheight) / 2
//	mileft= (screen.availWidth - miwidth) / 2
	
//	window.open (url, "popup", "top=" + mitop + ", left= " + mileft + ", height=" + miheight+ ", width=" + miwidth + ", resizable=yes toolbar=no, scrollbar=no, status=no, location=no")
//}

