var tySearchWidget_default = { uri : 'http://obama.besucht-dresden.de/tycon/modules/search/handlers/suggest.requesthandler.php', post : '', config : { content : [], db : [], navigation : [], output_id : '', result_src : '', resultclass : '', activeresultclass : '' }, configure : function(type, data) { if (typeof this.config[type] != 'string') { this.config[type].push(data); } else { this.config[type] = data; } }, createPost : function() { for (var type in this.config) { if (typeof this.config[type] != 'string') { for (var i=0; i < this.config[type].length; i++) { this.post += '&'+type+'['+i+']'+'='+this.config[type][i]; } } else { this.post += '&'+type+'='+this.config[type]; } } this.post += '&PHPSESSID=n3atipptpvms4oono9bgkjg2b4'; }, run : function(value) { if (this.post=='') this.createPost(value); this.sendRequest('search='+value + this.post); }, sendRequest : function(post) { var xmlobj = false; try { xmlobj = new ActiveXObject( "Msxml2.XMLHTTP" ); } catch (e) { try { xmlobj = new ActiveXObject( "Microsoft.XMLHTTP" ); } catch (oc) { xmlobj = null; } } if(!xmlobj && typeof XMLHttpRequest != "undefined") xmlobj = new XMLHttpRequest(); if(xmlobj){ xmlobj.open("POST", this.uri, true); xmlobj.setRequestHeader("Method", "POST " + this.uri + " HTTP/1.1"); xmlobj.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xmlobj.onreadystatechange = function() { if (xmlobj.readyState != 4) return; try { eval(xmlobj.responseText); } catch (e) {xajaxrequestrunning = false;} } xmlobj.send( post ); } return xmlobj; } }