    var currentCategory;
    var currentID;
    

var currentArticle;

    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 checkAnchors()
{
	var index = window.location.href.indexOf('#');
	
	if(index > -1)
	{
		var lid = window.location.href.substring(index);
		
		var links = document.body.getElementsByTagName("a");

		var len=links.length;
		for(var key=0; key<len; key++)
		{
			if(links[key].href.indexOf(lid) > -1)
			{
				links[key].name = lid.substring(1);

				window.location.href = window.location.href;
				

				HideShowArticle(links[key]);
				break;
			}
		}
	}
}

function HideShowArticle(articleParam)
{
	newArticle = articleParam.parentNode.parentNode.children[1];
	
	if(newArticle.style.display == '')
	{
		newArticle.style.display = 'none';
	}
	else
	{
		newArticle.style.display = '';
	}
	
	if(currentArticle != null && currentArticle != 'undefined')
	{
		if(newArticle != currentArticle)
		{
			currentArticle.style.display = 'none';
		}
	}

	
	if(newArticle != currentArticle)
	{
		currentArticle = newArticle;
	}


}
    
    
    
    
    
    
    
    
        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=yes, 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=yes, 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=yes, 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=yes, 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=yes, 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);
    }

