/    Sign up×
Community /Pin to ProfileBookmark

How do I modify a static logo script?

[COLOR=Navy]Hi!

Can someone show me how to modify this script so that I can use two instances on a page? I would like to have a header and a logo both using this script. Every time I try to use it twice, only one of them displays.

Here is the script that goes in the page itself:[/COLOR]

[COLOR=DimGray]<div id=”watermarklogo” style=”position:absolute;z-index:1;visibility:visible; left:100%;top:80px;width:100%;height:39px;”></div>

<script src=”http://bethelconnection.com/staticheader.js“>
</script>[/COLOR]

[COLOR=Navy]And here is the external script:[/COLOR]
[COLOR=DimGray]
///////////////////////////////////////////////////////////////////
/*Site Logo Script (Geocities Watermark)
© Dynamic Drive ([url]www.dynamicdrive.com[/url])
For full source code, installation instructions,
100’s more DHTML scripts, and TOS, visit [url]http://www.dynamicdrive.com/[/url] *
/
///////////////////////////////////////////////////////////////////

//edit the below 5 steps

// 1) substitute 116 and 42 with the width and height of your logo image, respectively
var logowidth=600
var logoheight=160
var logoimage=new Image(logowidth,logoheight)

// 2) change the image path to reflect the path of your logo image
logoimage.src=”http://bethelconnection.com/header/header.gif

// 3) Change url below to the target URL of the logo
var logolink=”http://bethelconnection.com

// 4) change the alttext variable to reflect the text used for the “alt” attribute of the image tag
var alttext=”You should see a header here.”

// 5) Finally, below variable determines the duration the logo should be visible after loading, in seconds. If you’d like the logo to appear for 20 seconds, for example, enter 20. Entering a value of 0 causes the logo to be perpectually visible.
var visibleduration=0

// Optional parameters
var Hoffset=10 //Enter logo’s offset from left edge of window (edit only if you don’t like the default offset)
var Voffset=20 //Enter logo’s offset from top edge of window (edit only if you don’t like the default offset)

///////////////////////////Do not edit below this line/////////////////////////

var ie=document.all&&navigator.userAgent.indexOf(“Opera”)==-1

var watermark_obj=ie? document.all.watermarklogo : document.getElementById? document.getElementById(“watermarkheader”) : document.watermarklogo

function insertimage(){
if (ie||document.getElementById)
watermark_obj.innerHTML='<a href=”‘+logolink+'”><img src=”‘+logoimage.src+'” width=”‘+logowidth+'” height=”‘+logoheight+'” border=0 alt=”‘+alttext+'”></a>’
else if (document.layers){
watermark_obj.document.write(‘<a href=”‘+logolink+'”><img src=”‘+logoimage.src+'” width=”‘+logowidth+'” height=”‘+logoheight+'” border=0 alt=”‘+alttext+'”></a>’)
watermark_obj.document.close()
}
}

function positionit(){
var dsocleft=ie? document.body.scrollLeft : pageXOffset
var dsoctop=ie? document.body.scrollTop : pageYOffset

if (ie||document.getElementById){
watermark_obj.style.left=parseInt(dsocleft)+5+Hoffset
watermark_obj.style.top=parseInt(dsoctop)+5+Voffset
}
else if (document.layers){
watermark_obj.left=dsocleft+5+Hoffset
watermark_obj.top=dsoctop+5+Voffset
}
}

function hidewatermark(){
if (document.layers)
watermark_obj.visibility=”hide”
else
watermark_obj.style.visibility=”hidden”
clearInterval(watermarkinterval)
}

function beingwatermark(){
watermarkinterval=setInterval(“positionit()”,50)
insertimage()
if (visibleduration!=0)
setTimeout(“hidewatermark()”,visibleduration*1000)
}

if (ie||document.getElementById||document.layers)
window.onload=beingwatermark[/COLOR]
[COLOR=Navy]

It must be something simple, but I sure can’t figure it out.
Thank you !

Steven[/COLOR]

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@sbcjrauthorNov 18.2005 — Anyone? ?
×

Success!

Help @sbcjr spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...