espero alguien pueda ayudarme porque de verdad tengo un dia perdido tratando de solucionar este problema y ya como ultima opcion tengo por recurrir a la ayuda de ustedes foreros

El problema es que estoy usando 2 Scripts distintos que usan el evento Window.Onload y pues obvio solo me funciona o el uno o el otro pero nunca los 2 juntos.
El primer Script es para el Resize de Un iframe que tengo (el unico que me ha funcionado sin problemas y que no puedo cambiar), el cual consiste en esto:
Código:
<script language="Javascript">
function getWindowData(n,i){
var ifr=document.getElementById(i).contentWindow.document || document.getElementById(i).contentDocument;
var widthViewport,heightViewport,xScroll,yScroll,widthTotal,heightTotal;
if (typeof window.frames[n].innerWidth != 'undefined'){
widthViewport= window.frames[n].innerWidth;
heightViewport= window.frames[n].innerHeight;
}else if(typeof ifr.documentElement != 'undefined' && typeof ifr.documentElement.clientWidth !='undefined' && ifr.documentElement.clientWidth != 0){
widthViewport=ifr.documentElement.clientWidth;
heightViewport=ifr.documentElement.clientHeight;
}else{
widthViewport= ifr.getElementsByTagName('body')[0].clientWidth;
heightViewport=ifr.getElementsByTagName('body')[0].clientHeight;
}
xScroll=window.frames[n].pageXOffset || (ifr.documentElement.scrollLeft+ifr.body.scrollLeft);
yScroll=window.frames[n].pageYOffset || (ifr.documentElement.scrollTop+ifr.body.scrollTop);
widthTotal=Math.max(ifr.documentElement.scrollWidth,ifr.body.scrollWidth,widthViewport);
heightTotal=Math.max(ifr.documentElement.scrollHeight,ifr.body.scrollHeight,heightViewport);
return [widthViewport,heightViewport,xScroll,yScroll,widthTotal,heightTotal];
}
function resizeIframe(ID,NOMBRE){
document.getElementById(ID).height=null;
document.getElementById(ID).width=null;
window.location='#';//necesario para safari
var m=getWindowData(NOMBRE,ID);
document.getElementById(ID).height=m[5];
document.getElementById(ID).width=m[4]+22;
}
function addEvent(obj, evType, fn, useCapture){
if (obj.addEventListener){
obj.addEventListener(evType, fn, useCapture);
} else if (obj.attachEvent){
obj.attachEvent("on"+evType, fn);
} else {
obj['on'+evType]=fn;
}
}
window.onload=function(){
resizeIframe('iframe','iframe');
addEvent(document.getElementById('iframe'), 'load', function(){resizeIframe('iframe','iframe');}, false);
}
</script>
Y Pues el segundo Script consiste en cambiar dinamicamente la imagen de fondo de mi web luego de unos segundos :
Código:
<script type="text/javascript">
var fondos = ["imagenes/fondook.jpg", "imagenes/fondook2.jpg", "imagenes/fondook3.jpg"];
var actual = 0;
window.onload = function() {
setInterval("document.body.style.backgroundImage = 'url(' + fondos[actual++ % fondos.length] + ')'", 9000);
}
</script>
De verdad quisiera que alguien me pudiera ayudar, estuve viendo algunos temas similares donde postean algunas soluciones pero de verdad no se como implementarlas
Ayuda pleasee!
pero bueno por eso es que se lo dejo a los expertos!!


