// JavaScript Document
function setFlashWidth(divid, newH){
	document.getElementById(divid).style.width = newH+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function Resize(){
	var navegador = document.getElementById("flashcontent");//"home" es el valor del atributo id de body
	var ancho = navegador.clientWidth;
	if (ancho<751){
		ancho=751;
	}
	var alto = navegador.clientHeight;
	if (alto<507){
		alto=507;
	}
	setFlashWidth("flashcontent", ancho);//"flashcontent" es el valor del atributo id de la capa en la que meteremos el flash
	setFlashHeight("flashcontent", alto);
}
window.onresize=Resize;
window.onload=Resize;
/*
function innerXHTML(xml, trimmed) {
	var xmlString = "";
	for(var i = 0; i < xml.childNodes.length; ++i) {
		var currentNodeName = xml.childNodes[i].nodeName;
		if(xml.childNodes[i].childNodes.length > 0) {
			xmlString += "<" + currentNodeName.toLowerCase();
			xmlString += getAttributeString(xml.childNodes[i]);
			xmlString += ">";
			xmlString += innerXHTML(xml.childNodes[i], trimmed);
			xmlString += "</" + xml.childNodes[i].nodeName.toLowerCase() + ">";						
		} else if(currentNodeName == "BR" || currentNodeName == "HR" || currentNodeName == "IMG") {
			xmlString += "<" + currentNodeName.toLowerCase();
			xmlString += getAttributeString(xml.childNodes[i]);
			xmlString += " />";
		}
		else
			xmlString += xml.childNodes[i].nodeValue;
	}
	return (trimmed == true || trimmed == undefined) ? trim(xmlString) : xmlString;
}

function getAttributeString(element) {
	var attributeString = "";
	for(var j = 0; j < element.attributes.length; ++j) {
		if(element.attributes[j].value != "" && element.attributes[j].value != "null") {
			attributeString += " " + element.attributes[j].name;
			attributeString += "=\"" + element.attributes[j].value + "\"";
		}
	}
	return attributeString;
}

function trim(str) {
   str = str.replace(/>\s+/g, ">");
   str = str.replace(/\s+</g, "<");
   return str;
}
*/
