Kod
<!-- tu ustawiasz pozycje -->
<div id="TopLayerDiv" style="position:absolute; left:300px; top:250px; width:300px; height:300px; z-index:2010;">
<script language="javascript" type="text/javascript">
<!--
draging=false;
psX=0;psY=0;
function odswiez() {
document.all["Brandmark"].style.top=gora.offsetTop+100;
document.all["Brandmark"].style.left=(document.body.clientWidth/2)-150;
};
function ukryj() {
document.all["Brandmark"].style.visibility="hidden";
};
function start() {
document.all["Brandmark"].style.top=gora.offsetTop+100;
document.all["Brandmark"].style.left=(document.body.clientWidth/2)-150;
document.all["Brandmark"].style.visibility="visible";
};
function Ruch(e) {
x=event.clientX+document.body.scrollLeft;
y=event.clientY+document.body.scrollTop;
if(draging) {
document.all["TopLayerDiv"].style.top=document.all["TopLayerDiv"].offsetTop+(y-psY);
document.all["TopLayerDiv"].style.left=document.all["TopLayerDiv"].offsetLeft+(x-psX);
psX=x;psY=y;
}
}
function Drag(e) {
x=event.clientX+document.body.scrollLeft;
y=event.clientY+document.body.scrollTop;
psX=x; psY=y;
draging=true;
}
function Drop(e) {
x=event.clientX+document.body.scrollLeft;
y=event.clientY+document.body.scrollTop;
draging=false;
}
function gotourltl(nr) {
if (nr==1) {
//adres gdzie ma odsylac po kliknieciu
window.location="http://adv.wp.pl/RM/click_lx.ads/www.wp.pl/index.html/1724023679/Middle/przyklad-brandmark/br.html/6e6f6f6b69655f706c?_RM_REDIR_=www.wp.pl"
}
}
var FlashMode=0; if (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"] && navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin) FlashMode=1;
//-->
</script>
<script language="VBScript" type="text/vbscript">
<!--
on error resume next
FlashMode = (IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash")))
//-->
</script>
<script language="javascript" type="text/javascript">
<!--
if(document.all && FlashMode) {
//a tu wstawiasz to co ma sie pokazacc
document.write('<img src="i/p.gif" name="gora" width="1" height="1" alt="" border="0 /">\n');
document.write('<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"');
document.write(' codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=4,0,2,0" ');
document.write(' id="Brandmark" width=300 height=300>\n');
document.write(' <param name="movie" value="http://adv.wp.pl/RM/Box/testbrandmark/brandmark_menu_300x300_wp.swf" /><param name="quality" value="autohigh" />\n');
document.write(' <param name="bgcolor" value="#FFFFFF" /><param name="wmode" value="transparent" />\n');
document.write('</object>');
}
if(document.all && FlashMode) {
window.onload=start;
window.onresize=odswiez;
document.all["TopLayerDiv"].onmousedown=Drag;
document.all["TopLayerDiv"].onmouseup=Drop;
document.onmousemove=Ruch;
}
//-->
</script>
</div>
pamietaj ze musisz umiescic przycisk do ukrycia diva.