	var ocupado = 0;
	
	function moveImg(currentid,sectionid,num) {
		if (ocupado==0) {
			ocupado=num; 
			for (var i=0; i<num; i++) {
				if (i==currentid) {
					showImg("img" + sectionid+currentid);
				}  else {
					hideImg("img" + sectionid + i);
				}
			}
		}
	}
	
	function hideImg(imgobj) {
		if (document.getElementById(imgobj).style.height>0) {
			document.getElementById(imgobj).style.height -= 5;
			 setTimeout("hideImg('"+imgobj+"')",1);
		} else {
			ocupado--;
		}
	}
	
	function showImg(imgobj) {
		if (document.getElementById(imgobj).style.height<250) {
			document.getElementById(imgobj).style.height += 5;
			 setTimeout("showImg('"+imgobj+"')",1);
		} else {
			ocupado--;
		}
	}

function moveImg(num) {
	document.getElementById("img1").src="images/" + num + ".gif";
}

var showNum = "00";
var menu10 = 4;
var menu20 = 6;
var menu30 = 1;
var menu40 = 1;

function showMenu(num,menu) {
	showNum = num;
	document.getElementById("10").style.visibility="hidden";
	document.getElementById("20").style.visibility="hidden";
	document.getElementById("30").style.visibility="hidden";
	document.getElementById("40").style.visibility="hidden";
	if (document.getElementById(num)!=undefined) {
		document.getElementById(num).style.visibility="visible";
	}
	document.getElementById("1").className="menu";
	document.getElementById("2").className="menu";
	document.getElementById("3").className="menu";
	document.getElementById("4").className="menu";
	if(document.getElementById(num.substring(0,1))!=undefined) {
		document.getElementById(num.substring(0,1)).className=menu;    
	}
	if (num!="00" && document.getElementById("imgmenu")!=undefined) {
		document.getElementById("imgmenu").src="images/imgmain"+num+".jpg";
	}
}



function startPhotos() {
	setTimeout("showPhotos()",1000);
}

function showPhotos() {
	if (showNum!="10") {
		var i = Math.round(Math.random() * 3) + 1;
		var j = 0;
	} else {
		var i = parseInt(showNum)/10;
		var j = Math.round(Math.random() * (eval("menu" + i + "0")-1));
	}
	changePhoto(i,j);
	setTimeout("showPhotos()",1000);
}

function changePhoto(i,j) {
	document.getElementById("imgmenu").src="images/imgmain" + i + j + ".jpg";
}

function setOpacity(obj) {
	if(obj.xOpacity>.99) {
		obj.xOpacity = .99;
		return;
	}
	obj.style.opacity = obj.xOpacity;
	obj.style.MozOpacity = obj.xOpacity;
	obj.style.filter = "alpha(opacity=" + (obj.xOpacity*100) + ")";
}

function contactP(subject) {
	var contact1 = "ma" + "il" + "to";
	contact1 = contact1 + ":" + "daniel";
	var contact2 = "cist-turismo";
	contact2 = contact2 + "." + "es";
	document.write("<a href='" + contact1 + "@" + contact2 + "?subject="+subject+"'><img src='images/image003.gif' height='100' alt='Pidenos un Presupuesto' border='0'/></a>");
}


function contactG() {
	var contact1 = "ma" + "il" + "to";
	contact1 = contact1 + ":" + "daniel";
	var contact2 = "cist-turismo";
	contact2 = contact2 + "." + "es";
	document.write("<a href='" + contact1 + "@" + contact2 + "'><img src='images/email.gif' height='50' alt='Escribenos' border='0'/></a>");
}

function contactGBar() {
	var contact1 = "ma" + "il" + "to";
	contact1 = contact1 + ":" + "daniel";
	var contact2 = "cist-turismo";
	contact2 = contact2 + "." + "es";
	document.write("<a href='" + contact1 + "@" + contact2 + "' class='copyright'>CONTACTENOS</a>");
}
