var ie5=document.all&&document.getElementById var contextMenu_items = new Array(); if (contextMenu_old == undefined) { var contextMenu_old = (document.onclick) ? document.onclick : function () {}; document.onclick= function () {contextMenu_old();contextMenu_hide();}; } function contextMenu_renderLeftClick(menuId,e) { contextMenu_hide(e); contextMenu_show(menuId,e); e.cancelBubble=true; e.returnValue=false; return false; } function contextMenu_show(menuId,e){ var menuobj=document.getElementById(menuId) var posx = 0; var posy = 0; var yoffset = 0; var xoffset = 0; var firedobj = ie5?e.srcElement:e.target; while (firedobj!=null && firedobj.tagName!="HTML"){ //this is a hack, need to revisit if (firedobj.tagName == "DIV") { xoffset+=firedobj.offsetLeft; yoffset+=firedobj.offsetTop;} firedobj=firedobj.offsetParent; } var el = document.documentElement; posx = e.clientX - xoffset + (ie5? el.scrollLeft : window.pageXOffset); posy = e.clientY - yoffset + (ie5? el.scrollTop : window.pageYOffset); menuobj.style.left=posx + "px"; menuobj.style.top=posy + "px"; menuobj.style.visibility="visible" return false } function contextMenu_hide(){ for (i=0;i'; for (i=0;i" + this.linkLabels[i] + "
"; } output += ''; if (this.type == "image") { output += '' + this.name + ''; } else { output += '' + this.name + ''; //output += '' + this.name + ''; } return output; } function contextMenu_print(){ document.write(this.draw()); } function contextMenu_addLink(linkUrl,linkLabel){ this.linkUrls.push(linkUrl); this.linkLabels.push(linkLabel); }