//function vrweb_window(URL,winName,features) { window.open(URL,winName,features); }

(function(){
        function encode(b){
                if (typeof encodeURIComponent=="function")
                        {return encodeURIComponent(b)}
                else
                        {return escape(b)}
        }
        function add_parameter_to_url(b,a)
        {
                if (a) {window.vrweb_url+="&"+b+"="+a}
        }
        function add_parameter(b,a)
        {
                if (a) {add_parameter_to_url(b,encode(a))}
        }
        function add_parameter_to_url1(b,a)
        {
                if (a) {window.vrweb_url+=b+"="+a}
        }
        function add_parameter1(b,a)
        {
                if (a) {add_parameter_to_url1(b,encode(a))}
        }
        function icon()
        {
                var icon = window.vrweb_icon;
                var iconcolor = window.vrweb_iconcolor;
                var guilang = window.vrweb_guilang;
                var buttonvar = button_version();
                var hostprotocol = (("https:" == document.location.protocol) ? "https://" : "http://");
                //return '<img class="vrweb_img" border="0" src="'+hostprotocol+'www.linguatec.net/images/vrweb/buttons/'+buttonvar+'/'+iconcolor+'/VRweb_Button_'+icon+'_'+guilang+'.png" />';
                if (hostprotocol == 'http://') {
                    return '<img class="vrweb_img" alt="Vorlesen" border="0" src="'+hostprotocol+'vrweb1.linguatec.net/images/vrweb/buttons/'+buttonvar+'/'+iconcolor+'/VRweb_Button_'+icon+'_'+guilang+'.png" />';
                } else {
                    return '<img class="vrweb_img" alt="Vorlesen" border="0" src="'+hostprotocol+'www.linguatec.net/images/vrweb/buttons/'+buttonvar+'/'+iconcolor+'/VRweb_Button_'+icon+'_'+guilang+'.png" />';
                }
        }
        
        function popup_version()
        {
            if (window.vrweb_popup) {
                return window.vrweb_popup;
            } else {
                return 'popup1';
            }
        }
        
        function button_version()
        {
            if (window.vrweb_iconvar) {
                return window.vrweb_iconvar;
            } else {
                return 'normal';
            }
        }
        
        function popup_link()
        {
            if (popup_version() == 'popup3') {
                return 'javascript:window.open(\''+window.vrweb_url+'\',\'vrweb\');return false;'
            } else if (popup_version() == 'popup2') {
                return 'javascript:window.open(\''+window.vrweb_url+'\',\'vrweb\',\'menubar=no,toolbar=no,status=no,location=no,scrollbars=no,resizable=no,width=350,height=250,left=0,top=0\');return false;'
            } else {
                return 'javascript:window.open(\''+window.vrweb_url+'\',\'vrweb\',\'menubar=no,toolbar=no,status=no,location=no,scrollbars=no,resizable=no,width=350,height=120,left=0,top=0\');return false;'
            }
        }
                        
        function start() {
                a = document.location;
                b = window;
                //b.vrweb_url="http://87.230.98.178/Server/vrwebpremium.pl?";
                b.vrweb_url= "http://de.sitestat.com/styria/diepresse/s?features.vorlesen&amp;ns_type=clickout&amp;ns_url=" + "http://vrweb1.linguatec.net/vrweb/"+popup_version()+"?";
                add_parameter1('srcurl',a);
                //add_parameter('guilang',b.vrweb_lang);
                //add_parameter('gui','popup');
                add_parameter('guilang',b.vrweb_guilang);
                add_parameter('lang',b.vrweb_lang);
                add_parameter('readcontent',b.vrweb_readcontent);
                add_parameter('srctype',b.vrweb_srctype);
                add_parameter('srccharset',b.vrweb_srccharset);
                add_parameter('readelementsname',b.vrweb_readelementsname);
                add_parameter('readelementsclass',b.vrweb_readelementsclass);
                add_parameter('exclelementsname',b.vrweb_exclelementsname);
                add_parameter('exclelementsclass',b.vrweb_exclelementsclass);
                add_parameter('sitetopic',b.vrweb_sitetopic);
                add_parameter('customerid',b.vrweb_customerid);
                add_parameter('cache',b.vrweb_cache);
                add_parameter('sndpitch',b.vrweb_sndpitch);
                add_parameter('sndspeed',b.vrweb_sndspeed);
                add_parameter('sndtype',b.vrweb_sndtype);
                add_parameter('sndquality',b.vrweb_sndquality);
                add_parameter('sndgender',b.vrweb_sndgender);
                add_parameter('simpleparse',b.vrweb_simpleparse);
                add_parameter('srctext','');
                //icon_html = icon();
                //alert(icon());
                //document.write('<div id="vrweb_div" style="width:'+b.vrweb_width+'px;"><a class="vrweb_a" style="'+css_a()+'" href="'+b.vrweb_popup+'" target="vrweb">'+icon()+b.vrweb_icontext+'</a></div>');
                
                document.write('<a class="vrweb_a" href="#" style="text-decoration:none;" onclick="'+popup_link()+'">'+icon()+'</a>');
        }
        start();
})()