// JavaScript Document
var submit_form = true;
function findObj(theObj, theDoc){var p, i, foundObj;if(!theDoc) theDoc = document;if( (p = theObj.indexOf("?")) > 0 && parent.frames.length){theDoc = parent.frames[theObj.substring(p+1)].document;    theObj = theObj.substring(0,p);}if(!(foundObj = theDoc[theObj]) && theDoc.all) foundObj = theDoc.all[theObj];for (i=0; !foundObj && i < theDoc.forms.length; i++)foundObj = theDoc.forms[i][theObj];for(i=0; !foundObj && theDoc.layers && i < theDoc.layers.length; i++)foundObj = findObj(theObj,theDoc.layers[i].document);if(!foundObj && document.getElementById) foundObj = document.getElementById(theObj);return foundObj;}
function esIE(){var browserType=navigator.userAgent;if(browserType.indexOf("MSIE")==-1)return false;else return true;}

function newAjax (url, id_content){
	var page_required = false; if (window.XMLHttpRequest){ page_required = new XMLHttpRequest ();} else if (window.ActiveXObject){ try { page_required = new ActiveXObject ("Msxml2.XMLHTTP"); } catch (e){ try{ page_required = new ActiveXObject ("Microsoft.XMLHTTP"); } catch (e){ alert('error'); } } } else return false;  
	page_required.onreadystatechange = function (){ loaderpage (page_required, id_content);  }
    page_required.open('GET', url, true);
    page_required.send (null);
}
function loaderpage (page_required, id_content){
    if (page_required.readyState == 4 && (page_required.status == 200 || window.location.href.indexOf ("http") == - 1))
    document.getElementById (id_content).innerHTML = page_required.responseText;
}
function viewtext(selIndex){
	var newText="";
	if(selIndex=='0'){
		//boxText=findObj('boxText');
		newAjax('../gallery/galleries/004/004.htm', 'boxText');
//		newText='Lorem ipsum';
//		boxText.innerHTML = unescape(newText);
	}
	if(selIndex==1){
		//boxText=findObj('boxText');
		newAjax('../gallery/galleries/001/001.htm', 'boxText');
	}
	if(selIndex==2){
		//boxText=findObj('boxText');
		newAjax('../gallery/galleries/002/002.htm', 'boxText');
	}
	if(selIndex==3){
		//boxText=findObj('boxText');
		newAjax('../gallery/galleries/003/003.htm', 'boxText');
	}	
}

function fcn_check(){
	newText='<p>enviando mensaje...</p>';
	document.getElementById('msjTxt').innerHTML = newText ;
}