/************************ PopUpWin  y otras funciones ************************/
function popupWin() {
var text = "";
text =  "<html>\n<head>"+styles+"\n<title>Cuenca del Plata - Turismo - Galerķa de Fotos</title>\n";
text +="</head>\n<body leftmargin='0' topmargin='0' bottommargin='0' rightmargin='0' marginheight='0' marginwidth='0' bgcolor='#ffffff'>\n";
text +="<table cellspacing='0' cellpadding='0' border='0' width='765'>";
text +="<tr>\n";
text +="<td width='215' valign='top'>\n";
text +="<img src='../images/shim.gif' alt='' width='1' height='12' border='0' /><br />\n";
<!-- Brand Logo -->
text +="<img src='../images/logo.jpg' alt='Cuenca' border='0' /><br />\n";
text +="<img src='../images/shim.gif' alt='' width='1' height='4' border='0' /><br />\n";
text +="<table cellspacing='0' cellpadding='0' border='0' width='100%'>\n";
text +="<tr>\n";
text +="<td><img src='../images/shim.gif' alt='' width='13' height='1' border='0' /></td>\n";
text +="<td width='100%' height='100%'>\n";
text +="<span class='subhead'>";
text +="Cuenca del Plata - Turismo";
text +="</span>";
text +="<br />";
<!-- Caption -->
text += capArray[largeNumber];
text +="<br />\n";
text +="</td>\n<td><img src='../images/shim.gif' alt='' width='5' height='1' border='0' /></td>\n";
text +="</tr>\n</table>\n";
text +="</td>\n";
text +="<td rowspan='2' width='550' valign='top'>\n";
<!-- Main Image -->
text += "<img alt='Cuenca del Plata' width='550' height='369' border='0' src=";
text += largeImageArray[largeNumber];
text +="></img></td>\n";
text +="</tr>\n";
text +="<tr>\n<td align='right' valign='bottom'>\n";
text +="</a>\n";
text +="</td>\n</tr>\n";
text +="<tr><td colspan='2' bgcolor='#cccccc'><img src='../images/shim.gif' alt='' width='1' height='1' border='0' /></td></tr>\n";
text +="<tr><td colspan='2'><img src='../images/shim.gif' alt='' width='1' height='2' border='0' /></td></tr>\n";
text +="<tr>\n";
text +="<td align='right' colspan='2'>\n";
text +="<img src=''../images/shim.gif' alt='' width='1' height='10' border='0' /><br />\n";
text +="<table cellspacing='0' cellpadding='0' border='0' width='537'>\n";
<!-- Bottom Images -->
text +="<tr>\n";
text +="<td><img src='../images/copyrights.gif' alt='' border='0' /></td>\n";
text +="<td align='right'><a href='javascript:opener.printContent()'><img src='../images/imprimir.gif' alt='' border='0' /></a><img src=''../images/shim.gif' alt='' width='15' height='1' border='0' /><a href='javascript:window.close()'><img src='../images/sh_popup_btn_closewindow.gif' alt='' border='0' hspace='5'/></a></td>\n";
text +="</tr>\n</table>\n";
text += "</td>\n</tr>\n</table>\n</body>\n</html>\n";
<!-- popup script -->
newWindow = window.open('','newWin','TOOLBAR=NO,LOCATION=NO,DIRECTORIES=NO,STATUS=NO,MENUBAR=NO,SCROLLBARS=NO,RESIZABLE=NO,WIDTH=765,HEIGHT=420,TOP=75,LEFT=10');
newWindow.document.write(text);
newWindow.document.close();
newWindow.focus();
}
	function setThumbnail(thumbLocation, thumbImage) {
	if (imagesLoaded==true) {
		imgName = ("thumb" + thumbLocation)
		if (document.images) {
			document[imgName].src = eval("thumbImg" + thumbImage + ".src");
		}
	}
}

function setCaption(number) {

   	  text = capArray[number];
   	  layerWrite('caption',text);
}

function layerWrite(id, text)
{
	if (is_nav4)
		rewriteLayer (id, text); // hack

	else if (is_ie)
	   document.all[id].innerHTML = text;

    else if (is_nav6)
       document.getElementById(id).innerHTML = text;

}
function rewriteLayer (idOrPath, html)
{
  	if (is_nav4)
  	{
    		var l = idOrPath.indexOf('.') != -1 ? eval(idOrPath)
             				: document[idOrPath];
      	    if (!l.ol)
			{
      			var ol = l.ol = new Layer (l.clip.width, l);
      			ol.clip.width = l.clip.width;
      			ol.clip.height = l.clip.height;
				// debug('ol.clip.width=' + ol.clip.width + ' ol.clip.height=' + ol.clip.height); //
      			ol.bgColor = l.bgColor;
      			l.visibility = 'hide';
      			ol.visibility = 'show';
   			}
   			var ol = l.ol;
    	    ol.document.open();
    		ol.document.write(html);
    		ol.document.close();
  	}

}
function clickright() {
	if (current + 3 < thumbCount) {
		current = current + 1;
		setAllThumbs(current)
	}
	setArrows();
}
function clickleft() {
	if (current > 1) {
		current = current - 1;
		setAllThumbs(current)
	}
	setArrows();
}
function setAllThumbs(current) {
	setThumbnail(1,current+0)
	setThumbnail(2,current+1)
	setThumbnail(3,current+2)
	setThumbnail(4,current+3)

}
function setSlide(thumbLocation) {
	slideNumber = current + thumbLocation - 1
	if (document.images) {
			document["slide"].src = eval("slideURL" + slideNumber);
			largeNumber = slideNumber;
			setCaption(slideNumber);
	}
}
function setArrows() {
	if (document.images) {
		if (current == 1) {
			document["lft"].src = rgt_off.src
		} else {
			document["lft"].src = rgt_on.src
		}

		if (current + 3 >= thumbCount) {
			document["rgt"].src = lft_off.src
		} else {
			document["rgt"].src = lft_on.src
		}
	}
}
var styles ="";
	if ((is_nav4 == true) && (is_win == true)){
	styles = '<link rel="stylesheet" type="text/css" href="../styles_PCns4x.css">';
	}else if ((is_nav4 == true) && (is_mac == true)){
	styles = '<link rel="stylesheet" type="text/css" href="../styles_MACns4x.css">';
	}else{
	styles = '<link rel="stylesheet" type="text/css" href="../styles_all.css">';
}
function printContent() { if (window.print) { setTimeout('newWindow.print();',200); }
else { alert("Press 'Apple+p' or 'Cmd+p' on your keyboard to print calendars on Mac"); } }
