var citate;
function paste(name){
document.form1.elements[1].value+="<b>"+name+"</b>\n";
}
function paste_over(){
if (document.selection) citate=document.selection.createRange().text;
else if (document.getSelection) citate=document.getSelection().toString();
}
function paste_cit(){
if (citate) document.form1.elements[1].value+="<em>"+citate+"</em>\n";
}
function paste_b(){
if (document.selection) citate=document.selection.createRange().text;
else if (document.getSelection) citate=document.getSelection().toString();
document.form1.elements[1].value+="<b>"+citate+"</b>";
}                       
function paste_i(){
if (document.selection) citate=document.selection.createRange().text;
else if (document.getSelection) citate=document.getSelection().toString();
document.form1.elements[1].value+="<i>"+citate+"</i>";
}
function paste_u(){
if (document.selection) citate=document.selection.createRange().text;
else if (document.getSelection) citate=document.getSelection().toString();
document.form1.elements[1].value+="<u>"+citate+"</u>";
}

var ruschars=new
Array("À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","÷","ø","ù","ú","û","ü","ý","þ","ÿ");

function unesc(text) {
var pos=0;
var si=0;
var h="";
var n=0;
var es="";
while (text.indexOf('%',pos)!=-1) {
si=text.indexOf('%',pos);
es=text.substring(si+1,si+3);
h="0x"+es;
h=parseInt(h);
if (h>191) {n=ruschars[h-192];} else {eval('n="\\x'+es+'";');}
text=text.substring(0,si)+n+text.substring(si+3,text.length);
pos=si+1;
}
return text;}
	
function getCookie(cookieName){
    var ourCookie=document.cookie;
    if(!ourCookie || ourCookie=="") {return "";}
    ourCookie=ourCookie.split(";");
    var i=0;
    var Cookie;
    while (i<ourCookie.length) {
 Cookie=ourCookie[i].split("=")[0];
 if (Cookie.charAt(0)==" ") {Cookie=Cookie.substring(1);}
 if (Cookie==cookieName){return unesc(ourCookie[i].split("=")[1]);}
 i++;
    }
    return "";
}