var merk = true;
var merkTimer = null;
function getValueByName(name)
{
var obj = document.getElementsByName(name);
var re = ""
for(var loop = 0;loop < obj.length;loop++)
{
if(obj[loop].checked)
{
re = obj[loop].value;
}
}
return re;
}
function unSelect(obj_name)
{
var obj_array = document.getElementsByName(obj_name);
for(var loop = 0;loop < obj_array.length;loop++)
{
obj_array[loop].checked = false;
}
}
function browserCheck()
{
var obj = document.getElementById("browser");
var check = true;
if(objUA.appName == "Internet Explorer" && objUA.appVersion >= 8.0)
{
check = false;
}
if(objUA.appName == "Firefox" && objUA.appVersion >= 3.0)
{
check = false;
}
if(objUA.appName == "Opera" && objUA.appVersion > 9.5)
{
check = false;
}
if(objUA.appName == "Safari" && objUA.appVersion >= 4.0)
{
check = false;
}
if(check)
{
obj.innerHTML = "
";
obj.style.display = "block";
}
}
function eingabe_out(obj,old)
{
if(obj.value == "")
{
obj.value = old;
}
}
function hidden(obj_id)
{
document.getElementById(obj_id).style.visibility = 'hidden';
}
function visible(obj_id)
{
document.getElementById(obj_id).style.visibility = 'visible';
}
function weiter()
{
location.href='index.php';
}
function lboxOn(inhalt,typ,abfrage)
{
var cont = document.getElementById("lbox_cont");
var lbox = document.getElementById("lbox");
if(typ == "info")
{
inhalt = ""+inhalt+"
";
}
else if(typ == "fehler")
{
inhalt = ""+inhalt+"
";
}
else if(typ == "bild")
{
inhalt = "
";
}
else if(typ == "abfrage")
{
inhalt = inhalt + "";
}
else if(typ == "aufruf")
{
inhalt = inhalt + "";
}
else if(typ == "flash")
{
inhalt = "";
}
if(abfrage == "no")
{
cont.style.paddingRight = "5px";
cont.innerHTML = inhalt;
}
else
{
cont.style.paddingRight = "27px";
cont.innerHTML = inhalt+"";
}
var pic = document.getElementById("lbox_pic");
if(pic != null)
{
visible("loader");
pic.onload = function()
{
lboxCenter();
visible("lbox");
hidden("loader");
}
}
else
{
lboxCenter();
visible("lbox");
}
}
function lboxOff()
{
document.getElementById("lbox_cont").innerHTML = "";
hidden("lbox");
}
function displayChange(obj_id)
{
if(document.getElementById(obj_id).style.display == 'none')
{
displayOn(obj_id)
}
else
{
displayOff(obj_id)
}
}
function displayOn(obj_id)
{
document.getElementById(obj_id).style.display = 'block';
}
function displayOff(obj_id)
{
document.getElementById(obj_id).style.display = 'none';
}
function lboxCenter()
{
var cont = document.getElementById("lbox_cont");
var lbox = document.getElementById("lbox");
if(((lbox.offsetWidth/2)-(cont.offsetWidth/2)) > 0)
{
cont.style.left = ((lbox.offsetWidth/2)-(cont.offsetWidth/2)) + "px";
}
else
{
cont.style.left = "0px";
}
if(((lbox.offsetHeight/2)-(cont.offsetHeight/2)) > 0)
{
cont.style.top = ((lbox.offsetHeight/2)-(cont.offsetHeight/2)) + "px";
}
else
{
cont.style.top = "0px";
}
}
function check_reg()
{
var anr = document.getElementsByName("anrede");
var anrede = "";
var vname = document.getElementById("vname");
var nname = document.getElementById("nname");
var pw = document.getElementById("pw");
var pww = document.getElementById("pww");
for(var loop = 0;loop < anr.length;loop++)
{
if(anr[loop].checked) anrede = anr[loop].value;
}
if(anrede == "")
{
lboxOn("Es wurde noch keine Anrede ausgewählt.");
}
else if(vname.value == "")
{
lboxOn("Es wurde noch keine Vorname eingetragen.");
}
else if(nname.value == "")
{
lboxOn("Es wurde noch kein Nachname eingetragen.");
}
else if(pw.value == "")
{
lboxOn("Es wurde noch keine Passwort eingetragen.");
}
else if(pww.value == "")
{
lboxOn("Die Eingabe des Passworts wurde noch nicht wiederholt.");
}
else if(pw.value != pww.value)
{
pw.value = "";
pww.value = "";
lboxOn("Die Wiederholung des Passworts stimmt nicht mit dem eigentlichen Passwort überein.");
}
else
{
document.act_reg.submit();
}
}
function removeChar(obj,typ)
{
if(typ=="mail")
{
obj.value = obj.value.replace(/[^a-zA-Z0-9\-\_\.\ü\ö\ä\Ä\Ü\Ö\@]*$/,"");
}
else if(typ=="web")
{
obj.value = obj.value.replace(/[^a-zA-Z0-9\-\_\.\ü\ö\ä\Ä\Ü\Ö]*$/,"");
}
}var receiveReq = null;
if (window.XMLHttpRequest)
{
receiveReq = new window.XMLHttpRequest(); //Not IE
//receiveReq.overrideMimeType('text/xml; charset=ISO-8859-1');
}
else if(window.ActiveXObject)
{
receiveReq = new window.ActiveXObject("Microsoft.XMLHTTP"); //IE
}
else
{
alert("kein ajax!");
}
var ajax =
{
init: function(res,blend)
{
this.receiveReq = null;
this.resultObj = null;
this.blendObj = null;
this.time = 0;
this.ready = true;
if (window.XMLHttpRequest)
{
this.receiveReq = new window.XMLHttpRequest(); //Not IE
}
else if(window.ActiveXObject)
{
this.receiveReq = new window.ActiveXObject("Microsoft.XMLHTTP"); //IE
}
else
{
alert("kein ajax!");
}
this.resultObj = document.getElementById(res);
this.blendObj = document.getElementById(blend);
this.setOpacity(this.resultObj,0);
this.setOpacity(this.blendObj,100);
this.resultObj.style.display = "none";
this.blendObj.style.display = "block";
this.time = 40;
},
encodeUTF8: function (data)
{
var d = data.split("?");
if(d[1] != null)
{
var help = null;
var v = d[1].split("&");
data = d[0]+"?";
for(var loop = 0;loop < v.length;loop++)
{
if(loop != 0) data += "&";
help = v[loop].split("=");
data += help[0]+"="+encodeURIComponent(help[1]);
}
data += "&fuie="+Math.random();
}
else
{
data += "?fuie="+Math.random();
}
return data;
},
get: function (datei)
{
if(this.receiveReq)
{
if((this.receiveReq.readyState == 4 || this.receiveReq.readyState == 0) && this.ready)
{
if(datei == "chat.php")
{
this.resultObj.style.overflow = "hidden";
this.blendObj.style.overflow = "hidden";
}
else
{
this.resultObj.style.overflow = "auto";
this.blendObj.style.overflow = "auto";
}
if(check_login)resetAllVar();
datei = this.encodeUTF8(datei);
this.ready = false;
this.receiveReq.open("GET", "script/php/"+datei);
this.receiveReq.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; Charset=utf-8");
this.receiveReq.onreadystatechange = this.set;
this.receiveReq.send(null);
}
}
},
change: function ()
{
if(this.resultObj.style.display == "none")
{
window.setTimeout("ajax.blendObj.innerHTML='';'none';ajax.resultObj.style.display='block';ajax.blendObj.style.display='none';ajax.ready=true;",(this.time*11));
}
else
{
window.setTimeout("ajax.resultObj.innerHTML='';ajax.resultObj.style.display='none';ajax.blendObj.style.display='block';ajax.ready=true;",(this.time*11));
}
},
setOpacity: function (obj,opacity)
{
obj.style.KHTMLOpacity = opacity/100;
obj.style.MozOpacity = opacity/100;
obj.style.opacity = opacity/100;
},
set: function ()
{
if(ajax.receiveReq.readyState == 4)
{
var loop = 0;
ajax.change();
ajax.resultObj.style.display = "block";
ajax.blendObj.style.display = "block";
if(ajax.resultObj.style.opacity < ajax.blendObj.style.opacity)
{
for(;loop <= 10;loop++)
{
window.setTimeout("ajax.setOpacity(ajax.resultObj,"+(loop*10)+");ajax.setOpacity(ajax.blendObj,"+(100-(loop*10))+");",(ajax.time*loop));
}
ajax.resultObj.innerHTML = ajax.receiveReq.responseText;
}
else
{
for(;loop <= 10;loop++)
{
window.setTimeout("ajax.setOpacity(ajax.blendObj,"+(loop*10)+");ajax.setOpacity(ajax.resultObj,"+(100-(loop*10))+");",(ajax.time*loop));
}
ajax.blendObj.innerHTML = ajax.receiveReq.responseText;
}
hidden("loader");
}
else
{
visible("loader");
}
}
}; var button =
{
init: function()
{
this.code = "";
},
showPos: function(pos1,pos2,wert1,wert2)
{
this.obj = document.createElement("div");
document.body.appendChild(this.obj);
if(pos1 == "left")
{
this.obj.style.left = wert1+"px";
}
if(pos1 == "right")
{
this.obj.style.right = wert1+"px";
}
if(pos2 == "bottom")
{
this.obj.style.bottom = wert2+"px";
}
if(pos2 == "top")
{
this.obj.style.top = wert2+"px";
}
this.obj.style.position = "fixed";
this.obj.style.height = "118px";
this.obj.style.width = "150px";
this.obj.style.backgroundImage = "url(image/button_hintergrund/button_x_001.png)";
this.obj.style.backgroundColor = "transparent";
this.obj.style.border = "1px solid #CCCCCC";
},
hiddePos: function ()
{
document.body.removeChild(this.obj);
},
createCode: function(obj_id,style)
{
style == undefined ? this.str_style = "" : this.str_style = "style=\""+style+" overflow: hidden; font-size: 9px; height: 1px; width: 1px; text-align: center; color: #CCCCCC; font-family: Arial,Calibri,sans-serif; font-weight:normal;\"";
if(obj_id == "")
{
return this.code.replace("[style]",this.str_style);
}
else
{
document.getElementById(obj_id).value = this.code.replace("[style]",this.str_style);
}
},
replaceCode: function(obj_old_id,obj_new_id,style)
{
if(document.getElementById(obj_old_id).value != "")
{
document.getElementById(obj_new_id).value = document.getElementById(obj_old_id).value.replace("