
function ALVFRAMEWORK(){
this.checkEmail = function(email){
var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

//valid email address
if (filter.test(email)) return true;

//no valid email address
return false;
}

this.createXMLHttpRequest = function(){
var ua;

// Mozilla, Opera, Safari sowie Internet Explorer 7
if (typeof XMLHttpRequest != 'undefined') {
ua = new XMLHttpRequest();
}

if (!ua) {
// Internet Explorer 6 und älter
try {
ua  = new ActiveXObject("Msxml2.XMLHTTP.3.0");
}
catch(e) {
try {
ua  = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e) {
ua  = null;
}
}
}
return ua;
}

this.req = null;

this.doXMLHttpRequest = function (reqURL,callback){
this.req = this.createXMLHttpRequest();

this.req.open('GET', reqURL);
this.req.onreadystatechange = callback;
this.req.send(null);
}

this.trim = function(zeichenkette) {
// Erst führende, dann Abschließende Whitespaces entfernen
// und das Ergebnis dieser Operationen zurückliefern
return zeichenkette.replace (/^\s+/, '').replace (/\s+$/, '');
}

this.setCookie = function(key, value){
document.cookie = key + "=" + value + ";";
}


this.get_url_param=function(name){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if ( results == null )
return "";
return results[1];
}

this.getCookieValue = function(keyindex){
var allcookies = document.cookie;
// Get all the cookies pairs in an array
cookiearray  = allcookies.split(';');

// Now take key value pair out of this array
for(var i=0; i<cookiearray.length; i++){
keyname = cookiearray[i].split('=')[0];
keyvalue = cookiearray[i].split('=')[1];
if (keyname.toString().replace (/^\s+/, '').replace (/\s+$/, '')==keyindex.toString().replace (/^\s+/, '').replace (/\s+$/, '')){return keyvalue;}
}
return "";
}

this.generatePassword = function(length){
        if(trim(length)!="" && parseInt(length)!=0){
                conso = new Array("b","c","d","f","g","h","j","k","l","m","n","p",
                "r","s","t","v","w","x","y","z");
                vocal = new Array("a","e","i","o","u");
                var password = '';

                for(i=0; i < length; i++)
                {
                        var c = Math.ceil(Math.random() * 1000) % 20;
                        var v = Math.ceil(Math.random() * 1000) % 5;
                        password += conso[c] + vocal[v];
                }
                return password;
                //document.getElementById('randPWMessage').innerHTML ="<span style='color:#000000;'>Ihr neues Passwort lautet: " + password + "</span>";
                //document.getElementById('tomd5').value=password;
        }else{
            return "";
                //document.getElementById('randPWMessage').innerHTML="<span style='color:#ff0000;'>Ihre Angabe zur Länge des zu generierenden Passwortes war nicht korrekt. Bitte versuchen Sie es erneut.</span>";
        }
}
}

function clickTracker( wert ) {
    ET_Event.click( wert, '');
}
function ALVFRAMEWORK(){
this.checkEmail = function(email){
var filter  = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;

//valid email address
if (filter.test(email)) return true;

//no valid email address
return false;
}

this.createXMLHttpRequest = function(){
var ua;

// Mozilla, Opera, Safari sowie Internet Explorer 7
if (typeof XMLHttpRequest != 'undefined') {
ua = new XMLHttpRequest();
}

if (!ua) {
// Internet Explorer 6 und älter
try {
ua  = new ActiveXObject("Msxml2.XMLHTTP.3.0");
}
catch(e) {
try {
ua  = new ActiveXObject("Microsoft.XMLHTTP");
}
catch(e) {
ua  = null;
}
}
}
return ua;
}

this.req = null;

this.doXMLHttpRequest = function (reqURL,callback){
this.req = this.createXMLHttpRequest();

this.req.open('GET', reqURL);
this.req.onreadystatechange = callback;
this.req.send(null);
}

this.trim = function(zeichenkette) {
// Erst führende, dann Abschließende Whitespaces entfernen
// und das Ergebnis dieser Operationen zurückliefern
return zeichenkette.replace (/^\s+/, '').replace (/\s+$/, '');
}

this.setCookie = function(key, value){
document.cookie = key + "=" + value + ";";
}


this.get_url_param=function(name){
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");

var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if ( results == null )
return "";
return results[1];
}

this.getCookieValue = function(keyindex){
var allcookies = document.cookie;
// Get all the cookies pairs in an array
cookiearray  = allcookies.split(';');

// Now take key value pair out of this array
for(var i=0; i<cookiearray.length; i++){
keyname = cookiearray[i].split('=')[0];
keyvalue = cookiearray[i].split('=')[1];
if (keyname.toString().replace (/^\s+/, '').replace (/\s+$/, '')==keyindex.toString().replace (/^\s+/, '').replace (/\s+$/, '')){return keyvalue;}
}
return "";
}

this.generatePassword = function(length){
        if(trim(length)!="" && parseInt(length)!=0){
                conso = new Array("b","c","d","f","g","h","j","k","l","m","n","p",
                "r","s","t","v","w","x","y","z");
                vocal = new Array("a","e","i","o","u");
                var password = '';

                for(i=0; i < length; i++)
                {
                        var c = Math.ceil(Math.random() * 1000) % 20;
                        var v = Math.ceil(Math.random() * 1000) % 5;
                        password += conso[c] + vocal[v];
                }
                return password;
                //document.getElementById('randPWMessage').innerHTML ="<span style='color:#000000;'>Ihr neues Passwort lautet: " + password + "</span>";
                //document.getElementById('tomd5').value=password;
        }else{
            return "";
                //document.getElementById('randPWMessage').innerHTML="<span style='color:#ff0000;'>Ihre Angabe zur Länge des zu generierenden Passwortes war nicht korrekt. Bitte versuchen Sie es erneut.</span>";
        }
}
}

function clickTracker( wert ) {
    //ET_Event.click( wert, '');
}
