//Contents for menu 1
var bkmk=new Array()

bkmk[0]='<div style="width:100%;font-size:0.9em;font-style:italic;font-weight:bold;color:#03205A;border-bottom:1px solid #666;line-height:1.8em;">Share S4Motorsports.com Links</div>'
bkmk[1]='<table cellpadding="0" cellspacing="0"><tr><td style="width:34px;border-right:1px solid #999;"><a href="http://digg.com/submit?phase=2&amp;url=' + document.location.href + '"><img src="http://www.s4motorsports.com/img_src/media/digg.png" alt="Digg" title="Digg This" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.technorati.com/faves/?add=' + document.location.href + '"><img src="http://www.s4motorsports.com/img_src/media/technorati.png" alt="Technorati" title="Technorati" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.stumbleupon.com/submit?url=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/stumble.png" alt="StumbleUpon" title="StumbleUpon" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://del.icio.us/post?url=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/delicious.png" alt="del.icio.us" title="del.icio.us" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://twitter.com/home?status=Currently:%20' + document.location.href + '%20' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/twitter.png" alt="Twitter" title="Tweet This" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.reddit.com/submit?url=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/reddit.png" alt="Reddit" title="Add to Reddit" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.facebook.com/share.php?u=' + document.location.href + '&amp;h=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/facebook.png" alt="Facebook" title="Share on Facebook" /></a></td><td style="width:34px;border-left:1px solid #FFF;"><a href="http://www.myspace.com/Modules/PostTo/Pages/?u=' + document.location.href + '&amp;t=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/myspace.png" alt="MySpace" title="Add to MySpace" /></a></td></tr></table>'
bkmk[2]='<table cellpadding="0" cellspacing="0"><tr><td style="width:34px;border-right:1px solid #999;"><a href="http://www.propeller.com/submit/?U=' + document.location.href + '&amp;T=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/propeller.png" alt="Propeller" title="Prop It" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://ma.gnolia.com/bookmarklet/add?url=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/magnoliacom.png" alt="ma.gnolia.com" title="Magnolia" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.google.com/bookmarks/mark?op=add&bkmk=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/google.png" alt="Google" title="Add to MyGoogle" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=' + document.location.href + '&amp;t=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/yahoo.png" alt="Yahoo Search" title="Yahoo MyWeb Search" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.mixx.com/submit?page_url=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/mixx.png" alt="Mixx" title="Add to The Mixx" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="http://www.linkedin.com/shareArticle?mini=true&amp;url=' + document.location.href + '&amp;title=' + document.title + '&amp;source=s4motorsports.com&amp;summary=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/linkedin.png" alt="LinkedIn" title="Add to LinkedIn" /></a></td><td style="width:34px;border-right:1px solid #999;border-left:1px solid #FFF;"><a href="https://favorites.live.com/quickadd.aspx?marklet=1&amp;url=' + document.location.href + '&amp;title=' + document.title + '"><img src="http://www.s4motorsports.com/img_src/media/windowsLive.png" alt="Windows Live" title="Add to Windows Live" /></a></td><td style="width:34px;border-left:1px solid #FFF;"><a href="http://www.blinklist.com/index.php?title=' + document.title + '&amp;Action=Blink/addblink.php&amp;url=' + document.location.href + '"><img src="http://www.s4motorsports.com/img_src/media/blinklist.png" alt="Blink" title="Add to Blink List" /></a></td></tr></table>'
		


var disappeardelay=500  //menu disappear speed onMouseout (in miliseconds)
var horizoffset=-281 //horizontal offset of menu from default location. (0-5 is a good value)
var vertoffset=10

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenubkdiv" style="visibility:hidden;width: 102px;z-index:1000;" onMouseover="clearhidemanu()" onMouseout="dynamichide(event)"></div>')

function getposOffset(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
parentEl=parentEl.offsetParent;
}
return totaloffset;
}


function showhide(obj, e, visible, hidden, menuwidth){
if (ie4||ns6)
//dropmenuobj.style.left=dropmenuobj.style.top=500
dropmenuobj.widthobj=dropmenuobj.style
dropmenuobj.widthobj.width=menuwidth
if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
obj.visibility=visible
else if (e.type=="click")
obj.visibility=hidden
}

function iecompattest(){
return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
}

function clearbrowseredge(obj, whichedge){
var edgeoffset=0
if (whichedge=="rightedge"){
var windowedge=ie4 && !window.opera? iecompattest().scrollLeft+iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
dropmenuobj.contentmeasure=dropmenuobj.offsetWidth
if (windowedge-dropmenuobj.x-obj.offsetWidth < dropmenuobj.contentmeasure)
edgeoffset=0 //dropmenuobj.contentmeasure+obj.offsetWidth
}
else{
var topedge=ie4 && !window.opera? iecompattest().scrollTop : window.pageYOffset
var windowedge=ie4 && !window.opera? iecompattest().scrollTop+iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
dropmenuobj.contentmeasure=dropmenuobj.offsetHeight
if (windowedge-dropmenuobj.y < dropmenuobj.contentmeasure){ //move menu up?
edgeoffset=dropmenuobj.contentmeasure-obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either? (position at top of viewable window then)
edgeoffset=dropmenuobj.y
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmanu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemanu()
dropmenuobj=document.getElementById? document.getElementById("dropmenubkdiv") : dropmenubkdiv
populatemenu(menucontents)

if (ie4||ns6){
showhide(dropmenuobj.style, e, "visible", "hidden", menuwidth)
dropmenuobj.x=getposOffset(obj, "left")
dropmenuobj.y=getposOffset(obj, "top")
dropmenuobj.style.left=dropmenuobj.x-clearbrowseredge(obj, "rightedge")+obj.offsetWidth+horizoffset+"px"
//dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "bottomedge")+"px"
//dropmenuobj.style.bottom="36"
}

return clickreturnvalue()
}

function clickreturnvalue(){
if (ie4||ns6) return false
else return true
}

function contains_ns6(a, b) {
while (b.parentNode)
if ((b = b.parentNode) == a)
return true;
return false;
}

function dynamichide(e){
if (ie4&&!dropmenuobj.contains(e.toElement))
delayhidemenu()
else if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
delayhidemenu()
}

function hidemenu(e){
if (typeof dropmenuobj!="undefined"){
if (ie4||ns6)
dropmenuobj.style.visibility="hidden"
}
}

function delayhidemanu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemanu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

function getmetaContents(mn){
   var m = document.getElementsBytagName('meta');
   for(var i in m){
    if(m[i].name == mn){
      return m[i].content;
    }
  }
}
