<script language="JavaScript1.2">
/*
DHTML Announcement Box- By Jim Silver - jimsilver47@yahoo.com
*/
//////////////////////////////////////
// drag drop function for NS 4 //
////////////////////////////////////
<!--
if (navigator.appName=="Netscape" &&
parseInt(navigator.appVersion) >= 5)
document.write('< link
rel=stylesheet type=text/css href=styles_nn.css>')
else
document.write('<!-- link rel=stylesheet type=text/css
href=styles.css-aqui pone la direccion del .css si lo usas -->')
var dragswitch=0
var nsx
var nsy
var nstemp
function
drag_dropns(name){
temp=eval(name)
temp.captureEvents(Event.MOUSEDOWN |
Event.MOUSEUP)
temp.onmousedown=gons
temp.onmousemove=dragns
temp.onmouseup=stopns
}
function gons(e){
temp.captureEvents(Event.MOUSEMOVE)
nsx=e.x
nsy=e.y
}
function dragns(e){
if (dragswitch==1){
temp.moveBy(e.x-nsx,e.y-nsy)
return false
}
}
function stopns(){
temp.releaseEvents(Event.MOUSEMOVE)
}
///////////////////////////////////////
//drag drop function for IE
4+////
//////////////////////////////////////
var dragapproved=false
function drag_dropie(){
if (dragapproved==true){
document.all.showimage.style.pixelLeft=tempx+event.clientX-iex
document.all.showimage.style.pixelTop=tempy+event.clientY-iey
return
false
}
}
function initializedragie(){
iex=event.clientX
iey=event.clientY
tempx=showimage.style.pixelLeft
tempy=showimage.style.pixelTop
dragapproved=true
document.onmousemove=drag_dropie
}
if (document.all){
document.onmouseup=new Function("dragapproved=false")
}
//////////////////////////////////////////////
//// drag
drop functions end here //////
////////////////////////////////////////////
function hidebox(){
if (document.all)
showimage.style.visibility="hidden"
else if (document.layers)
document.showimage.visibility="hide"
}
-->
</script>
Aqui empieza el codigo quehay que poner en el BODY de tu página. Puedes cambiar los valores de anchura (width), distancia desde la parte izquierda (left) y distancia desde el top (top) de tu pagina. (no olvides de modificar tambien la anchura del TABLE - tag.
<div id="showimage"
style="position:absolute;width:200px;left:350;top:150">
<table
border="0" width="200" bgcolor="#426399" cellspacing="0" cellpadding="2">
<tr><td width="100%"><table border="0" width="100%"
cellspacing="0" cellpadding="0" height="36">
<tr><td
onMousedown="initializedragie()" style="cursor:hand" width="100%">
<ilayer width="100%">
<layer width="100%"
onMouseover="dragswitch=1;drag_dropns(showimage)"
onMouseout="dragswitch=0"><font face="Verdana"
color="white"><b>Info - Box
</b></font></layer></ilayer></td>
<td
style="cursor:hand"><a href="#" onClick="hidebox();return false">
<img src="close.gif" width="16" height="14"
border=0></a></td></tr>
<tr><td
width="100%" bgcolor="#FFFFFF" style="padding:4px" colspan="2">
<!-- INSERTA AQUI EL CONTENIDO PARA LA INFO_BOX! -->
<a
href="http://www.saludos.de/tunombre" target="user">tu enlace</a><br>
</td>
</tr></table>
</td></tr>
</table></div>
Para hacerte lo todo más facil tendras aqui el
Download del script con la hoja de estilo y el image. pon todo el el mismo directorio donde se encuentra tu pagina que usa este script.