//Funciones para los scroll de imagenes
var actualwidth=''
var cross_slide, ns_slide
var finalslide=''

function fillup(iedom,copyspeed, slideshowgap, leftrightslide)
{
 if (iedom){
 	cross_slide=document.getElementById? document.getElementById("test2") : document.all.test2
	cross_slide2=document.getElementById? document.getElementById("test3") : document.all.test3
	cross_slide.innerHTML=cross_slide2.innerHTML=leftrightslide
	actualwidth=document.all? cross_slide.offsetWidth : document.getElementById("temp").offsetWidth
	cross_slide2.style.left=actualwidth+slideshowgap+"px"
}
else if (document.layers)
{
 	 ns_slide=document.ns_slidemenu.document.ns_slidemenu2
	 ns_slide2=document.ns_slidemenu.document.ns_slidemenu3
	 ns_slide.document.write(leftrightslide)
	 ns_slide.document.close()
	 actualwidth=ns_slide.document.width
	 ns_slide2.left=actualwidth+slideshowgap
	 ns_slide2.document.write(leftrightslide)
	 ns_slide2.document.close()
}
lefttime=setInterval("slideleft(iedom, copyspeed, slideshowgap)",30)
}


function slideleft(iedom, copyspeed, slideshowgap)
{
 if (iedom)
 	{
	 if (parseInt(cross_slide.style.left)>(actualwidth*(-1)+8))
	 	 cross_slide.style.left=parseInt(cross_slide.style.left)-copyspeed+"px"
	 else
	 	 cross_slide.style.left=parseInt(cross_slide2.style.left)+actualwidth+slideshowgap+"px"

	 if (parseInt(cross_slide2.style.left)>(actualwidth*(-1)+8))
	 	cross_slide2.style.left=parseInt(cross_slide2.style.left)-copyspeed+"px"
	else
		cross_slide2.style.left=parseInt(cross_slide.style.left)+actualwidth+slideshowgap+"px"

	}
else if (document.layers)
{
 	if (ns_slide.left>(actualwidth*(-1)+8))
	   ns_slide.left-=copyspeed
	else
	   ns_slide.left=ns_slide2.left+actualwidth+slideshowgap

	if (ns_slide2.left>(actualwidth*(-1)+8))
	   ns_slide2.left-=copyspeed
	else
	   ns_slide2.left=ns_slide.left+actualwidth+slideshowgap
}
}


//Fin Funciones para los scroll de imagenes.



/* FUNCION PARA CREAR LA CABECERA */	
function CrearCabecera(Top, Left, Width, Height){					
		document.write("<DIV class ='menu' style='	position: absolute; top:" + Top + "px; left: " + Left + "px; width: " +  Width + "px;'>");  		
		document.write("<table width=" + Width + " height=" + Height + " border='0' cellspacing='0' >");
		document.write("<tr> ");
		document.write("<td class='Cabecera_left'>");
//		document.write("<div class='Img_Cabecera'><a href='../html/principal.html'><img src='../imagenes/logo.gif' border='0'></a></div>");
		document.write("<div class='Img_Cabecera'><a href='http://www.casa-zambrana.com'><img src='../imagenes/logo.gif' border='0'></a></div>");
		document.write("<div class='Texto_Cabecera_G'>www.casa-zambrana.com</div>");
		document.write("<div class='Texto_Cabecera_P'>Alquiler de casas rurales</div>");
		document.write("<div class='Texto_Cabecera_P'>Erias (Cáceres) Tlf. 927 670 514 - 647 701 696</div>");

  		document.write("</td>");
  		document.write("<td class='Cabecera_right'>");
  		document.write("</td>");
		document.write("</tr>");
		document.write("</table>");		
		document.write("</DIV>");
	 }
/* FUNCION PARA CREAR EL MENU */	
function CrearMenu(Top, Left, Width){					
		document.write("<DIV class ='menu' style='	position: absolute; top:" + Top + "px; left: " + Left + "px; width: " +  Width + "px;'>");  		
		document.write("<table width='90%' border='0'>");
		document.write("<tr> ");
//		document.write("<td class ='itmMenu' width='20%' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'><a href='casa.html'>La Casa</a></td>");
//		document.write("<td class ='itmMenu' width='16%' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'><a href='casas.html' class ='itmMenu' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Las Casas</a></td>");
		document.write("<td class ='itmMenu' width='14%'><a href='casas.html'  style='width:100%;' class ='itmMenu' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Las Casas</a></td>");
		document.write("<td class ='itmMenu' width='14%'><a href='entorno.html' style:'width:100%;' class ='itmMenu' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>El Entorno</a></td>");
//		document.write("<td class ='itmMenu' width='14%'><a href='activid.html' style:'width:100%;' class ='itmMenu' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Actividades</a></td>");
		document.write("<td class ='itmMenu' width='14%'><a href='formulario.html' style:'width:100%;' class ='itmMenu'  onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Contactar</a></td>");
		document.write("<td class ='itmMenu' width='14%'><a href='loc.html' style:'width:100%;' class='itmMenu'  onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Localización</a></td>");
		document.write("<td class ='itmMenu' width='14%'><a href='galeria.html' style:'width:100%;' class ='itmMenu' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Galerias</a></td>");
//		document.write("<td class ='itmMenu' width='15%'><a href='libro.html' style:'width:100%;' class ='itmMenu' onMouseOver='SelectBtn(this)' onMouseout='UnSelectBtn(this)'>Libro de Visitas</a></td>");
		document.write("</tr>");
		document.write("</table>");		
		document.write("</DIV>");
	 }
/* FUNCION PARA CREAR UNA DIV CON UNA VENTANA */	 
function CrearPanel(Top, Left, Width, Height, srcimg){
	/*document.write("<DIV CLASS='BloqueImg' style='	position: absolute; top: 50px; left: 10px; width: 125px; height: 173px'>");*/
	document.write("<DIV CLASS='BloqueImg' style='	position: absolute; top:" + Top + "px; left: " + Left + "px; width: " +  Width + "px; height: " + Height + "px'>");	
	document.write("<table width='100%' border='0' celpading='5' celspacing=''5>");
	document.write("<tr>");
	document.write("<th scope='col' class='CabBloqImg'> ");
	document.write("Ampliar");
	document.write("</th> ");
	document.write("</tr>");
	document.write("<tr>");
	document.write("<td align='center'>");
//	document.write("<img align='center' src='../imagenes/dormitorio.jpg' width='112' height='150'>");
	document.write("<img src='../imagenes/dormitorio.jpg' width=" + (Width - 10) + " height=" + (Height - 23) + ">") ;
	document.write("</td>");
	document.write("</tr>");
	document.write("</table> ");
	document.write("</DIV>");
	}


/* FUNCION CAMBIAR ESTILO A ITEM SELECCIONADO */	
function SelectBtn(src){								
			/*Por class*/
			src.className = "itmMenuSelect";
			/*Por codigo*/
			/*	src.style.background= "#A52A2A";*/
			/*	src.style.color= "#FAEBD7";*/
			/*src.class= itmMenuSelect;*/

		}
/* FUNCION CAMBIAR ESTILO A ITME DESELECCIONADO */	
function UnSelectBtn(src){												
				/*Por class*/
				src.className = "itmMenu";
				/*Por codigo*/
				/*src.style.background= "#FAEBD7";*/
				/*src.style.color= "#A52A2A";*/				
				/*src.class = "itmMenuSelect"*/
		}
		

//function Open_Window(path, width, height)
var windowNote;

function Open_Window(title, src, strheight, strwidth) {
//    windowNote = window.open('','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=yes,copyhistory=no,' + 'width=400' + ',height=100');
	windowNote = window.open('','Note','toolbar=no,location=no,directories=no,status=no,scrollbars=no,resizable=no,copyhistory=no,' + 'width=' + strwidth + '",height=' + strheight);
	text = '<HTML><HEAD><TITLE>' + title + '</TITLE>';
	text += '<link href=' + '"../css/zambrana.css"' + 'rel=' +'"stylesheet"' + 'type=' + '"text/css"' + '>'
	text += '<' + '/HEAD' + '><BODY class=' + '"BodyPaginas"' + '>';
	text += '<CENTER>';
	text +='<IMG SRC="' + src +'">';
	text +='</CENTER>';
	text += '</' + 'BODY' + '><' + '/HTML' + '>';
	windowNote.document.write(text);
	windowNote.focus();
	windowNote.document.close();
	return false;
}	

// Función con mensaje de " en Costrucción"

function CrearMsgConst(strtop, strleft){
  var txt;
  txt = '<div class=' + '"BloqueTxT"' +  'style=' + '"	position: absolute;	top: ' + strtop + 'px; 	left: ' + strleft + 'px;	width: 500px; height:130px;"' + '>';
  txt += '<div class=' + '"ParrafoTxT"' + 'style=' + '"text-align:center;"' + '>';
  txt += '.- ¡Web en construcción! -.';
  txt += '</div>';
  txt += '<div class=' + '"ParrafoTxT"' + 'style=' +'"text-align:center;"' + '>';
  txt += 'pueden dirigirse a:';
  txt += '</div>';
  txt += '<div class=' + '"ParrafoTxT"' + 'style=' + '"text-align:center;"' + '>';
  txt += '<a href=' + '"formulario.html"' + 'style:' + '"width:100%;"' + ' class =' + '"itmMenu"' + 'onMouseOver=' + '"SelectBtn(this)"' + ' onMouseout=' + '"UnSelectBtn(this)"' + '>casazambrana@casa-zambrana.com</a>';
  txt += '</div>';
  txt += '<div class=' + '"ParrafoTxT"' + '  style='+'"text-align:center;"' + '>';
  txt += 'Telf.- 927 670 514 - 647 701 69';
  txt += '</div>';
  txt += '<div class=' + '"ParrafoTxT"' + '  style=' + '"text-align: justify;"' + '>';
  txt += 'Muy pronto encontrara aquí toda la información referente a nuestros servicios.';
  txt += '	</div>';
  txt += ' </div>';
  document.write(txt);  
}
