var strx = screen.availWidth;
var stry = screen.availHeight;
//var strx =600;
//var stry =10;
//setTam();
function setTam () {
	var Top=0;
	var Left=0;
	if(Top <0) Top = 0;
	if(Left <0)Left = 0;
	window.resizeTo(strx,stry)
	window.moveTo(Left,Top)
	window.focus ();
	return;
}

var elementsLoadList = new Array();
function initImages() {
	for(var i = 0; i < elementsLoadList.length; i++) {
		if(elementsLoadList[i][0] == 1 || elementsLoadList[i][0] == 2) {
			var imageLoad = new Image();
			imageLoad.src = elementsLoadList[i][2];
		}
	}
	for(var i = 0; i < elementsLoadList.length; i++) {
		switch(elementsLoadList[i][0]) {
			case 1:
				var imageId = elementsLoadList[i][1];
				var image = document.getElementById(imageId);
				image.src = elementsLoadList[i][2];
				if(elementsLoadList[i][3] && elementsLoadList[i][4]) {
					recargarImagen(image, elementsLoadList[i][3], elementsLoadList[i][4]);
				}
				break;
			case 2:
				var table = document.getElementById(elementsLoadList[i][1]);
				table.style.backgroundImage = "url(" + elementsLoadList[i][2] + ")";
				break;
			case 3:
				var td = document.getElementById(elementsLoadList[i][1]);
				td.innerHTML = elementsLoadList[i][2];
				break;
			default:
				break;
		}
	}
}
function recargarImagen(imagen, width, height){
alert(imagen);
	if(imagen.width > width || imagen.width == 0)
		imagen.width = width;
	if(imagen.height > height || imagen.height == 0)
		imagen.height = height;
}

