/*
 * Copyright 2010
 * Asesores Informaticos Svfnet
 * Author: Julio Varela
 * Date: Junio 02, 2010
 */

<!--

//*******************************************
// script de Inhabilitacion de Textos   
//*******************************************

//Disable select-text script (IE4+, NS6+)- By Andy Scott
//Exclusive permission granted to Dynamic Drive to feature script
//Visit http://www.dynamicdrive.com for this script

function disableselect(e){
return false
}

function reEnable(){
return true
}

//if IE4+
document.onselectstart=new Function ("return false")

//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}

//*******************************************
// script de fecha   
//*******************************************
  var hoy = new Date();
  var anio = hoy.getYear();
  var mName = hoy.getMonth() + 1;
  var dName = hoy.getDay() + 1;
  var diaNr = ((hoy.getDate()<10) ? "" : "") + hoy.getDate();
  if(dName==1) Dia = "Domingo";
  if(dName==2) Dia = "Lunes" ;
  if(dName==3) Dia = "Martes";
  if(dName==4) Dia = "Mircoles";
  if(dName==5) Dia = "Jueves";
  if(dName==6) Dia = "Viernes";
  if(dName==7) Dia = "Sbado";
  if(mName==1) Mes = "Enero" ;
  if(mName==2) Mes = "Febrero";
  if(mName==3) Mes = "Marzo" ;
  if(mName==4) Mes = "Abril" ;
  if(mName==5) Mes = "Mayo" ;
  if(mName==6) Mes = "Junio" ;
  if(mName==7) Mes = "Julio" ;
  if(mName==8) Mes = "Agosto";
  if(mName==9) Mes = "Septiembre";
  if(mName==10) Mes = "Octubre";
  if(mName==11) Mes = "Noviembre";
  if(mName==12) Mes = "Diciembre";
  window.defaultStatus = "Clínica Renacimiento - " + Dia + " " + diaNr + " de " + Mes + " de " + anio

//*******************************************
// script de boton derecho   
//*******************************************
function derecha(e) {
if (navigator.appName == 'Netscape' && (e.which == 3 || e.which == 2)){
alert('Clínica Renacimiento\nFunción Desactivada')
return false;
}
else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button == 2)){
alert('Clínica Renacimiento\nFunción Desactivada')
}
}
document.onmousedown=derecha


//*****************************************
// script imagen slide show 
//*****************************************

// intervalo entre imagenes (en milisegunndos)
var slidespeed=3000

// especificación de imagenes
var slideimages=new Array("imagenes/promo02.jpg","imagenes/promo03.jpg","imagenes/promo04.jpg","imagenes/promo05.jpg")

// especificación de links
var slidelinks=new Array("medicina-estetica/remodelacion-facial.php","medicina-estetica/rejuvenecimiento-total.php","medicina-estetica/estetica-masculina.php","medicina-estetica/programa-reductor.php")

var newwindow=0 // abre links en nueva ventana? 1=si, 0=no

var imageholder=new Array()
var ie=document.all
for (i=0;i<slideimages.length;i++){
imageholder[i]=new Image()
imageholder[i].src=slideimages[i]
}

function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink])
else
window.location=slidelinks[whichlink]
}

//*******************************************
// script acordion   
//*******************************************
var accordion=function(){
	var tm=sp=10;
	function slider(n){this.nm=n; this.arr=[]}
	slider.prototype.init=function(t,c,k){
		var a,h,s,l,i; a=document.getElementById(t); this.sl=k?k:'';
		h=a.getElementsByTagName('dt'); s=a.getElementsByTagName('dd'); this.l=h.length;
		for(i=0;i<this.l;i++){var d=h[i]; this.arr[i]=d; d.onclick=new Function(this.nm+'.pro(this)'); if(c==i){d.className=this.sl}}
		l=s.length;
		for(i=0;i<l;i++){var d=s[i]; d.mh=d.offsetHeight; if(c!=i){d.style.height=0; d.style.display='none'}}
	}
	slider.prototype.pro=function(d){
		for(var i=0;i<this.l;i++){
			var h=this.arr[i], s=h.nextSibling; s=s.nodeType!=1?s.nextSibling:s; clearInterval(s.tm);
			if(h==d&&s.style.display=='none'){s.style.display=''; su(s,1); h.className=this.sl}
			else if(s.style.display==''){su(s,-1); h.className=''}
		}
	}
	function su(c,f){c.tm=setInterval(function(){sl(c,f)},tm)}
	function sl(c,f){
		var h=c.offsetHeight, m=c.mh, d=f==1?m-h:h; c.style.height=h+(Math.ceil(d/sp)*f)+'px';
		c.style.opacity=h/m; c.style.filter='alpha(opacity='+h*100/m+')';
		if(f==1&&h>=m){clearInterval(c.tm)}else if(f!=1&&h==1){c.style.display='none'; clearInterval(c.tm)}
	}
	return{slider:slider}
}();

//*******************************************
// script de buscador gmaps   
//*******************************************
function enviar(form){
	var from, to;
	if (form.name=="form1")	from = "Principe de Vergara 55, 28006, Madrid"
	else if(form.name=="form2") from = "Gran Via de San Marcos 15, 24001, Leon"
	else if(form.name=="form3") from = "Passeig de Gràcia 118, 08008, Barcelona"
	else if(form.name=="form4") from = "Calle Mayor 86, 12001, Castellon"
	else if(form.name=="form5") from = "Gran Vía de Ramón y Cajal, 41, 46007 Valencia"
	else if(form.name=="form6") from = "Calle de Ramón y Cajal, 3, 13196, Ciudad Real"
	else if(form.name=="form7") from = "Calle de Manuel Casana, 7, 41005, Sevilla"
	else if(form.name=="form8") from = "Calle Galicia, 15, 35006, Las Palmas de Gran Canarias"
 	var to= form.direccion.value;
	window.open("http://maps.google.es/maps?f=d&daddr="+from+"&saddr="+to);
}

//*******************************************
// script de Maximizar Página   
//*******************************************
top.window.moveTo(0,0);
if (document.all) {
top.window.resizeTo(screen.availWidth,screen.availHeight);
}
else if (document.layers||document.getElementById) {
if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth){
top.window.outerHeight = screen.availHeight;
top.window.outerWidth = screen.availWidth;
}
}

//-->


