• Lunes 23 de Diciembre de 2024, 10:10

Autor Tema:  Ayudenme por favor soy novato...  (Leído 2197 veces)

charliekzx

  • Nuevo Miembro
  • *
  • Mensajes: 5
    • Ver Perfil
Ayudenme por favor soy novato...
« en: Domingo 16 de Noviembre de 2003, 22:31 »
0
Hola amigos del Foro..
Quiero pedirles un favor de si me pueden ayudar con este problemita
encontre dos codigos en una pagina Web determinada,.... y baje estos archivos...

1.-El primero es un ""MENU.HTML"" muy bueno.... y el otro archivos es ""navcond.js"" este archivo es una
secuencia de comandos (BUENO UDS., LOS MAS ENTENDIDOS SABRAN MAS QUE YO Y OJALA NO ESTE TAN MAL Y SI LO ESTOY
ESPERO QUE ME CORRIJAN), para que el menu funcione...

2.-El Segundo archivo es ""BANNER.HTML"" que hace que las banner esten rotando este codigo tambien trae los archivos
""banner.js"" y bannerconfig.js"" para que esto funcione.... bueno la pregunta es la siguiente...

******INTENTE HACER LO SIGUIENTE***************

1.- coloque el codigo del menu.html dentro del html del front page... y luego pegue el codigo de la banner como lo indica
pero no funciona lo que aparece es la banner que esta rotando pero el menu no aparece....

2.- fui modificando el codigo en la medida que pude ("DEBO PEDIR PERDON POR DECIR ESTAS COSAS EN CUANTO A LA PROGRAMACIÓN
PERO SOY NOVATO Y MUY AUTODIDACTA PARA APRENDER ASI QUE PIDO DISCULPAS POR SI QUE ESTOY EQUIVOCADO") me gustaria
que me ayudaran

**Definicion de problemas...**

1.-Lo que quiero hacer es que aparezca la "banner" y "menu" juntos en la misma web.

2.-Colocar dentro de la web la banner donde yo quiera; al centro, como pie de pagina, al lado derecho.. etc...
como como se puede hacer eso..
3.-Es algo asi como GOTOXY; del turbo pascal?(creo que estoy equivocado pero es para que me entiendan)

***Bueno eso es lo que quiero hacer ojala me ayuden**** colocaré ahora los codigos......

COPIAR CADA UNO DE ESTOS CODIGO A UN BLOC DE NOTAS Y LUEGO GUARDARLOS CON LA EXTENCION QUE CORRESPONDA..... CHAU Y MUCHAS GRACIAS A LAS BANNER LE FALTAN LAS IMAGENES.....




//Codigo de MENU.HTML********************************************************************************************

<!-- PRIMER PASO: Copiar este código dentro del tag HEAD -->

<script language="JavaScript" src="navcond.js">
</script>

<script language="JavaScript">

/*
Top Navigational Bar II (By Mike Hall @ Brainjar.com)
*/

var myNavBar1 = new NavBar(0);
var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below

dhtmlMenu = new NavBarMenu(100, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Inicio", "index.htm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Depósito", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Caducar página", "caducar.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Pantalla completa", "ventanafull.htm"));
dhtmlMenu.addItem(new NavBarMenuItem("Anular botones", "mouse.htm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(110, 120);
dhtmlMenu.addItem(new NavBarMenuItem("Tutoriales", ""));
dhtmlMenu.addItem(new NavBarMenuItem("La Variable", "http://www.lavariable.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Programación", "http://www.programacion.net"));
dhtmlMenu.addItem(new NavBarMenuItem("ABC Datos", "http://www.abcdatos.com/"));
dhtmlMenu.addItem(new NavBarMenuItem("Cybercursos", "http://www.cybercursos.net/"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Buscadores", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Yahoo", "http://www.yahoo.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Alta Vista", "http://www.altavista.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Infoseek", "http://www.infoseek.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Excite", "http://www.excite.com"));
dhtmlMenu.addItem(new NavBarMenuItem("HotBot", "http://www.hotbot.com"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(100, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Webmasters", ""));
dhtmlMenu.addItem(new NavBarMenuItem("Foros del Web", "http://www.forosdelweb.com"));
dhtmlMenu.addItem(new NavBarMenuItem("Desarrollo Web", "http://www.desarrolloweb.com"));
dhtmlMenu.addItem(new NavBarMenuItem("JavaScript", "http://javascript.internet.com"));
dhtmlMenu.addItem(new NavBarMenuItem("BrainJar", "http://brainjar.com"));
myNavBar1.addMenu(dhtmlMenu);

//set menu colors
myNavBar1.setColors("#ffffff","#ffffff","#000000","#ffffff","#6B6B6B","#000000","#C0C0C0","#ffffff","#8A0000")
myNavBar1.setFonts("Arial","plain","bold","11px","Arial","plain","bold","11px");

//uncomment below line to center the menu (valid values are "left", "center", and "right"
//myNavBar1.setAlign("center")

var fullWidth;

function init() {

  // Get width of window, need to account for scrollbar width in Netscape.

  fullWidth = getWindowWidth()
    - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0);

  myNavBar1.resize(fullWidth);
  myNavBar1.create();
  myNavBar1.setzIndex(2);
}
</script>
<!-- SEGUNDO PASO: Agregar esta línea dentro del tag BODY -->

<body onload="init()">

//FIN DEL CODIGO MENU.HTML**************************************************************************************


//-------------------------------------------------------ARCHIVO 2----- NAVCOND.JS

//ESTE ARCHIVO ES DEL MENU.HTML ES EL NAVCOND.JS ESTA ENCRIPTADO CREO,

/******************************************
* navcond.js - Condensed version of       *
*              dhtmllib.js and navbar.js. *
* Copyright 2000 by Mike Hall.            *
* Web address: http://www.brainjar.com    *
* Last update: July 17, 2000.             *
******************************************/
var isMinNS4=(navigator.appName.indexOf("Netscape")>=0&&parseFloat(navigator.appVersion)>=4)?1:0;var isMinIE4=(document.all)?1:0;var isMinIE5=(isMinIE4&&navigator.appVersion.indexOf("5.")>=0)?1:0;function hideLayer(layer){if(isMinNS4)layer.visibility="hide";if(isMinIE4)layer.style.visibility="hidden";}function showLayer(layer){if(isMinNS4)layer.visibility="show";if(isMinIE4)layer.style.visibility="visible";}function inheritLayer(layer){if(isMinNS4)layer.visibility="inherit";if(isMinIE4)layer.style.visibility="inherit";}function getVisibility(layer){if(isMinNS4){if(layer.visibility=="show")return "visible";if(layer.visibility=="hide")return "hidden";return layer.visibility;}if(isMinIE4)return layer.style.visibility;return "";}function moveLayerTo(layer,x,y){if(isMinNS4)layer.moveTo(x,y);if(isMinIE4){layer.style.left=x;layer.style.top=y;}}function moveLayerBy(layer,dx,dy){if(isMinNS4)layer.moveBy(dx,dy);if(isMinIE4){layer.style.pixelLeft+=dx;layer.style.pixelTop+=dy;}}function getLeft(layer){if(isMinNS4)return layer.left;if(isMinIE4)return layer.style.pixelLeft;return-1;}function getTop(layer){if(isMinNS4)return layer.top;if(isMinIE4)return layer.style.pixelTop;return-1;}function getRight(layer){if(isMinNS4)return layer.left+getWidth(layer);if(isMinIE4)return layer.style.pixelLeft+getWidth(layer);return-1;}function getBottom(layer){if(isMinNS4)return layer.top+getHeight(layer);if(isMinIE4)return layer.style.pixelTop+getHeight(layer);return-1;}function getPageLeft(layer){var x;if(isMinNS4)return layer.pageX;if(isMinIE4){x=0;while(layer.offsetParent!=null){x+=layer.offsetLeft;layer=layer.offsetParent;}x+=layer.offsetLeft;return x;}return-1;}function getPageTop(layer){var y;if(isMinNS4)return layer.pageY;if(isMinIE4){y=0;while(layer.offsetParent!=null){y+=layer.offsetTop;layer=layer.offsetParent;}y+=layer.offsetTop;return y;}return-1;}function getWidth(layer){if(isMinNS4){if(layer.document.width)return layer.document.width;else return layer.clip.right-layer.clip.left;}if(isMinIE4){if(layer.style.pixelWidth)return layer.style.pixelWidth;else return layer.clientWidth;}return-1;}function getHeight(layer){if(isMinNS4){if(layer.document.height)return layer.document.height;else return layer.clip.bottom-layer.clip.top;}if(isMinIE4){if(layer.style.pixelHeight)return layer.style.pixelHeight;else return layer.clientHeight;}return-1;}function getzIndex(layer){if(isMinNS4)return layer.zIndex;if(isMinIE4)return layer.style.zIndex;return-1;}function setzIndex(layer,z){if(isMinNS4)layer.zIndex=z;if(isMinIE4)layer.style.zIndex=z;}function clipLayer(layer,clipleft,cliptop,clipright,clipbottom){if(isMinNS4){layer.clip.left=clipleft;layer.clip.top=cliptop;layer.clip.right=clipright;layer.clip.bottom=clipbottom;}if(isMinIE4)layer.style.clip='rect('+cliptop+' '+clipright+' '+clipbottom+' '+clipleft+')';}function getClipLeft(layer){if(isMinNS4)return layer.clip.left;if(isMinIE4){var str=layer.style.clip;if(!str)return 0;var clip=getIEClipValues(layer.style.clip);return(clip[3]);}return-1;}function getClipTop(layer){if(isMinNS4)return layer.clip.top;if(isMinIE4){var str=layer.style.clip;if(!str)return 0;var clip=getIEClipValues(layer.style.clip);return clip[0];}return-1;}function getClipRight(layer){if(isMinNS4)return layer.clip.right;if(isMinIE4){var str=layer.style.clip;if(!str)return layer.style.pixelWidth;var clip=getIEClipValues(layer.style.clip);return clip[1];}return-1;}function getClipBottom(layer){if(isMinNS4)return layer.clip.bottom;if(isMinIE4){var str=layer.style.clip;if(!str)return layer.style.pixelHeight;var clip=getIEClipValues(layer.style.clip);return clip[2];}return-1;}function getClipWidth(layer){if(isMinNS4)return layer.clip.width;if(isMinIE4){var str=layer.style.clip;if(!str)return layer.style.pixelWidth;var clip=getIEClipValues(layer.style.clip);return clip[1]-clip[3];}return-1;}function getClipHeight(layer){if(isMinNS4)return layer.clip.height;if(isMinIE4){var str=layer.style.clip;if(!str)return layer.style.pixelHeight;var clip=getIEClipValues(layer.style.clip);return clip[2]-clip[0];}return-1;}function getIEClipValues(str){var clip=new Array();var i;i=str.indexOf("(");clip[0]=parseInt(str.substring(i+1,str.length),10);i=str.indexOf(" ",i+1);clip[1]=parseInt(str.substring(i+1,str.length),10);i=str.indexOf(" ",i+1);clip[2]=parseInt(str.substring(i+1,str.length),10);i=str.indexOf(" ",i+1);clip[3]=parseInt(str.substring(i+1,str.length),10);return clip;}function scrollLayerTo(layer,x,y,bound){var dx=getClipLeft(layer)-x;var dy=getClipTop(layer)-y;scrollLayerBy(layer,-dx,-dy,bound);}function scrollLayerBy(layer,dx,dy,bound){var cl=getClipLeft(layer);var ct=getClipTop(layer);var cr=getClipRight(layer);var cb=getClipBottom(layer);if(bound){if(cl+dx<0)dx=-cl;else if(cr+dx>getWidth(layer))dx=getWidth(layer)-cr;if(ct+dy<0)dy=-ct;else if(cb+dy>getHeight(layer))dy=getHeight(layer)-cb;}clipLayer(layer,cl+dx,ct+dy,cr+dx,cb+dy);moveLayerBy(layer,-dx,-dy);}function setBgColor(layer,color){if(isMinNS4)layer.bgColor=color;if(isMinIE4)layer.style.backgroundColor=color;}function setBgImage(layer,src){if(isMinNS4)layer.background.src=src;if(isMinIE4)layer.style.backgroundImage="url("+src+")";}function getLayer(name){if(isMinNS4)return findLayer(name,document);if(isMinIE4)return eval('document.all.'+name);return null;}function findLayer(name,doc){var i,layer;for(i=0;i<doc.layers.length;i++){layer=doc.layers;if(layer.name==name)return layer;if(layer.document.layers.length>0)if((layer=findLayer(name,layer.document))!=null)return layer;}return null;}function getImage(name){if(isMinNS4){return findImage(name,document);}if(isMinIE4)return eval('document.all.'+name);return null;}function findImage(name,doc){var i,img;for(i=0;i<doc.images.length;i++)if(doc.images.name==name)return doc.images;for(i=0;i<doc.layers.length;i++)if((img=findImage(name,doc.layers.document))!=null){img.container=doc.layers;return img;}return null;}function getImagePageLeft(img){var x,obj;if(isMinNS4){if(img.container!=null)return img.container.pageX+img.x;else return img.x;}if(isMinIE4){x=0;obj=img;while(obj.offsetParent!=null){x+=obj.offsetLeft;obj=obj.offsetParent;}x+=obj.offsetLeft;return x;}return-1;}function getImagePageTop(img){var y,obj;if(isMinNS4){if(img.container!=null)return img.container.pageY+img.y;else return img.y;}if(isMinIE4){y=0;obj=img;while(obj.offsetParent!=null){y+=obj.offsetTop;obj=obj.offsetParent;}y+=obj.offsetTop;return y;}return-1;}function getWindowWidth(){if(isMinNS4)return window.innerWidth;if(isMinIE4)return document.body.clientWidth;return-1;}function getWindowHeight(){if(isMinNS4)return window.innerHeight;if(isMinIE4)return document.body.clientHeight;return-1;}function getPageWidth(){if(isMinNS4)return document.width;if(isMinIE4)return document.body.scrollWidth;return-1;}function getPageHeight(){if(isMinNS4)return document.height;if(isMinIE4)return document.body.scrollHeight;return-1;}function getPageScrollX(){if(isMinNS4)return window.pageXOffset;if(isMinIE4)return document.body.scrollLeft;return-1;}function getPageScrollY(){if(isMinNS4)return window.pageYOffset;if(isMinIE4)return document.body.scrollTop;return-1;}var isMinIE5_5=(isMinIE5&&navigator.appVersion.indexOf("5.5")>=0)?1:0;var navBars=new Array();function NavBarMenuItem(text,link){this.text=text;this.link=link;}function NavBarMenu(hdrWidth,menuWidth){this.hdrWidth=hdrWidth;this.width=menuWidth;this.height=0;this.items=new Array();this.addItem=navBarMenuAddItem;}function navBarMenuAddItem(item){this.items[this.items.length]=item;}function NavBar(width){this.x=0;this.y=0;this.width=width;this.height=0;this.align="left";this.minWidth=0;this.inverted=false;this.menus=new Array();this.created=false;this.border=2;this.padding=4;this.separator=1;this.borderColor="#000000";this.hdrFgColor="#000000";this.hdrBgColor="#999999";this.hdrHiFgColor="#ffffff";this.hdrHiBgColor="#666666";this.itmFgColor="#000000";this.itmBgColor="#cccccc";this.itmHiFgColor="#ffffff";this.itmHiBgColor="#000080";this.hdrFontFamily="Arial,Helvetica,sans-serif";this.hdrFontStyle="plain";this.hdrFontWeight="bold";this.hdrFontSize="10pt";this.itmFontFamily="MS Sans Serif,Arial,Helvetica,sans-serif";this.itmFontStyle="plain";this.itmFontWeight="bold";this.itmFontSize="8pt";this.setSizes=navBarSetSizes;this.setColors=navBarSetColors;this.setFonts=navBarSetFonts;this.addMenu=navBarAddMenu;this.create=navBarCreate;this.hide=navBarHide;this.show=navBarShow;this.moveTo=navBarMoveTo;this.moveBy=navBarMoveBy;this.getzIndex=navBarGetzIndex;this.setzIndex=navBarSetzIndex;this.getWidth=navBarGetWidth;this.getMinWidth=navBarGetMinWidth;this.getAlign=navBarGetAlign;this.setAlign=navBarSetAlign;this.resize=navBarResize;this.invert=navBarInvert;this.isInverted=navBarIsInverted;this.index=navBars.length;navBars[this.index]=this;}function navBarSetSizes(border,padding,separator){if(!this.created){this.border=border;this.padding=padding;this.separator=separator;}}function navBarSetColors(bdColor,hdrFgColor,hdrBgColor,hdrHiFgColor,hdrHiBgColor,itmFgColor,itmBgColor,itmHiFgColor,itmHiBgColor){if(!this.created){this.borderColor=bdColor;this.hdrFgColor=hdrFgColor;this.hdrBgColor=hdrBgColor;this.hdrHiFgColor=hdrHiFgColor;this.hdrHiBgColor=hdrHiBgColor;this.itmFgColor=itmFgColor;this.itmBgColor=itmBgColor;this.itmHiFgColor=itmHiFgColor;this.itmHiBgColor=itmHiBgColor;}}function navBarSetFonts(hdrFamily,hdrStyle,hdrWeight,hdrSize,itmFamily,itmStyle,itmWeight,itmSize){if(!this.created){this.hdrFontFamily=hdrFamily;this.hdrFontStyle=hdrStyle;this.hdrFontWeight=hdrWeight;this.hdrFontSize=hdrSize;this.itmFontFamily=itmFamily;this.itmFontStyle=itmStyle;this.itmFontWeight=itmWeight;this.itmFontSize=itmSize;}}function navBarAddMenu(menu){if(!this.created)this.menus[this.menus.length]=menu;}function navBarCreate(){var str;var i,j;var norm,high,end;var width,height;var x,y;var scrX,scrY;if(this.created||(!isMinNS4&&!isMinIE4))return;str="";if(isMinIE4&&!isMinIE5){scrX=getPageScrollX();scrY=getPageScrollY();window.scrollTo(getPageWidth(),getPageHeight());}if(isMinNS4)str+='<layer name="navBar'+this.index+'_filler"></layer>n<layer name="navBar'+this.index+'_hdrsBase">n';if(isMinIE4)str+='<div id="navBar'+this.index+'_filler" style="position:absolute;"></div>n<div id="navBar'+this.index+'_hdrsBase" style="position:absolute;">n';for(i=0;i<this.menus.length;i++){norm='<table border=0 cellpadding='+this.padding+' cellspacing=0'+(this.menus.hdrWidth>0?' width='+this.menus.hdrWidth:'')+((isMinIE4&&!isMinIE5)?' id="navBar'+this.index+'_tbl'+i+'"':'')+'><tr><td'+(this.menus.hdrWidth==0?' nowrap=1'+this.menus.hdrWidth:'')+'>[color='+this.hdrFgColor+';font-family]';high='<table border=0 cellpadding='+this.padding+' cellspacing=0'+(this.menus.hdrWidth>0?' width='+this.menus.hdrWidth:'')+'><tr><td'+(this.menus.hdrWidth==0?' nowrap=1'+this.menus.hdrWidth:'')+'><span style="color:'+this.hdrHiFgColor+';font-family:'+this.hdrFontFamily+';font-size:'+this.hdrFontSize+';font-style:'+this.hdrFontStyle+';font-weight:'+this.hdrFontWeight+';">';end='[/color]</td></tr></table>';if(isMinNS4)str+='<layer name="navBar'+this.index+'_head'+i+'">'+norm+this.menus.items[0].text+end+'</layer>n<layer name="navBar'+this.index+'_headHigh'+i+'">'+high+this.menus.items[0].text+end+'</layer>n<layer name="navBar'+this.index+'_headDummy'+i+'"></layer>n';if(isMinIE4){str+='<div id="navBar'+this.index+'_head'+i+'" style="position:absolute;">'+norm+this.menus.items[0].text+end+'</div>n<div id="navBar'+this.index+'_headHigh'+i+'" style="position:absolute;">'+high+this.menus.items[0].text+end+'</div>n<div id="navBar'+this.index+'_headDummy'+i+'" style="position:absolute;">';if(isMinIE5_5)str+='<table cellspacing=0 width="100%" height="100%"><tr><td> </td></tr></table>';str+='</div>n';}}if(isMinNS4){str+='</layer>n';this.baseLayer=new Layer(this.width);this.baseLayer.document.open();this.baseLayer.document.write(str);this.baseLayer.document.close();}if(isMinIE4){str+='</div>n';str='<div id="navBar'+this.index+'" style="position:absolute;left:0px;top:0px;">n'+str+'</div>n';document.body.insertAdjacentHTML("beforeEnd",str);this.baseLayer=getLayer("navBar"+this.index);}width=0;height=0;for(i=0;i<this.menus.length;i++){this.menus.hdrNormLayer=getLayer('navBar'+this.index+'_head'+i);this.menus.hdrHighLayer=getLayer('navBar'+this.index+'_headHigh'+i);this.menus.hdrDmmyLayer=getLayer('navBar'+this.index+'_headDummy'+i);height=Math.max(height,getHeight(this.menus.hdrNormLayer));this.height=height+2*this.border;if(isMinIE4&&!isMinIE5){width=this.menus.hdrWidth;if(width==0)width=eval('document.all.navBar'+this.index+'_tbl'+i+'.clientWidth');navBarIEResizeLayer(this.menus.hdrNormLayer,width,height);navBarIEResizeLayer(this.menus.hdrHighLayer,width,height);navBarIEResizeLayer(this.menus.hdrDmmyLayer,width,height);}}x=this.border;y=this.border;for(i=0;i<this.menus.length;i++){width=Math.max(this.menus.hdrWidth,getWidth(this.menus.hdrNormLayer));if(this.menus.width==0)this.menus.width=width+2*this.border;moveLayerTo(this.menus.hdrNormLayer,x,y);setBgColor(this.menus.hdrNormLayer,this.hdrBgColor);clipLayer(this.menus.hdrNormLayer,0,0,width,height);inheritLayer(this.menus.hdrNormLayer);moveLayerTo(this.menus.hdrHighLayer,x,y);setBgColor(this.menus.hdrHighLayer,this.hdrHiBgColor);clipLayer(this.menus.hdrHighLayer,0,0,width,height);hideLayer(this.menus.hdrHighLayer);moveLayerTo(this.menus.hdrDmmyLayer,x,y);if(isMinIE4)navBarIEResizeLayer(this.menus.hdrDmmyLayer,width,height);clipLayer(this.menus.hdrDmmyLayer,0,0,width,height);inheritLayer(this.menus.hdrDmmyLayer);this.menus.hdrDmmyLayer.highLayer=this.menus.hdrHighLayer;this.menus.hdrLeft=x;x+=width+this.border;this.menus.hdrRight=x;}this.minWidth=x;this.width=Math.max(this.minWidth,this.width);moveLayerTo(this.baseLayer,this.x,this.y);setBgColor(this.baseLayer,this.borderColor);if(isMinIE4)navBarIEResizeLayer(this.baseLayer,this.width,this.height);clipLayer(this.baseLayer,0,0,this.width,this.height);this.fillerLayer=getLayer('navBar'+this.index+'_filler');moveLayerTo(this.fillerLayer,this.border,this.border);setBgColor(this.fillerLayer,this.hdrBgColor);width=this.width-2*this.border;height=this.height-2*this.border;if(isMinIE4)navBarIEResizeLayer(this.fillerLayer,width,height);clipLayer(this.fillerLayer,0,0,width,height);inheritLayer(this.fillerLayer);this.hdrsBaseLayer=getLayer('navBar'+this.index+'_hdrsBase');if(this.align=="left")this.hdrsOffsetX=0;else if(this.align=="center")this.hdrsOffsetX=Math.round((this.width-this.minWidth)/2);else if(this.align=="right")this.hdrsOffsetX=this.width-this.minWidth;else this.hdrsOffsetX=Math.min(parseInt(this.align,10),this.width-this.minWidth);moveLayerTo(this.hdrsBaseLayer,this.hdrsOffsetX,0);setBgColor(this.hdrsBaseLayer,this.borderColor);if(isMinIE4)navBarIEResizeLayer(this.hdrsBaseLayer,this.minWidth,this.height);clipLayer(this.hdrsBaseLayer,0,0,this.minWidth,this.height);inheritLayer(this.hdrsBaseLayer);for(i=0;i<this.menus.length;i++){this.menus.hdrDmmyLayer.index=this.index;this.menus.hdrDmmyLayer.offsetX=this.menus.hdrLeft-this.border;if(this.menus.hdrDmmyLayer.offsetX+this.menus.width>this.width)this.menus.hdrDmmyLayer.offsetX=this.menus.hdrRight-this.menus.width;this.menus.hdrDmmyLayer.offsetY=this.height-this.border;this.menus.hdrDmmyLayer.onmouseover=navBarHeaderOn;this.menus.hdrDmmyLayer.onmouseout=navBarHeaderOff;if(isMinNS4){this.menus.hdrDmmyLayer.document.highLayer=this.menus.hdrHighLayer;this.menus.hdrDmmyLayer.document.link=this.menus.items[0].link;this.menus.hdrDmmyLayer.document.captureEvents(Event.MOUSEUP);this.menus.hdrDmmyLayer.document.onmouseup=navBarItemClick;}if(isMinIE4){this.menus.hdrDmmyLayer.highLayer=this.menus.hdrHighLayer;this.menus.hdrDmmyLayer.link=this.menus.items[0].link;this.menus.hdrDmmyLayer.onclick=navBarItemClick;}}norm='<table border=0 cellpadding='+this.padding+' cellspacing=0 width="100%"><tr><td>[color='+this.itmFgColor+';font-family]';high='<table border=0 cellpadding='+this.padding+' cellspacing=0 width="100%"><tr><td><span style="color:'+this.itmHiFgColor+';font-family:'+this.itmFontFamily+';font-size:'+this.itmFontSize+';font-style:'+this.itmFontStyle+';font-weight:'+this.itmFontWeight+';">';end='[/color]</td></tr></table>';for(i=0;i<this.menus.length;i++){width=this.menus.width-2*this.border;str="";for(j=1;j<this.menus.items.length;j++){if(isMinNS4)str+='<layer name="navBar'+this.index+'_menu'+i+'_norm'+j+'" width='+width+'>'+norm+this.menus.items[j].text+end+'</layer>n<layer name="navBar'+this.index+'_menu'+i+'_high'+j+'" width='+width+'>'+high+this.menus.items[j].text+end+'</layer>n<layer name="navBar'+this.index+'_menu'+i+'_dmmy'+j+'" width='+width+'></layer>n';if(isMinIE4){str+='<div id="navBar'+this.index+'_menu'+i+'_norm'+j+'" style="position:absolute;width:'+width+'px;">'+norm+this.menus.items[j].text+end+'</div>n<div id="navBar'+this.index+'_menu'+i+'_high'+j+'" style="position:absolute;width:'+width+'px;">'+high+this.menus.items[j].text+end+'</div>n<div id="navBar'+this.index+'_menu'+i+'_dmmy'+j+'" style="position:absolute;width:'+width+'px;">';if(isMinIE5_5)str+='<table cellspacing=0 width="100%" height="100%"><tr><td> </td></tr></table>';str+='</div>n';}}if(isMinNS4){this.menus.baseLayer=new Layer(this.menus.width);this.menus.baseLayer.document.open();this.menus.baseLayer.document.write(str);this.menus.baseLayer.document.close();}if(isMinIE4){str='<div id="navBar'+this.index+'_menu'+i+'" style="position:absolute;left:0px; top:0px;width:'+this.menus.width+'px;visibility:hidden;">n'+str+'</div>n';document.body.insertAdjacentHTML("beforeEnd",str);this.menus.baseLayer=getLayer("navBar"+this.index+"_menu"+i);}}if(isMinIE4&&!isMinIE5)window.scrollTo(x,y);for(i=0;i<this.menus.length;i++){moveLayerTo(this.menus.baseLayer,this.menus.hdrDmmyLayer.offsetX,this.menus.hdrDmmyLayer.offsetY);setBgColor(this.menus.baseLayer,this.borderColor);if(this.menus.items.length>1){this.menus.hdrDmmyLayer.menuLayer=this.menus.baseLayer;if(isMinNS4)this.menus.hdrDmmyLayer.document.menuLayer=this.menus.baseLayer;}else{this.menus.hdrDmmyLayer.menuLayer=null;if(isMinNS4)this.menus.hdrDmmyLayer.document.menuLayer=this.menus.baseLayer;}x=this.border;y=this.border;width=this.menus.width-2*this.border;for(j=1;j<this.menus.items.length;j++){this.menus.items[j].normLayer=getLayer('navBar'+this.index+'_menu'+i+'_norm'+j);this.menus.items[j].highLayer=getLayer('navBar'+this.index+'_menu'+i+'_high'+j);this.menus.items[j].dmmyLayer=getLayer('navBar'+this.index+'_menu'+i+'_dmmy'+j);height=getHeight(this.menus.items[j].normLayer);moveLayerTo(this.menus.items[j].normLayer,x,y);setBgColor(this.menus.items[j].normLayer,this.itmBgColor);clipLayer(this.menus.items[j].normLayer,0,0,width,height);inheritLayer(this.menus.items[j].normLayer);moveLayerTo(this.menus.items[j].highLayer,x,y);setBgColor(this.menus.items[j].highLayer,this.itmHiBgColor);clipLayer(this.menus.items[j].highLayer,0,0,width,height);hideLayer(this.menus.items[j].highLayer);moveLayerTo(this.menus.items[j].dmmyLayer,x,y);if(isMinIE4)navBarIEResizeLayer(this.menus.items[j].dmmyLayer,width,height);clipLayer(this.menus.items[j].dmmyLayer,0,0,width,height);inheritLayer(this.menus.items[j].dmmyLayer);this.menus.items[j].dmmyLayer.highLayer=this.menus.items[j].highLayer;this.menus.items[j].dmmyLayer.onmouseover=navBarItemOn;this.menus.items[j].dmmyLayer.onmouseout=navBarItemOff;if(isMinNS4){this.menus.items[j].dmmyLayer.document.highLayer=this.menus.items[j].highLayer;this.menus.items[j].dmmyLayer.document.parentHighLayer=this.menus.hdrHighLayer;this.menus.items[j].dmmyLayer.document.menuLayer=this.menus.baseLayer;this.menus.items[j].dmmyLayer.document.link=this.menus.items[j].link;this.menus.items[j].dmmyLayer.document.captureEvents(Event.MOUSEUP);this.menus.items[j].dmmyLayer.document.onmouseup=navBarItemClick;}if(isMinIE4){this.menus.items[j].dmmyLayer.highLayer=this.menus.items[j].highLayer;this.menus.items[j].dmmyLayer.parentHighLayer=this.menus.hdrHighLayer;this.menus.items[j].dmmyLayer.menuLayer=this.menus.baseLayer;this.menus.items[j].dmmyLayer.link=this.menus.items[j].link;this.menus.items[j].dmmyLayer.onclick=navBarItemClick;}y+=height+this.separator;}width=this.menus.width;height=y-this.separator+this.border;this.menus.baseLayer.width=this.menus.width;this.menus.baseLayer.height=height;if(isMinIE4)navBarIEResizeLayer(this.menus.baseLayer,width,height);clipLayer(this.menus.baseLayer,0,0,width,height);this.menus.baseLayer.parentHighLayer=this.menus.hdrHighLayer;this.menus.baseLayer.onmouseout=navBarMenuOff;}this.created=true;this.resize(this.width);showLayer(this.baseLayer);}function navBarHide(){if(this.created)hideLayer(this.baseLayer);}function navBarShow(){if(this.created)showLayer(this.baseLayer);}function navBarMoveTo(x,y){this.x=x;this.y=y;if(this.created)moveLayerTo(this.baseLayer,this.x,this.y);}function navBarMoveBy(dx,dy){this.x+=dx;this.y+=dy;if(this.created)moveLayerTo(this.baseLayer,this.x,this.y);}function navBarGetzIndex(){if(this.created)return getzIndex(this.baseLayer);return 0;}function navBarSetzIndex(z){var i;if(this.created){setzIndex(this.baseLayer,z);for(i=0;i<this.menus.length;i++)setzIndex(this.menus.baseLayer,z);}}function navBarGetWidth(){return this.width;}function navBarGetMinWidth(){return this.minWidth;}function navBarGetAlign(){return this.align;}function navBarSetAlign(align){this.align=align;if(this.created)this.resize(this.width);}function navBarResize(width){if(this.created){this.width=Math.max(width,this.minWidth);if(isMinIE4){navBarIEResizeLayer(this.fillerLayer,this.width-2*this.border,this.height-2*this.border);navBarIEResizeLayer(this.baseLayer,this.width,this.height);}clipLayer(this.fillerLayer,0,0,this.width-2*this.border,this.height-2*this.border);clipLayer(this.baseLayer,0,0,this.width,this.height);if(this.align=="left")this.hdrsOffsetX=0;else if(this.align=="center")this.hdrsOffsetX=Math.round((this.width-this.minWidth)/2);else if(this.align=="right")this.hdrsOffsetX=this.width-this.minWidth;else this.hdrsOffsetX=Math.min(parseInt(this.align,10),this.width-this.minWidth);moveLayerTo(this.hdrsBaseLayer,this.hdrsOffsetX,0);for(i=0;i<this.menus.length;i++){this.menus.hdrDmmyLayer.offsetX=this.menus.hdrLeft-this.border;if(this.hdrsOffsetX+this.menus.hdrDmmyLayer.offsetX+this.menus.width>this.width)this.menus.hdrDmmyLayer.offsetX=this.menus.hdrRight-this.menus.width;}}else this.width=width;}function navBarInvert(){this.inverted=!this.inverted;}function navBarIsInverted(){return this.inverted;}function navBarIEResizeLayer(layer,width,height){layer.style.pixelWidth=width;layer.style.pixelHeight=height;}function navBarHeaderOn(e){var bar;var x,y;bar=navBars[this.index];if(this.menuLayer!=null){x=bar.x+bar.hdrsOffsetX+this.offsetX;y=bar.y+this.offsetY;if(bar.inverted)y=bar.y-this.menuLayer.height+bar.border;moveLayerTo(this.menuLayer,x,y);this.menuLayer.left=getPageLeft(this.menuLayer);this.menuLayer.top=getPageTop(this.menuLayer);this.menuLayer.right=this.menuLayer.left+this.menuLayer.width+1;this.menuLayer.bottom=this.menuLayer.top+this.menuLayer.height+1;}if(isMinIE4){if(bar.activeHeader!=null&&bar.activeHeader!=this){hideLayer(bar.activeHeader.highLayer);if(bar.activeHeader.menuLayer!=null)hideLayer(bar.activeHeader.menuLayer);}bar.activeHeader=this;}showLayer(this.highLayer);if(this.menuLayer!=null)showLayer(this.menuLayer);}function navBarHeaderOff(e){if(this.menuLayer!=null){if(isMinIE4){mouseX=window.event.clientX+document.body.scrollLeft;mouseY=window.event.clientY+document.body.scrollTop;}if(mouseX>=this.menuLayer.left&&mouseX<=this.menuLayer.right&&mouseY>=this.menuLayer.top&&mouseY<=this.menuLayer.bottom)return;hideLayer(this.menuLayer);}hideLayer(this.highLayer);}function navBarMenuOff(e){if(isMinIE4){mouseX=window.event.clientX+document.body.scrollLeft;mouseY=window.event.clientY+document.body.scrollTop;if(mouseX>=this.left&&mouseX<=this.right&&mouseY>=this.top&&mouseY<=this.bottom)return;}hideLayer(this);hideLayer(this.parentHighLayer);}function navBarItemOn(){showLayer(this.highLayer);}function navBarItemOff(){hideLayer(this.highLayer);}function navBarItemClick(e){if(this.link=="")return true;if(this.menuLayer!=null){hideLayer(this.menuLayer);}if(this.parentHighLayer!=null){hideLayer(this.parentHighLayer);}hideLayer(this.highLayer);if(this.link.indexOf("javascript:")==0)eval(this.link);else window.location.href=this.link;return true;}var mouseX=0;var mouseY=0;if(isMinNS4)document.captureEvents(Event.MOUSEMOVE);document.onmousemove=navBarGetMousePosition;function navBarGetMousePosition(e){if(isMinNS4){mouseX=e.pageX;mouseY=e.pageY;}if(isMinIE4){mouseX=window.event.clientX+document.body.scrollLeft;mouseY=window.event.clientY+document.body.scrollTop;}}var origWidth;var origHeight;if(isMinNS4){origWidth=window.innerWidth;origHeight=window.innerHeight;}window.onresize=navBarReload;function navBarReload(){if(isMinNS4&&origWidth==window.innerWidth&&origHeight==window.innerHeight)return;if(isMinIE4)setTimeout('window.location.href = window.location.href',2000);else window.location.href=window.location.href;}


// FIN DEL CODIGO NAVCOND.JS AL COPIAR ESTOS ARCHIVOS

//************CODIGO DE LA BANNER.HTML

<html>

<head>
<title>JavaScript Banner</title>
</head>

<body>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><strong><font face="Arial">JAVASCRIPT</font></strong></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">BANNERS ROTATIVOS - INSTALACIÓN</font></small></td>
  </tr>
  <tr>
    <td width="100%"><hr noshade size="1" color="#000000">
    </td>
  </tr>
</table>

<p><img SRC="blank.gif" NAME="holdspace" ID="holdspace" WIDTH="400" HEIGHT="50"
STYLE="visibility:hidden; position:relative;" border="0"></p>
<script LANGUAGE="JavaScript1.2">
<!--

if (navigator.appVersion.indexOf("MSIE 4.0; Macintosh;") == -1) {
  with (document) {
    write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='bannerconfig.js'>");
    write("</SCRIPT>");
    write("<SCRIPT LANGUAGE='JavaScript1.2' SRC='banner.js'>");
    write("</SCRIPT>");
  }
}

//-->
</script>


<p><small><font face="Arial">Los 2 archivos JS son llamados desde esta página HTML</font></small></p>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><strong><small><font face="Arial">Configuración:</font></small></strong></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">- El archivo a modificar es <strong>bannerconfig.js</strong></font></small></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">- Lo podes abrir desde el Bloc de Notas.</font></small></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">- Adentro están las explicaciones.</font></small></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">- Una vez modificado, guardalo con el mismo
    nombre y la misma extención.</font></small></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">- Desde tu página html lo llamás con el
    javascript que se encuentra en esta misma página (ver código fuente) .</font></small></td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">- Listo!</font></small></td>
  </tr>
</table>

<p><small><font face="Arial">Podes bajarlo haciendo clic acá: <a href="jsbanners.zip">Download
JavaScript</a></font></small></p>

<table border="0" width="100%" cellspacing="0" cellpadding="0">
  <tr>
    <td width="100%"><hr noshade size="1" color="#000000">
    </td>
  </tr>
  <tr>
    <td width="100%"><small><font face="Arial">Cualquier duda sobre su instalación o
    configuración, visitá la sección HTML/JavaScript de los <a
    href="http://www.forosdelweb.com" target="_top">Foros del Web</a></font></small></td>
  </tr>
</table>
</body>
</html>

//*****************FIN CODIGO DE LA BANNER.HTML

//CODIGO DE BANNER.JS

// banner.js

onload = startBanner;

function showMessage(n, show) {
  var whichEl = (NS4) ? eval("message" + n) :
                        eval("message" + n + ".style");
  whichEl.visibility = (show) ? ((NS4) ? "show" : "visible") :
                                ((NS4) ? "hide" : "hidden");
}

function nextMessage() {
  var fromInd = current;
  current = (fromInd == ar.length - 1) ? 0 : fromInd + 1;
  scrollBanner(fromInd, current);
}

function moveUp() {
  if (NS4) {
    fromEl.top -= increment;
    if (toEl.top - increment <= toElTarget) {
      toEl.top = toElTarget;
      clearInterval(intervalID);
      fromEl.visibility = "hide";
      timeoutID = setTimeout("nextMessage()", pause);
    } else {
      toEl.top -= increment;
    }
  } else {
    fromEl.pixelTop -= increment;
    if (toEl.pixelTop - increment <= toElTarget) {
      toEl.pixelTop = toElTarget;
      clearInterval(intervalID);
      fromEl.visibility = "hidden";
      timeoutID = setTimeout("nextMessage()", pause);
    } else {
      toEl.pixelTop -= increment;
    }
  }
}

function scrollBanner(from, to) {
  if (NS4) {
    fromEl = eval("message" + from);
    toEl = eval("message" + to);
    toEl.top = fromEl.top + bannerHeight;
    toElTarget = fromEl.top;
  } else {
    fromEl = eval("message" + from + ".style");
    toEl = eval("message" + to + ".style");
    toEl.pixelTop = fromEl.pixelTop + bannerHeight;
    toElTarget = fromEl.pixelTop;
  }
  showMessage(to, true);
  intervalID = setInterval("moveUp()", interval);
}

function makeIE() {
  var text = '<DIV ID="banner" STYLE="position:absolute">';
  for (var i = ar.length - 1; i >= 0; i--) {
    text += '<DIV ID="message' + i +
            '" STYLE="position:absolute"></DIV>';
  }
  text += '</DIV>';

  document.body.insertAdjacentHTML("BeforeEnd", text);

  with (banner.style) {
    width = bannerWidth;
    height = bannerHeight;
    clip = "rect(0 " + bannerWidth + " " + bannerHeight + " 0)";
    backgroundColor = bannerColor;
    pixelLeft = bannerLeft;
    pixelTop = bannerTop;
  }

  for (i = 0; i < ar.length; i++) {
    with (eval("message" + i + ".style")) {
      visibility = "hidden";
      pixelLeft = leftPadding;
      pixelTop = topPadding;
      width = bannerWidth - leftPadding;
      backgroundColor = bannerColor;
    }
  }
}

function makeNS() {
  banner = new Layer(bannerWidth);

  with (banner) {
    clip.right = bannerWidth;
    clip.bottom = bannerHeight;
    document.bgColor = bannerColor;
    left = bannerLeft;
    top = bannerTop;
    visibility = "show";
  }

  for (var i = 0; i < ar.length; i++) {
    eval("message" + i + " = " +
         "new Layer(bannerWidth - leftPadding, banner)");
    with(eval("message" + i)) {
      visibility = "hide";
      left = leftPadding;
      top = topPadding;
      document.bgColor = bannerColor;
    }
  }
}

function fillBanner() {
  var whichEl;
  if (NS4) {
    for (var i = 0; i < ar.length; i++) {
      whichEl = eval("message" + i);
      whichEl.document.write(ar);
      whichEl.document.close();
    }
  } else {
    for (var i = 0; i < ar.length; i++) {
      whichEl = eval("message" + i);
      whichEl.innerHTML = ar;
    }
  }
}

function startBanner() {
  if (NS4)
    makeNS()
  else
    makeIE();
  fillBanner();
  showMessage(0, true);
  current = 0;
  timeoutID = setTimeout("nextMessage()", pause);
}


//****************************FIN DEL CODIGO.....

//***********************************************CODIGO DE BANNERCONFIG.JS
// bannerconfig.js

var NS4 = (document.layers) ? true : false;
var IE4 = (document.all) ? true : false;

var interval = 20; // velocidad
var increment = 1; // transición ej: 1=lento 20=rápido
var pause = 1750; //pausa
var bannerColor = "#000000"; //color de fondo
var leftPadding = 0; // margen izquierdo
var topPadding = 0; // margen superior

var bannerLeft = (NS4) ? document.images.holdspace.x :
  holdspace.offsetLeft;
var bannerTop = (NS4) ? document.images.holdspace.y :
  holdspace.offsetTop;
var bannerWidth = (NS4) ? document.images.holdspace.width :
  holdspace.width;
var bannerHeight = (NS4) ? document.images.holdspace.height :
  holdspace.height;

// Configuración; cambiá la información que se encuentra a continuación:
// (nota: la última linea no lleva , después del ')

var ar = new Array(
  '<A HREF="http://www.webtutorial.com.ar/"></A>',
  '<A HREF="http://datafull.com/"></A>',
  '<A HREF="http://wwww.cuantosomos.com.ar/"></A>',
  '<A HREF="http://www.stas.net/2/webtutorial/jsbanner.zip/"></A>'
);


//*************FIN DEL CODIGO BANNERCONFIG.JS