 function getConfirmBox(lalertString,lurl){
  erg=confirm(lalertString);
  if(erg){
   document.location.href=lurl;
  }
 }

 function getConfirm(lalert){
  erg=confirm(lalert);
  if(erg){
  return 1;
  }else{
  return 0;
  }
 }

function openmedia(fileid,myfilename,scriptname,myfiletype){
	//alert(''+scriptname+'?id='+fileid+'&filename='+myfilename+'&filetype='+myfiletype+'');
 var win=window.open(scriptname+'?id='+fileid+'&filename='+myfilename+'&filetype='+myfiletype,'showfiles','menubar=no,status=yes,scrollbars=no,resizable=yes,width=200,height=200');
 win.focus();
}

   


    function showinfo(text1,text2) {
	
  var erg1 = encode_utf8(text1);
  var erg2 = encode_utf8(text2);
  
  lstring=erg1+"~"+erg2;
	
	
	parent.frames[0].document.info.SetVariable("jtext1", lstring);
	//alert(lstring);
   }


function selectall(lv,lto) {
for(i=lv;i<=lto;i++){
document.getElementById(i).checked = true;
}
}

function deselectall(lv,lto) {
for(i=lv;i<=lto;i++){
document.getElementById(i).checked = false;
}
}



  function encode_utf8(rohtext) {
             // dient der Normalisierung des Zeilenumbruchs
            rohtext = rohtext.replace(/\r\n/g,"\n");
             var utftext = "";
             for(var n=0; n<rohtext.length; n++)
                 {
                 // ermitteln des Unicodes des  aktuellen Zeichens
                var c=rohtext.charCodeAt(n);
                 // alle Zeichen von 0-127 => 1byte
                 if (c<128)
                     utftext += String.fromCharCode(c);
                // alle Zeichen von 127 bis 2047 => 2byte
                 else if((c>127) && (c<2048)) {
                     utftext += String.fromCharCode((c>>6)|192);
                     utftext += String.fromCharCode((c&63)|128);}
                 // alle Zeichen von 2048 bis 66536 => 3byte
                 else {
                    utftext += String.fromCharCode((c>>12)|224);
                    utftext += String.fromCharCode(((c>>6)&63)|128);
                    utftext += String.fromCharCode((c&63)|128);}
                }
            return utftext;
         }

