/***************************************************************************************************************/
/***************************************************************************************************************/

function boton_1(){
	window.location = "./";
}

function boton_2(){
	window.location = "";
}

function boton_3(){
	window.location = "./foro/";
}

function boton_4(){
	window.location = "http://192.128.91.98/";
}

function boton_5(){
	window.location = "./?acc=encuestas&";
}


/***************************************************************************************************************/
/***************************************************************************************************************/
function MM_validateForm() {
  if (document.getElementById){
    var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
    for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=document.getElementById(args[i]);
      if (val) { nm=val.name; if ((val=val.value)!="") {
        if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
          if (p<1 || p==(val.length-1)) errors+='- '+nm+' debe ser un email valido.\n';
        } else if (test!='R') { num = parseFloat(val);
          if (isNaN(val)) errors+='- '+nm+' debe ser un numero.\n';
          if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
            min=test.substring(8,p); max=test.substring(p+1);
            if (num<min || max<num) errors+='- '+nm+' debe ser un numero entre: '+min+' y '+max+'.\n';
      } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' es obligatorio.\n'; }
    } if (errors) alert('Error:\n'+errors);
    document.MM_returnValue = (errors == '');
} }


function cNg(msj,url){
  var msj,url;
  if (confirm(msj) == true ){
		location=url;
		return;
  }else{
  		return;
  }
}



function popup(url,ancho,alto,scrolls,ampliable){
	var alt2cen	=(screen.availHeight/2)-(alto/2);
	var anc2cen	=(screen.availWidth/2)-(ancho/2);
	var prop 	= "toolbar=0, directories=0, location=0, status=1, top="+alt2cen+", left="+anc2cen+", scrollbars="+scrolls+", width="+ancho+", height="+alto+",resizable="+ampliable+" ";
 	var loadTime = (new Date()).getTime();
	var nombre	= "ventana"+loadTime;
	var url;
	v = window.open(url,nombre,prop);
	v.focus();
}



function calendario(campo){
	var url = "calendario.php?input="+campo;
	popup(url,300,150,0,0);
}


function popup2() {
	day = new Date();
	id = day.getTime();
	eval("page" + id + " = window.open('http://sesionesxinternet.concejopereira.gov.co/minipge/recursosplantilla/video.html', '" + id + "','toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=1,width=450,height=550');");
}