    var currentCategory;
    var currentID;

var currentSpecial;
var currentDS;

function ClearSearch(textBox){
    if(textBox.value == "Suchen"){
        textBox.value = "";
    }
}

function ResetSearch(textBox){
    if(textBox.value == ""){
        textBox.value = "Suchen";
    }
}

function hs(id)
{
	control = document.getElementById(id)
 
	if(control.style.display == 'block')
    {
        control.style.display = 'none';
        currentDS = id;
    }
    else
    {
        control.style.display = 'block';
        if(currentDS == null)
        {
            currentDS = id;
        }
        if(currentDS.length > 0 && currentDS != id)
        {
            document.getElementById(currentDS).style.display = 'none';
            currentDS = id;
        }
    }   	
}

function HideAndShow(recordid)
{
    id = 'SpecialsBox_' + recordid;
    control = document.getElementById(id)
    
    
    if(control.style.display == 'block')
    {
        control.style.display = 'none';
        currentSpecial = id;
    }
    else
    {
        control.style.display = 'block';
        if(currentSpecial == null)
        {
            currentSpecial = id;
        }
        if(currentSpecial.length > 0 && currentSpecial != id)
        {
            document.getElementById(currentSpecial).style.display = 'none';
            currentSpecial = id;
        }
    }


}
    
    function _s(obj){
	

        currentID = obj.id;
        currentCategory = obj.innerHTML.replace("&amp;","&");
    
	    var e = document.getElementById('cc');
        e.value = currentCategory;
    }
    
    function _a(obj){
		window.opener.setEbayCategory(currentID,currentCategory);
		window.close();
    }
    
    function _c(obj,ul){
        var e = document.getElementById(obj);
        
        if(e.style.display=='none'){
            e.style.display = '';
            ul.src = '/images/open.gif';
        }else{
            e.style.display = 'none';        
            ul.src = '/images/closed.gif';            
        }
    }
    
    
    function HideShowIGV(obj){
            var e = document.getElementById(obj);
        
        if(e.style.display=='none'){
            e.style.display = '';
        }else{
            e.style.display = 'none';        
        }
    }
    
    
    
    
    
    
    
    
    
    
        function hideshwArea(){
    shwArea.style.pixelLeft = 0;
    shwArea.style.width = 0;
    shwArea.style.pixelTop = 0;
    shwArea.style.height = 0;
	shwArea.style.display = "none";
}
function setshwArea(startX,startY,endX,endY){

startX 	= startX + 10
startY 	= startY + 10
endX	= endX + 10
endY	= endY + 10


	if (startX < endX){
		shwArea.style.pixelLeft = startX;
		shwArea.style.width = endX - startX;
	}else{
		shwArea.style.pixelLeft = endX;
		shwArea.style.width = startX - endX;
	}
	
	if (startY < endY){
		shwArea.style.pixelTop = startY;
		shwArea.style.height = endY - startY;
	}else{
		shwArea.style.pixelTop = endY;
		shwArea.style.height = startY - endY;
	}

	shwArea.style.display = "";
}
    function impressum()
    {
        window.open("impressum.htm","IMPRESSUM","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=640, height=480");
    }
    function openUserDetail(target){
        var child = window.open(target,"UserDetail","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=656, height=486");
    }
    function openAdminPage(target){
        var child = window.open(target,"Child","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=640, height=800");
    }
        function openSortPage(target){
        var child = window.open("/Administration/SortRecords.aspx?" + target,"Child","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=550, height=600");
    }
            function openSortPageIn(target){
        var child = window.open("SortRecords.aspx?" + target,"Child","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=yes, resizable=no, copyhistory=yes, width=550, height=600");
    }
    function openPreAdminPage(target){
        if(target.indexOf("AddExisting")<0){
            openAdminPage("/Administration/AdminObjects.aspx?" + target + "&Type=" + document.forms[0].typeBox.value);
        }else{
            openAdminPage("/Administration/list.aspx?" + target + "&Type=" + document.forms[0].typeBox.value);
        }
    }
        function openPreAdminPageIn(target){
        if(target.indexOf("AddExisting")<0){
            openAdminPage("/AdminObjects.aspx?" + target + "&Type=" + document.forms[0].typeBox.value);
        }else{
            openAdminPage("list.aspx?" + target + "&Type=" + document.forms[0].typeBox.value);
        }
    }
    function switchTheme(themeBox,assignementID,isDetail){
        openAdminPage("/Administration/SwitchTheme.aspx?ThemeURL=" + themeBox.value + "&AssignementID=" + assignementID + "&IsActiveTheme=" + isDetail);
    }
        function switchThemeIn(themeBox,assignementID,isDetail){
        openAdminPage("SwitchTheme.aspx?ThemeURL=" + themeBox.value + "&AssignementID=" + assignementID + "&IsActiveTheme=" + isDetail);
    }
    var activeTable = null;
    
    function taskHighlight(table){
        if(activeTable!=null){
            activeTable.style.backgroundColor = '#f9f9f9';
        }
        table.style.backgroundColor = '#C6D5FE';
        activeTable = table;
    }
    
    function AddRuleToObject(recordID){
       openAdminPage("AddRuleForObject.aspx?RecordID=" + recordID);
    }

  function verbandsportal() {
     window.open("http://www.beranet.de/verband/module/bkk_energie/","Verband","width=780,height=600,menu=no,toolbar=yes,scrollbars=yes,status=yes");
  }
