function click (e)
{
if (!e)
e = window.event;
if ((e.type && e.type == "contextmenu") || (e.button && e.button == 2) || (e.which && e.which == 3))
{
if (window.opera)
window.alert("Sorry: Diese Funktion ist deaktiviert.");
else
{
getKontextmenu(e);
}
return false;
}
}
function selectEntry(obj,DID,p,e)
{
var color_on = Array();
var color_off = Array();
color_on[0] = "#004589";
color_on[1] = "#0067AC";
color_on[2] = "#449944";// Neu 1
color_on[3] = "#229922";// Neu 2
color_off[0] = "#cccccc";
color_off[1] = "#dddddd";
color_off[2] = "#88ff88";// Neu 1
color_off[3] = "#66ff66";// Neu 2
var hexcolor = obj.style.backgroundColor;
if(hexcolor.length != 7){hexcolor = getHexColorFromRGB(obj.style.backgroundColor);}
if(document.getElementById('selectedentry_'+DID).checked == false)
{
if(document.getElementById('newentry_'+DID).checked == true)
{
if(p == 1) {obj.style.backgroundColor = color_on[2];}
else {obj.style.backgroundColor = color_on[3];}
obj.style.color = '#ffffff';
document.getElementById('selectedentry_'+DID).checked = true;
}
else
{
if(p == 1) {obj.style.backgroundColor = color_on[0];}
else {obj.style.backgroundColor = color_on[1];}
obj.style.color = '#ffffff';
document.getElementById('selectedentry_'+DID).checked = true;
}
}
else
{
if(document.getElementById('newentry_'+DID).checked == true)
{
if(p == 1) {obj.style.backgroundColor = color_off[2];}
else {obj.style.backgroundColor = color_off[3];}
obj.style.color = '#000000';
document.getElementById('selectedentry_'+DID).checked = false;
}
else
{
if(p == 1) {obj.style.backgroundColor = color_off[0];}
else {obj.style.backgroundColor = color_off[1];}
obj.style.color = '#000000';
document.getElementById('selectedentry_'+DID).checked = false;
}
}
}
function deactivateUpdate(obj,e)
{
obj.stop();
setMenu('set');
}
function activateUpdate(obj,e)
{
if(document.getElementById("kontextmenu").style.display == 'none')
{
setMenu('clear');
obj.start();
}
}
function setMenu(a,e)
{
if(a == 'clear')
{
if (document.layers)
documentreleaseEvents(Event.MOUSEDOWN);
document.onmousedown = '';
document.oncontextmenu = '';
}
else if(a == 'set')
{
if (document.layers)
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown = click;
document.oncontextmenu = click;
document.onclick = hideKontextmenu;
window.blur = hideKontextmenu;
}
}
function getKontextmenu(e)
{
showKontextmenu(e);
}
// Kontextmenü anzeigen
function showKontextmenu(e)
{
var pos = getPosition(e);
document.getElementById("kontextmenu").style.left = pos.left+"px";
document.getElementById("kontextmenu").style.top = pos.top+"px";
document.getElementById("kontextmenu").style.display = 'inline';
menuStatus=1;
return false;
}
function hideKontextmenu(e)
{
document.getElementById('kontextmenu').style.display ='none';
menuStatus=0;
}
function createKontextmenu(e)
{
menuWidth=122, menuHeight=10;
menuStatus=0;
oF="onfocus='if(this.blur)this.blur()'"; // Um hässlichen Linkrahmen in einigen Browsern zu vermeiden
document.write(
"<style type='text/css'>"+
"a.menu {padding:4px;text-decoration:none;font-family:Arial,Verdana;font-size:11px;width:100%;display:block;}"+
"a.menu:link,a.menu:visited {text-decoration:none;color:#ffffff}"+
"a.menu:hover,a.menu:active {text-decoration:none;background-color:#FFFF00;color:#000000}"+
"hr.menu {border:0px;height:1px;background-color:#ffffff;color:#B0C4DE}</style>"+
"<div id='kontextmenu' style='position:absolute;top:-550;left:0;z-index:1000'>"+
"<table cellpadding='0' cellspacing='0' width='"+menuWidth+"' height='"+menuHeight+"' style='border-width:1px;border-color:#ffffff;background-color:#002045'>"+
"<tr><td><a class='menu' href='javascript:history.back()'"+oF+">Zurück</a></td></tr>"+
"<tr><td><a class='menu' href='javascript:history.forward()'"+oF+">Vorwärts</a></td></tr>"+
"<tr><td><a class='menu' href='javascript:setReaded();'"+oF+">Als gelesen markieren</a></td></tr>"+
"<tr><td><a class='menu' href='javascript:print()'"+oF+">Drucken</a></td></tr>"+
"</table></div>");
document.getElementById("kontextmenu").style.display = "none";
// Rechter Mausklick: Menü anzeigen, linker Mausklick: Menü verstecken
// document.oncontextmenu=showKontextmenu; //oncontextmenu geht nicht bei NN 6.01
document.onmouseup=hideKontextmenu;
}
function getPosition(e)
{
if(!e) e = window.event;
var pos = new Object();
pos.left = e.clientX;
pos.top = e.clientY;
var b = (window.document.compatMode && window.document.compatMode == "CSS1Compat") ?
window.document.documentElement : window.document.body || null;
if (b)
{
pos.scrollLeft= pos.left + b.scrollLeft;
pos.scrollTop = pos.top + b.scrollTop;
}
else if(document.layers)
{
// Netscape 4.
pos.scrollLeft = e.pageX;
pos.scrollTop = e.pageY;
pos.left = e.pageX - window.pageXOffset;
pos.top = e.pageY - window.pageYOffset;
}
return pos;
}
function setReaded(e)
{
alert('readed');
var DIDLIST = getDIDListe();
}
function getDIDListe()
{
var obj = document.getElementById('MeineNeuenEintraege');
var anzahl = obj.getElementsByTagName('INPUT').length
var DIDLIST = Array();
for(i=0;i<anzahl/2;i++)
{
if(document.getElementById('selectedentry_'+i).checked == true)
{
DIDLIST[DIDLIST.length] = document.getElementById('selectedentry_'+i).value;
}
}
return DIDLIST;
}
createKontextmenu();