                                                                                                                                                                                                                                                              
function clipValues(obj,which)
{
	if (document.all == null)
	{
		if (which=="t") return obj.clip.top;
		if (which=="r") return obj.clip.right;
		if (which=="b") return obj.clip.bottom;
		if (which=="l") return obj.clip.left;
	}
	else
	{
		var clipv = obj.clip.split("rect(")[1].split(")")[0].split("px");
		if (which=="t") return Number(clipv[0]);
		if (which=="r") return Number(clipv[1]);
		if (which=="b") return Number(clipv[2]);
		if (which=="l") return Number(clipv[3]);
	}
}

function clipTo(obj,t,r,b,l)
{
	if (document.all == null)
	{
		obj.clip.top = t;
		obj.clip.right = r;
		obj.clip.bottom = b;
		obj.clip.left = l;
	}
	else
	{
		obj.clip = "rect("+t+"px "+r+"px "+b+"px "+l+"px)";
	}
}

function loginLayerToggle()
{
	var obj = loginGadget;
	if (document.all) obj = obj.style;

	if (clipValues(obj, "b") > 30)
	{
		clipTo (obj, 0, 169, 25, 0);
	}
	else
	{
		clipTo (obj, 0, 169, 250, 0);
	}
}
function MM_findObj(n, d) { //v4.01
  var p,i,x;
  if(!d) d=document;
  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document;
    n=n.substring(0,p);
  }
  if(!(x=d[n])&&d.all) x=d.all[n];
  for (i=0;!x&&i<d.forms.length;i++)
    x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++)
    x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById)
    x=d.getElementById(n);
    return x;
}
function My_toggle(layer){

    var my_layer= MM_findObj(layer);
    if(my_layer){
        if(document.layers) {
           my_layer.visibility=(my_layer.visibility=="show")?"hidden":"visible";
        } else{
           (my_layer.style).visibility=((my_layer.style).visibility=="visible")?"hidden":"visible";
        }
    }
}
function enterkey(eEvent, thisForm) {
    if (eEvent.keyCode == 13){
        thisForm.submit();
    }
    return true;
}
function encode_utf8(text) {
             // dient der Normalisierung des Zeilenumbruchs
             text = text.replace(/\r\n/g,"\n");
             var utftext = "";
             for(var n=0; n<rohtext.length; n++)
                 {
                 // ermitteln des Unicodes des  aktuellen Zeichens
                 var c=text.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;
         }
