function getXMLRequester( )
{
    var xmlHttp = false;
            
    // try to create a new instance of the xmlhttprequest object        
    try
    {
        // Internet Explorer
        if( window.ActiveXObject )
        {
            for( var i = 5; i; i-- )
            {
                try
                {
                    // loading of a newer version of msxml dll (msxml3 - msxml5) failed
                    // use fallback solution
                    // old style msxml version independent, deprecated
                    if( i == 2 )
                    {
                        xmlHttp = new ActiveXObject( "Microsoft.XMLHTTP" );    
                    }
                    // try to use the latest msxml dll
                    else
                    {
                        
                        xmlHttp = new ActiveXObject( "Msxml2.XMLHTTP." + i + ".0" );
                    }
                    break;
                }
                catch( excNotLoadable )
                {                        
                    xmlHttp = false;
                }
            }
        }
        // Mozilla, Opera und Safari
        else if( window.XMLHttpRequest )
        {
            xmlHttp = new XMLHttpRequest();
        }
    }
    // loading of xmlhttp object failed
    catch( excNotLoadable )
    {
        xmlHttp = false;
    }
    return xmlHttp ;
}

//-------------------------------------------------------------------------------

function clean_text(text){
		text=unescape(escape(text.replace(/(<[^>]*>)/g,"")).replace(/%0D%0A/gi,""));
		return text.replace(/\s+/g,"");
		//return text;
}

//-------------------------------------------------------------------------------

function remove(id) {
	//alert("try to remove: "+id);
	var Knoten;
	var Anzahl = document.getElementById(id).childNodes.length;
	for(var i=0;i<Anzahl;i++){
		 Knoten = document.getElementById(id).firstChild;
		 document.getElementById(id).removeChild(Knoten);
	}
}

//-------------------------------------------------------------------------------

function display(id) {
  document.getElementById(id).style.display = "";
}

//-------------------------------------------------------------------------------

var xmlhttp = getXMLRequester();

//-------------------------------------------------------------------------------
