// JavaScript Document
function popupWindowMap(URL,deltax,deltay,tope,margen) {
x=screen.availWidth;
y=screen.availHeight;
var 
//	deltax = deltax * x/100;
//	deltay = deltay * y/100;
	opciones = "toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=yes, width=" + (x-deltax)+", height="+(y-deltay)+", top="+tope+", left="+margen;
			
myWindow = window.open(URL, "", opciones);
}

function AbrirVentana2(URL, Ancho, Alto) {
tope = 50;
margenIzq = screen.availHeight - Ancho;
var 
	opciones="toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=yes, width=" + Ancho +", height=" + Alto + 
	", top=" + tope + ",left=" + margenIzq;
window.open(URL, "1", opciones);
}
            
function AbrirVentana(url, ancho, alto)	{ 

    var izquierda = (screen.availWidth - ancho) / 2; 
	if (screen.Height === 600) {
		var arriba = 3
	} else {
	    var arriba = (screen.availHeight - alto) / 2; 
	}

    var opciones = "fullscreen=0" + 
                 ",toolbar=0" +
                 ",location=0" +
                 ",status=0" + 
                 ",menubar=0" + 
                 ",scrollbars=0" + 
                 ",resizable=0" + 
                 ",width=" + ancho + 
                 ",height=" + alto + 
                 ",left=" + izquierda + 
                 ",top=" + arriba; 

    var ventana = window.open(url, "1", opciones, 1); 

}                     


function OnTimeOut() {}

function delay() {
/*	var  j = 2;
	for(i=0; i < 50000; i++) if (j == 2) j--; else j++;
*/
	timerid = window.setTimeout("OnTimeOut()",3000);
}

function checkBrowser(){
	this.ver=navigator.appVersion;
	this.dom=document.getElementById?1:0;
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4=(document.all && !this.dom)?1:0;
	this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie5 || this.ie4 || this.ns4 || this.ns5);
	return this;
}

bw=new checkBrowser()

function showhide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
//	delay();
	if(obj.display=='block' || obj.display=='block') obj.display='none'
	else obj.display='block'
}
function show(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
//	delay();
	obj.display='block';
}
function hide(div,nest){
	obj=bw.dom?document.getElementById(div).style:bw.ie4?document.all[div].style:bw.ns4?nest?document[nest].document[div]:document[div]:0; 
//	delay();
	obj.display='none';
}

function LugarFecha(){
var all;
var month;
var period;
var day;
function time(){
var currentDate=new Date()
year=currentDate.getYear()
hour=currentDate.getHours()
date=currentDate.getDate()
switch(currentDate.getMonth()){
        case 0:month="Enero";break;
        case 1:month="Febrero";break;
        case 2:month="Marzo";break;
        case 3:month="Abril";break;
        case 4:month="Mayo";break;
        case 5:month="Junio";break;
        case 6:month="Julio";break;
        case 7:month="Agosto";break;
        case 8:month="Septiembre";break;
        case 9:month="Octubre";break;
        case 10:month="Noviembre";break;
        case 11:month="Diciembre";break;
}
switch(currentDate.getDay()){
        case 0:day="Domingo";break;
        case 1:day="Lunes";break;
        case 2:day="Martes";break;
        case 3:day="Miércoles";break;
        case 4:day="Jueves";break;
        case 5:day="Viernes";break;
        case 6:day="Sábado";break;
}
var all="Santiago del Estero, República Argentina - " + day+" "+date+" de "+month+" de "+year 
document.write(all)
}
time()
}


//*********************************************************************************
// Function que valida que un campo contenga un string y no solamente un " "
// Es tipico que al validar un string se diga
//    if(campo == "") ? alert(Error)
// Si el campo contiene " " entonces la validacion anterior no funciona
//*********************************************************************************

//busca caracteres que no sean espacio en blanco en una cadena
function EstaVacio(q) {
	for ( i = 0; i < q.length; i++ ) {
		if ( q.charAt(i) != " " ) {
			return true
		}
	}
	return false
}

