var xmlHttp;var completeDiv;var inputField;var nameTable;var nameTableBody;function createXMLHttpRequest(){if(window.ActiveXObject){xmlHttp=new ActiveXObject("Microsoft.XMLHTTP")}else if(window.XMLHttpRequest){xmlHttp=new XMLHttpRequest()}}function initVars(){inputField=document.getElementById("kw");nameTable=document.getElementById("name_table");completeDiv=document.getElementById("popup");nameTableBody=document.getElementById("name_table_body")}function findNames(evt){if(document.all)evt=event;var charCode=(evt.charCode)?evt.charCode:((evt.keyCode)?evt.keyCode:((evt.which)?evt.which:0));if(charCode==8){clearNames()}initVars();if(inputField.value.length>0){createXMLHttpRequest();var url="/includes/inc_hint.asp?q="+escape(inputField.value);xmlHttp.open("GET",url,true);xmlHttp.onreadystatechange=callback;xmlHttp.send(null)}else{clearNames()}}function callback(){if(xmlHttp.readyState==4){if(xmlHttp.status==200){var name=xmlHttp.responseXML.getElementsByTagName("name")[0].firstChild.data;setNames(xmlHttp.responseXML.getElementsByTagName("name"))}else if(xmlHttp.status==204||xmlHttp.status==500){clearNames()}}}function setNames(the_names){clearNames();var size=the_names.length;setOffsets();var row,cell,txtNode;for(var i=0;i<size;i++){var nextNode=the_names[i].firstChild.data;row=document.createElement("tr");cell=document.createElement("td");cell.onmouseout=function(){this.className='mouseOver'};cell.onmouseover=function(){this.className='mouseOut'};cell.setAttribute("bgcolor","#FFFAFA");cell.setAttribute("border","0");cell.setAttribute("class","BodyText");cell.onclick=function(){populateName(this)};txtNode=document.createTextNode(nextNode);cell.appendChild(txtNode);row.appendChild(cell);nameTableBody.appendChild(row)}}function setOffsets(){var end=inputField.offsetWidth;var left=calculateOffsetLeft(inputField);var top=calculateOffsetTop(inputField)+inputField.offsetHeight;completeDiv.style.border="black 1px solid";completeDiv.style.left=left+"px";completeDiv.style.top=top+"px";completeDiv.style.width=end+"px"}function calculateOffsetLeft(field){return calculateOffset(field,"offsetLeft")}function calculateOffsetTop(field){return calculateOffset(field,"offsetTop")}function calculateOffset(field,attr){var offset=0;while(field){offset+=field[attr];field=field.offsetParent}return offset}function populateName(cell){inputField.value=cell.firstChild.nodeValue;clearNames()}function clearNames(){var ind=nameTableBody.childNodes.length;for(var i=ind-1;i>=0;i--){nameTableBody.removeChild(nameTableBody.childNodes[i])}completeDiv.style.border="none"}var sURL=unescape(window.location.href);var edittable=null;var previewListing=null;var inPopUp;function windowClose(windowname){if(windowname&&windowname.open&&!windowname.closed)windowname.close()}function tablePopUpLg(link){windowClose(previewListing);previewListing=window.open(link,'_previewListing','toolbar=no,width=725,height=500,resizable=no,scrollbars=yes');previewListing.focus();if(inPopUp)self.close()}function tablePopUpPrint(link){windowClose(previewListing);previewListing=window.open(link,'_previewListing','toolbar=no,width=770,height=700,resizable=no,scrollbars=yes');previewListing.focus();if(inPopUp)self.close()}function tablePopUp(link){windowClose(edittable);edittable=window.open(link,'_edittable','toolbar=yes,width=493,height=550,resizable=no,scrollbars=yes');edittable.focus();if(inPopUp)self.close()}function SelectMap(){if(document.frmmapLg.cboMapID.value==""){alert("You need to choose a map to view.");document.frmmapLg.cboMapID.focus();return false}else{document.frmmapLg.submit()}}function SelectMapEsp(){if(document.frmmapLg.cboMapID.value==""){alert("Necesita seleccionar una mapa para verlo.");document.frmmapLg.cboMapID.focus();return false}else{document.frmmapLg.submit()}}function MM_preloadImages(){var d=document;if(d.images){if(!d.MM_p)d.MM_p=new Array();var i,j=d.MM_p.length,a=MM_preloadImages.arguments;for(i=0;i<a.length;i++)if(a[i].indexOf("#")!=0){d.MM_p[j]=new Image;d.MM_p[j++].src=a[i]}}}var ns4=(document.layers?true:false);var ns6=(document.getElementById?true:false);var ie4=(document.all?true:false);ns=0;if(navigator.appName=="Netscape"){if(parseInt(navigator.appVersion)==5){layerRef="document.getElementById";styleSwitch=".style";ns=1}else{layerRef="document.layers";styleSwitch=""}}else{layerRef="document.all";styleSwitch=".style"}function showLayer(layerName){if(ns4){x='document.'+layerName;eval(x+'.visibility = "show"')}else if(layerRef=="document.all"){if(eval(layerRef+'["'+layerName+'"]')){eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility ="visible"')}}else if(layerRef=="document.getElementById"){x='document.getElementById("'+layerName+'")';eval(x+styleSwitch+'.visibility="visible"')}}function hideLayer(layerName){if(ns4){x='document.'+layerName;eval(x+'.visibility = "hide"')}else if(layerRef=="document.all"){if(eval(layerRef+'["'+layerName+'"]')){eval(layerRef+'["'+layerName+'"]'+styleSwitch+'.visibility ="hidden"')}}else if(layerRef=="document.getElementById"){x='document.getElementById("'+layerName+'")';eval(x+styleSwitch+'.visibility="hidden"')}}
function gotoshow(){
if (newwindow)
window.open(slidelinks[whichlink]);
else
window.location=slidelinks[whichlink];
}
function slideit(){
	if (!document.images) return;
	document.images.slide.src=imageholder[whichimage].src;
	whichlink=whichimage;
	whichimage=(whichimage<slideimages.length-1)? whichimage+1 : 0;
	setTimeout("slideit()",slidespeed+blenddelay);
}
function submitForm() {
if (document.frmKeywords.kw.value == "") {
alert("You need to enter a text value to search.");
document.frmKeywords.kw.focus();
return false;
}
else {
return true;
}
}
function submitFormEsp() {
if (document.frmKeywords.kw.value == "") {
alert("No se te olvide proporcionar la palabra clave en el espacio.");
document.frmKeywords.kw.focus();
return false;
}
else {
return true;
}
}
