// --------------------------
// Funciones Javier Castan - Español
// --------------------------

// Función Derechos Reservados
function Derechos() {

document.write ("<font face='Verdana, Geneva, Arial, Helvetica, sans-serif' size='1'  color='#ffffff'>Manlio De Martis ® Sol y Nieve EVYT leg. 11.178 -</font>")
 }
 
// Función Fecha
function FechaActual() {
	var now = new Date();
	var textout;
	var day = now.getDay();
	var month = now.getMonth();
	var date = now.getDate();
	var year = now.getYear();
	
	if (month==0) textout="enero";
	if (month==1) textout="febrero";
	if (month==2) textout="marzo";
	if (month==3) textout="abril";
	if (month==4) textout="mayo";
	if (month==5) textout="junio";
	if (month==6) textout="julio";
	if (month==7) textout="agosto";
	if (month==8) textout="setiembre";
	if (month==9) textout="octubre";
	if (month==10) textout="noviembre";
	if (month==11) textout="diciembre";
	
	document.write ("<font size='1' color='#ff9933'>" + date + " de " + textout +" de "+ year +"</font>");
}


// Función Popup 
function WinPopup (URL){ 
	msgWindow=window.open(URL,"OpenWindow",
	"width=400,height=400,scrollbars=yes");
}

// Función cerrar Popup
function cw () {
  close();
}

// Función Popup siempre visible
var TieneFoco = true
function CambiarTieneFoco() {
	if (TieneFoco == true) {
		TieneFoco = false
		document.formModo.modo.value = "Normal"
	} else if (TieneFoco == false) {
		TieneFoco = true
		document.formModo.modo.value = "Siempre visible"
		DaFoco()
	}
}

function DaFoco() {
	if (TieneFoco == true)
		setTimeout("self.focus()",100)
}

// Función Botones para que se coloree el fondo
window.name='lno';
	function mOvr(src) {
		if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.bgColor = '#758792';
		}
	}
	function mOut(src) {
		if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = '#f7f7f7';
		}
	}
	function mClk(src) {
		if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
		}
	}

// Función Popup y ajusta
/*function Popup (URL, ancho, alto, barra, ajuste){
	msgWindow=window.open(URL,"OpenWindow", 
	"width=" + ancho + ",height=" + alto + ",scrollbars=" + barra);
	if (ajuste=='yes') {
		msgWindow2=window.resizeTo(ancho, alto);
	}
}*/


// Función abrir Popup
function Popup(def, foto,ancho, alto) {
 windowname = 'def' + def;
 popupwin=window.open( "", windowname, "toolbar=no, location=no, directories=no, status=no, menubar=no, width=" + ancho + ",height=" + alto);
 shtml = "<HTML><HEAD></HEAD><title> .: Javier Castán & Asociados :. </title>";
 shtml = shtml + "<body leftmargin='0' topmargin='0' marginwidth='0'"; 
 shtml = shtml + " marginheight='0'>" + "<img src='" + foto + "' align='middle' >";
 shtml = shtml + "<div align='right'><font face='Verdana, Geneva, Arial, Helvetica, sans-serif'";
 shtml = shtml + "</body></HTML>";
 popupwin.document.write( shtml );
 popupwin.document.close();
}


// Función para imprimir
function imprimir() {
  self.print();
}


function horizontal (def, foto,ancho, alto)
{
windowname='def' + '';

popupwin=window.open("",windowname,"width="+ancho+",height="+alto);

popupwin.document.write("<HTML><HEAD></HEAD><title> - Fotos de Via-Sol  </title><body bgcolor='#CCCCCC' leftmargin='0' topmargin='0' marginwidth='0' marginheight='0'>" + def + "<img src='" + foto + "'>");

popupwin.document.close();

}
