
function setLayerWidth(obj, newW){
	document.getElementById(obj).style.width = newW+"px";
}
function setLayerHeight(obj, newH){
	document.getElementById(obj).style.height = 45+newH+"px";		
}
function setLayerSize(obj, newW, newH){
	setLayerWidth(obj, newW);
	setLayerHeight(obj, newH);
	centrarCapa(obj)
}
function centrarCapa(obj) { 
    an=setLayerWidth(obj, newW); 
    al=setLayerHeight(obj, newH); 
    x=(document.body.clientWidth-an)/2; 
    y=(document.body.clientHeight-al)/2; 
    document.getElementById(obj).style.left=x; 
    document.getElementById(obj).style.top=y; 
}

/* 
Methods for resizing the flash stage at runtime.

setFlashWidth(divid, newW)
divid: id of the div containing the flash movie.
newW: new width for flash movie

setFlashWidth(divid, newH)
divid: id of the div containing the flash movie.
newH: new height for flash movie

setFlashSize(divid, newW, newH)
divid: id of the div containing the flash movie.
newW: new width for flash movie
newH: new height for flash movie

canResizeFlash()
returns true if browser supports resizing flash, false if not. 
*/
function setFlashWidth(divid, newW){
	document.getElementById(divid).style.width = newW+"px";
}
function setFlashHeight(divid, newH){
	document.getElementById(divid).style.height = newH+"px";		
}
function setFlashSize(divid, newW, newH, obj){
	setFlashWidth(divid, newW);
	setFlashHeight(divid, newH);
	setLayerSize(obj, newW, newH);
}
function canResizeFlash(){
	var ua = navigator.userAgent.toLowerCase();
	var opera = ua.indexOf("opera");
	if( document.getElementById ){
		if(opera == -1) return true;
		else if(parseInt(ua.substr(opera+6, 1)) >= 7) return true;
	}
	return false;
}
