function isdefined(objToTest) {
	if (null == objToTest) return false;
	if ("undefined" == typeof(objToTest)) return false;
	return true;
}

function hss(objToProcess, status){ 
	try { document.getElementById(objToProcess).style.display=status;} 
	catch(err){	alert("EXHSS: "+objToProcess);}
}

function gvv(objToProcess){ 
	try { return document.getElementById(objToProcess).value;} 
	catch(err){	alert("EXGVV: "+objToProcess);}
}

function goo(objToProcess){ 
	try { return document.getElementById(objToProcess);} 
	catch(err){	alert("EXGOO: "+objToProcess);}
}

function svv(objToProcess, strValue){ 
	try { document.getElementById(objToProcess).value = strValue;} 
	catch(err){	alert("EXSVV: "+objToProcess);}
}

function sii(objToProcess, strValue){ 
	try { document.getElementById(objToProcess).innerHTML = strValue; } 
	catch(err){	alert("EXSII: "+objToProcess);}
}

function gii(objToProcess){ 
	try { return document.getElementById(objToProcess).innerHTML; } 
	catch(err){	alert("EXGII: "+objToProcess);}
}

function ajaxLoader(programa, id, parametros, displaytext, displayid) {
	loadingData = "<img border='0' src='"+imagenAjax+"'>&nbsp;&nbsp;<font face='Verdana' size='1'>"
	if (isdefined(displaytext)) loadingData+= displaytext; else loadingData+="Loading . . ."; loadingData+= "<\/font>";
	if (isdefined(displayid)) sii(displayid,loadingData); else sii(id,loadingData);
	if (document.getElementById) { var x = (window.ActiveXObject) ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest(); }
	if (x) { x.onreadystatechange = function() { if (x.readyState == 4 && x.status == 200) { sii(id, x.responseText); }}
		if(parametros!='') url=programa+'?id=' + parametros; else url=programa;
		x.open("GET", url, true); x.send(null);
	}
}

var imagenes = new Array(
						"1x1","1x2","1x3","1x4","1x5","1x6","1x7","1x8",
						"2x1","2x2","2x3","2x4","2x5","2x6","2x7","2x8",
						"3x1","3x2","3x3","3x4","3x5","3x6","3x7","3x8",
						"4x1","4x2","4x3","4x4","4x5","4x6","4x7","4x8",
						"5x1","5x2","5x3","5x4","5x5","5x6","5x7","5x8",
						"6x1","6x2","6x3","6x4","6x5","6x6","6x7","6x8",
						"7x1","7x2","7x3","7x4","7x5","7x6","7x7","7x8",
						"8x1","8x2","8x3","8x4","8x5","8x6","8x7","8x8"
						);
var i; var lista_imagenes = new Array();
function cargarimagenes(){
	for(i in imagenes){
		lista_imagenes[i] = new Image();
		lista_imagenes[i].src = "images/Imagen8_"+imagenes[i]+".png";
	}
}
