function setPointer(row, action, defaultcolor)
{
//if(row.style.backgroundColor==""){row.style.backgroundColor='rgb(240,240,240)';}

			var c1 = defaultcolor;
			var c2 = '#0099FF'; // marker
			var c3 = '#B3BEB5'; // highlight
			var c4 = '#B3BEB5'; // highlight marker

			if(action=="click_inaktiv"){
	        if(row.style.backgroundColor.toUpperCase()==c1.toUpperCase() || row.style.backgroundColor.toUpperCase()==c3.toUpperCase() ){row.style.backgroundColor=c2;}
			else{row.style.backgroundColor=c1;}
			}
			else if(action=="over"){
			if(row.style.backgroundColor=="" || row.style.backgroundColor.toUpperCase()==c1.toUpperCase() ){row.style.backgroundColor=c3;}
			else if(row.style.backgroundColor.toUpperCase()==c2.toUpperCase()){row.style.backgroundColor=c4;}
			}
			else if(action=="out"){
			if(row.style.backgroundColor.toUpperCase()==c1.toUpperCase()){row.style.backgroundColor=c1;}
			if(row.style.backgroundColor.toUpperCase()==c2.toUpperCase()){row.style.backgroundColor=c2;}
			if(row.style.backgroundColor.toUpperCase()==c3.toUpperCase() ){row.style.backgroundColor=c1;}
			if(row.style.backgroundColor.toUpperCase()==c4.toUpperCase()){row.style.backgroundColor=c2;}
			}
		}



// *****************************************************************************
// Tools
// *****************************************************************************

function pviiClassNew(obj, new_style)
{
  obj.className=new_style;
}

function deleteDS()
{
	if(confirm("Wollen Sie diesen Datensatz wirklich löschen?")) return true;
	return false;
	//return true;
}

function sendNewsletter()
{
	if(confirm("Wollen Sie den aktuellen Newsletter jetzt versenden?")) return true;
	return false;
}


// *****************************************************************************
// Tools - ende
// *****************************************************************************



// *****************************************************************************
// inputReferenz
// *****************************************************************************
function set_PopupReferenzID($dsID, $controlID)
{
	var oEingabe = document.getElementById($controlID);
	oEingabe.value = $dsID;
	LoadReferenzLabel(oEingabe, $controlID);

	var oB = document.getElementById("closePopup");
	oB.click();
}

function LoadReferenzLabel(oSender, RefTyp)
{
	var RefID = oSender.value;
	var URLstring = "go_async.php";

	if(!RefID.match(/^\d+$/) || RefID==0 )
	{
       	var oZiel = document.getElementById(oSender.id + "_label");
		oZiel.value = "";
		oSender.value = 0;
        return;
    }

	var xmlHttp = null;
	// Mozilla, Opera, Safari sowie Internet Explorer 7
	if (typeof XMLHttpRequest != 'undefined') {
	    xmlHttp = new XMLHttpRequest();
	}
	if (!xmlHttp) {
	    // Internet Explorer 6 und älter
	    try {
	        xmlHttp  = new ActiveXObject("Msxml2.XMLHTTP");
	    } catch(e) {
	        try {
	            xmlHttp  = new ActiveXObject("Microsoft.XMLHTTP");
	        } catch(e) {
	            xmlHttp  = null;
	        }
	    }
	}
	if (xmlHttp)
	{
 	//xmlHttp.open('POST', URLstring, true);
    //xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
    xmlHttp.open('GET', URLstring+"?RefID="+RefID+"&RefTyp="+RefTyp+"&SenderID="+oSender.id, true);
    xmlHttp.setRequestHeader("If-Modified-Since", "Sat, 1 Jan 2000 00:00:00 GMT");

    xmlHttp.onreadystatechange = function () {
        if (xmlHttp.readyState == 4) {

	if(typeof ActiveXObject != "undefined")
	{
		var xml = new ActiveXObject("Msxml2.DOMDocument");
        xml.loadXML(xmlHttp.responseText);
        }
        else
        {
		var xml =  (new DOMParser).parseFromString(xmlHttp.responseText, "text/xml");
        }

    var Label = xml.documentElement.getElementsByTagName('Label')[0].firstChild.data;
    var SenderID = xml.documentElement.getElementsByTagName('SenderID')[0].firstChild.data;

	var oZielID = document.getElementById(SenderID + "_label");
	oZielID.value = Label;
        }
    }
    xmlHttp.send(null);
    //xmlHttp.send("RefID="+RefID+"&SenderID="+oSender.id);
	}
}
