        function HTMLAlert(msg) {
            /* Let the browser convert all ring and umlauts to the correct character (not boxes). */
            var x=document.createElement("span");
            x.innerHTML=msg;
            alert(x.innerHTML);
        }
        function mail(arg) {
            var adress="";
            for(var t=0,arg=arg.replace("0x","");t<arg.length;t+=2)
                adress+=String.fromCharCode(parseInt(arg.substr(t,2),16).toString(10));
            location.href="mailto:"+adress;
        }
        function getmail(arg) {
            var adress="";
            for(var t=0,arg=arg.replace("0x","");t<arg.length;t+=2)
                adress+=String.fromCharCode(parseInt(arg.substr(t,2),16).toString(10));
            return adress;
        }
        function toggle(src,cssClass) {
            var show=src.className.indexOf("selected")==-1;
            src.className=cssClass+(show?" selected":"");
            document.getElementById(src.id.replace("toggler_","display_")).style.display=show?"block":"none";
        }
        function skip(src) {
            if (src.value.length<src.maxLength) return;
            var index=0;
            // We have no forms so we need to do it this way...
            var inputs=document.getElementsByTagName("input");
            for(index=0;index<inputs.length;index++)
                if(inputs[index]==src) {
                    setTimeout("document.getElementById(\""+inputs[++index%inputs.length].id+"\").select();",10);
                    return;
                }
        }
        function printContent(path) {
            window.open(path,'Print','width=780,location=no,menubar=yes,scrollbars=yes,resizable=yes');
            return void(0);
        }
        function tellFreind(path) {
            window.open("SendLink.aspx?path="+path,'TellFreind','width=600,height=600,location=no,menubar=no,scrollbars=no,resizable=yes');
            return void(0);
        }
        
        function initContent(tag) {
            if(tag==null) {
                initContent("p");
                initContent("li");
                return;
            }
            
            var divs=document.getElementsByTagName(tag);
            for(var t=0;t<divs.length;t++)
                if(divs[t].innerHTML.indexOf("<!--scontent")==0) {
                    var data=divs[t].innerHTML.match(/<!--scontent\w+-->/);
                    if(data==null) continue;
                    var data2=getmail(data.toString().replace("<!--scontent","").replace("-->",""));
                    divs[t].innerHTML=divs[t].innerHTML.replace(data,data2);
                }
        }
        function contactDeleteConfirm(msg) {
            var x=document.createElement("span");
            x.innerHTML=msg;
            return confirm(x.innerHTML);
        }
        function gohref(href) {
            if(href!=null&&href!="") {
                location.href=href;
            }
            return void(0);
        }
        
        function markup(word) {
            var body=document.getElementsByTagName("body")[0].innerHTML;
            var exp=new RegExp(">[^><]*[ .,-:;]"+word+"[ .,-:;][^<>]*<","i");

            var replacetext="<span style=\"background-color:yellow;color:black;\">{word}</span>";            

            var i=0;
            while(exp.exec(body)!=null) {
                var match=exp.exec(body)[0];
                body=body.replace(match,match.replace(new RegExp(word,"i"),"<!--hilite"+(new RegExp(word,"i").exec(match)[0])+"-->"));
            }
            
            exp=new RegExp("<!--hilite[^><]*-->");
            while(exp.exec(body)!=null) {
                var match=exp.exec(body)[0];
                var replaceword=replacetext.replace("{word}",(new RegExp(word,"i")).exec(match)[0]);
                body=body.replace(match,replaceword);
            }

            body=body.replace(/<!--hilite-->/g,replacetext);
            
            document.getElementsByTagName("body")[0].innerHTML=body;
        }
        
        function goHash(hash) {
            if(location.hash!=hash) location.hash=hash;
        }
        
        function exclusiveOnchange(select1,select2) {
            if(!select1.id) select1=document.getElementById(select1);
            if(!select2.id) select2=document.getElementById(select2);
            if(!select1.id||!select2.id) return;
            
            if(select1.selectedIndex==0&&select2.selectedIndex==0)
                select2.selectedIndex=1;

            if(select1.selectedIndex>0&&select2.selectedIndex>0)
                select2.selectedIndex=0;
        }