//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 popup_version()
        {
            if (window.vrweb_popup) {
                return window.vrweb_popup;
            } else {
                return 'popup1';
            }
        }
        
        
	    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://vrweb.linguatec.net/vrweb/"+popup_version()+"?";
                add_parameter1('srcurl',b.me_srcurl);
                //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="readpage" href="#" style="text-decoration:none;" onclick="'+popup_link()+'"><span class="option-label">Seite&nbsp;vorlesen&nbsp;</span><span class="linguatec-icon">&nbsp;</span></a>');
        }
        start();
})()

