/***********************************************
* Bullet Link script- © Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

//Define your bullet image(s) via arbitrary variables, where bulletimg=["imagepath", imagewidth, offsetxfromroot, offsetyfromroot]
var bulletimg1=["dock/lbut.jpg", 0, 0, -5]
var bulletimg2=["search.gif", 0, 0, 0]

////Stop editting here/////////////////////
var classnameRE1=/(^|\s+)ddbullet($|\s+)/i //regular expression to screen for classname within element

function caloffset(what, offsettype){
var totaloffset1=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl1=what.offsetParent;
while (parentEl1!=null){
totaloffset1=(offsettype=="left")? totaloffset1+parentEl1.offsetLeft : totaloffset1+parentEl1.offsetTop;
parentEl1=parentEl1.offsetParent;
}
return totaloffset1;
}

function displaybullet1(linkobj){
var reltovar=window[linkobj.getAttribute("rel")]
bulletobj.setAttribute("src", reltovar[0])
bulletobj.style.left=caloffset(linkobj, "left")-reltovar[1]-reltovar[2]+"px"
bulletobj.style.top=caloffset(linkobj, "top")-reltovar[3]+"px"
bulletobj.style.visibility="visible"
}

function modifylinks1(){
bulletobj=document.createElement("img")
bulletobj.setAttribute("id", "bulletimage")
bulletobj.className="bulletimagestyle"
document.body.appendChild(bulletobj)
for (i=0; i<document.links.length; i++){
if (typeof document.links[i].className=="string" && document.links[i].className.search(classnameRE1)!=-1){
document.links[i].onmouseover=function(){displaybullet1(this)}
document.links[i].onmouseout=function(){bulletobj.style.visibility="hidden"}
}
}
}

if (window.addEventListener)
window.addEventListener("load", modifylinks1, false)
else if (window.attachEvent)
window.attachEvent("onload", modifylinks1)
else if (document.getElementById || document.all)
window.onload=modifylinks1



