function rollover(which,pic) {
		document.images[which].src = "pics/" + pic + ".gif";
}


function scroll() {
		window.scrollBy(0, 150);
}

function checkWindowSize() {
	if (self.innerHeight) {
		height = self.innerHeight;
	} else {
		height = document.body.offsetHeight
	}
	if (height < 700) {
		scroll();
	}
}

// Removes leading whitespaces
function LTrim( value ) {
	
	var re = /\s*((\S+\s*)*)/;
	return value.replace(re, "$1");
	
}

// Removes ending whitespaces
function RTrim( value ) {
	
	var re = /((\s*\S+)*)\s*/;
	return value.replace(re, "$1");
	
}

// Removes leading and ending whitespaces
function trim( value ) {
	
	return LTrim(RTrim(value));
	
}

function checkEmail (theAddress) {
	if (theAddress.search (/^[a-zA-Z0-9_\-\.äöüÄÖÜ]{2,}@[a-zA-Z0-9_\-\.äöüÄÖÜ]{2,}\.\D{2,4}$/) == -1) {
		return false;
	}
	return true;
}  