// --------------------------
// Funciones Surinter - Español
// --------------------------

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

document.write ("<font face='Verdana, Geneva, Arial, Helvetica, sans-serif' size='1'  color='#666666'>Resolución 800x600 o superior - &reg; Diseño Web -&nbsp;</font>")
 }
 
// Función Dirección
function Direccion() {

document.write ("<font face='Verdana, Geneva, Arial, Helvetica, sans-serif' size='1'  color='#999999'>Maza 108 | Tel: [54] (02627) 42-9474 - Fax: 43-1481 |(5600) San Rafael Mendoza - Argentina | E-mail: </font> <a href='contacto.php'><font size='1'  color='#999999'>infoapart@terrazasapartments.com.ar </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 color='#666666'>"  + date + " de " + textout +" de "+ year +"</font>");
}


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

// Función Popup mejorada
	function WinPop (URL, ancho, alto, barra){ 
		msgWindow=window.open(URL,"OpenWindow",
		"width=" + ancho + ",height=" + alto + ",scrollbars="+ barra);
	}
	
	// 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 Legal, Politicas y cerrar (Popup)
	window.name='lno';
		function mOvr(src) {
			if (!src.contains(event.fromElement)) {
			src.style.cursor = 'hand';
			src.bgColor = '#f7f7f7';
			}
		}
		function mOut(src) {
			if (!src.contains(event.toElement)) {
			src.style.cursor = 'default';
			src.bgColor = '#ffffff';
			}
		}
		function mClk(src) {
			if(event.srcElement.tagName=='TD'){
			src.children.tags('A')[0].click();
			}
		}




// Función de Menú Principal
function sobre(src,Color) {
    if (!src.contains(event.fromElement)) {
	  src.style.cursor = 'hand';
	  src.bgColor = Color;}}
function fuera(src,Color2) {
	if (!src.contains(event.toElement)) {
	  src.style.cursor = 'default';
	  src.bgColor = Color2;}}
function pulsar(src) {
    if(event.srcElement.tagName=='TD'){
	  src.children.tags('A')[0].click();}}

function BeginMenu(ancho) {
 document.write('<table width="'+ancho+'" border="0" cellspacing="0" cellpadding="3" bgcolor="#cccccc">');
}

function ItemMenu(nombre, url, target, label){
 document.write('<tr><td onClick="pulsar(this)" onMouseOut="fuera(this,');
 document.write("'#ffffff'");
 document.write(');" onMouseOver="sobre(this,');
 document.write("'#f7f7f7'");
 document.write(');" bgcolor="#ffffff"><a class="menu" href="');
 document.write(url+'"');
 if (target == "_blank") { document.write('target="'+target+'"'); }
 document.write('><font color="#666666">');
 if (label != "") { document.write('<acronym title="'+label+'">'); }
 document.write(nombre);
 if (label != "") { document.write('</acronym>'); }
 document.write('</font></a></td></tr>');
 document.write('<td height="1"></td>');  // Línea Separatoria
}

function EndMenu(){
 document.write('</table>');
}

function Menu(){
	BeginMenu('150');
	ItemMenu(':: inicio','../esp/index.php','','')
	ItemMenu(':: objetivos','../esp/objetivos.php','','')
	ItemMenu(':: portfolio','../esp/portfolio.php','','')
	ItemMenu(':: equipamiento','../esp/equipos.php','','')
	ItemMenu(':: nuestros planes','../esp/planes.php','','')
	ItemMenu(':: empresa','../esp/empresa.php','','')
	ItemMenu(':: contáctenos','../esp/contacto.php','','')
	//ItemMenu(':: último trabajo realizado','../esp/ult_trabajo.php','','')
	EndMenu()
}

function MenuDesarrollos(){ //Menu de Desarrollos PHP
	BeginMenu('150');
	ItemMenu(':: libro de visitas','../php/index.php','','')
	ItemMenu(':: estadísticas','../php/objetivos.php','','')
	ItemMenu(':: buscador temático','../php/portfolio.php','','')
	ItemMenu(':: servicio de noticias','../php/equipos.php','','')
	ItemMenu(':: foros','../php/planes.php','','')
	ItemMenu(':: chat','../php/empresa.php','','')
	ItemMenu(':: e-mail dentro del sitio','../php/contacto.php','','')
	EndMenu()
}

// ---------- Menu ------------
/*window.name='lno';
	function mOvr(src) {
		if (!src.contains(event.fromElement)) {
		src.style.cursor = 'hand';
		src.bgColor = '#6ccc6f';
		}
	}
	function mOut(src) {
		if (!src.contains(event.toElement)) {
		src.style.cursor = 'default';
		src.bgColor = '#ffffff';
		}
	}
	function mClk(src) {
		if(event.srcElement.tagName=='TD'){
		src.children.tags('A')[0].click();
		}
	}*/
// 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> .: TURISMO BUTTINI HNOS :. </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();
}	
