/*
function insertbuy(id)
{
stm_bm(["menu41d7",650,"","blank.gif",0,"","",0,0,0,0,100,1,0,0,"","",0,0,1,1,"default","hand",""],this);
//stm_bp("p0",[1,4,0,0,0,5,0,0,100,"",-2,"",-2,100,0,0,"#7F7F7F","transparent","",3,0,0,"#000000"]);

//stm_bp("p0",[0,4,0,0,2,2,0,7,100,"progid:DXImageTransform.Microsoft.Iris(irisStyle=diamond,motion=out,enabled=0,Duration=0.60)",-2,"progid:DXImageTransform.Microsoft.Iris(irisStyle=diamond,motion=in,enabled=0,Duration=0.60)",-2,50,0,0,"#fffff7","transparent","",3,0,0,"#000000"]);

stm_bp('p0',[0,4,0,0,1,1,0,0,100,'',-2,'',-2,70,0,0,'#000000','transparent','',3,0,0,'#000000']);

stm_ai('p0i0',[0,'Buy','','',-1,-1,0,'','_self','','','','',0,0,0,'','',0,0,0,0,1,'#FFFFFF',1,'##D6F2F9',0,'','',3,3,0,0,'#999999','#999999','#006699','#006699','8pt Arial','8pt Arial',0,0]);
//stm_ai("p0i0",[0,"Buy","","",-1,-1,0,"","_self","","","","",0,0,0,"","",0,0,0,1,1,"#FFFFFF",1,"#D6F2F9",0,"","",3,3,0,0,"#999999","#999999","#006699","#006699","8pt Arial","8pt Arial",0,0]);
stm_bpx("p1","p0",[1,2,0,-20,0,3,0,0,100,"progid:DXImageTransform.Microsoft.Fade(overlap=.5,enabled=0,Duration=0.34)",-2,"",-2,76,0,0,"#7F7F7F","transparent"]);
stm_aix("p1i0","p0i0",[0,"USD E5","","",-1,-1,0,"checkout_single.php?pay_mode=E5_USD&productId="+id,"_self","","","","",0,0,0,"","",0,0,0,0,1,"#F4F3ED",0,"#D6F2F9",0,"","",3,3,0,0,"#8FCEFF","#8FCEFF"]);
stm_aix("p1i1","p1i0",[0,"EUR E5","","",-1,-1,0,"checkout_single.php?pay_mode=E5_EUR&productId="+id]);
stm_aix("p1i2","p1i0",[0,"USD Paypal","","",-1,-1,0,"checkout_single.php?pay_mode=Paypal_USD&productId="+id]);
stm_aix("p1i3","p1i0",[0,"EUR Paypal","","",-1,-1,0,"checkout_single.php?pay_mode=Paypal_EUR&productId="+id]);
stm_ep();
stm_ep();
stm_em();
}
*/

//Contents for menu 2, and so on
var menu2=new Array()
menu2[0]='<a href="http://cnn.com">CNN</a>'
menu2[1]='<a href="http://msnbc.com">MSNBC</a>'
menu2[2]='<a href="http://news.bbc.co.uk">BBC News</a>'

var menuwidth='165px' //default menu width
var menubgcolor='#FFFFFF' //menu bgcolor
var disappeardelay=250 //menu disappear speed onMouseout (in miliseconds)
var hidemenu_onclick="yes" //hide menu when user clicks within menu?

/////No further editting needed

var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" 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="-500px"
if (menuwidth!=""){
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 < dropmenuobj.contentmeasure)
edgeoffset=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 up?
edgeoffset=dropmenuobj.contentmeasure+obj.offsetHeight
if ((dropmenuobj.y-topedge)<dropmenuobj.contentmeasure) //up no good either?
edgeoffset=dropmenuobj.y+obj.offsetHeight-topedge
}
}
return edgeoffset
}

function populatemenu(what){
if (ie4||ns6)
dropmenuobj.innerHTML=what.join("")
}


function dropdownmenu(obj, e, menucontents, menuwidth){
if (window.event) event.cancelBubble=true
else if (e.stopPropagation) e.stopPropagation()
clearhidemenu()
dropmenuobj=document.getElementById? document.getElementById("dropmenudiv") : dropmenudiv
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")+"px"
dropmenuobj.style.top=dropmenuobj.y-clearbrowseredge(obj, "topedge")+obj.offsetHeight+"px"
}

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 delayhidemenu(){
if (ie4||ns6)
delayhide=setTimeout("hidemenu()",disappeardelay)
}

function clearhidemenu(){
if (typeof delayhide!="undefined")
clearTimeout(delayhide)
}

if (hidemenu_onclick=="yes")
document.onclick=hidemenu

