<!--
//

function centerPopup(popup_name,popup_url,popup_width,popup_height,scrolls, menubars, myWidth, myHeight,reqURL)
{
	if(!myWidth) {myWidth = 10;}
	if(!myHeight){myHeight = 50;}
	if(!scrolls){scrolls = 'no';}
	if(!menubars){menubars = 'no';}
	var popup_left = (window.screen.width/2)  - (popup_width/2 + myWidth);
	var popup_top  = (window.screen.height/2) - (popup_height/2 + myHeight);
	var fenster = window.open(popup_url ,popup_name,"toolbar=no,location=no,status=no,menubar=" + menubars + ",scrollbars=" + scrolls + ",resizable=no,width=" + popup_width + ",height=" + popup_height + ",left=" + popup_left + ",top=" + popup_top + ",screenX=" + popup_left + ",screenY=" + popup_top);
	fenster.focus();
}

function resetSearchValue(object, serachValue){

if (object.value==''){
object.value=serachValue;
}

}

function get_url (url, k0 ,v0 ,k1 ,v1 ,k2 ,v2 ,k3 ,v3 ,k4 ,v4 ) 
{
  if (k0 && v0) url += "?" + k0 + "=" + escape(v0);
  if (k1 && v1) url += "&" + k1 + "=" + escape(v1);
  if (k2 && v2) url += "&" + k2 + "=" + escape(v2);
  if (k3 && v3) url += "&" + k3 + "=" + escape(v3);
  if (k4 && v4) url += "&" + k4 + "=" + escape(v4);
  return url;
}

function open_function(url,width,height,options)
  {
    self.msgWindow = open(url, "Window", "width=" + width + ",height=" + height
      + ",screenX=" + (screen.width-width)/2
      + ",screenY=" + (screen.height-height)/2
      + ",dependent=yes"
      + ",left=" + (screen.width-width)/2
      + ",top=" + (screen.height-height)/2
      + options
      );
    if (self.msgWindow) {
      self.msgWindow.focus();
      if (self.msgWindow.opener == null) self.msgWindow.opener = self;
    }
  }

var myimages=new Array();
function preloadimages()
{
for (i=0;i<preloadimages.arguments.length;i++)
{
myimages[i]=new Image()
myimages[i].src='../common/'+preloadimages.arguments[i]+'.gif'}
}

preloadimages("gsub_background.gif","gsub_slogan.gif","gsub_logo.gif","gsub_subnavActive.gif","gsub_subnavInactive.gif","gsub_subsubnavActive.gif","gsub_subsubsubnavActive.gif");

window.onerror = null;
layerRef='document.getElementById(';
propertyRef=').style.display';
expand="block";
shrink="none";

function doProduct(groupName,objNum,productTotal) {
	layerName = groupName + "Product" + objNum;
	titleName = "title" + objNum;
	var productState = eval(layerRef + '"' + layerName + '"' + propertyRef);
		if (productState != expand) {
			for (i=1;i<=productTotal;i++) {
				layerOffName = groupName + "Product" + i;
				eval(layerRef + '"' + layerOffName + '"' + propertyRef + '="'+shrink+'"');
				eval('document.getElementById("title' + i + '").style.color' + '="#2b62ae"');
				eval('document.getElementById("title' + i + '").style.backgroundColor ' + '="#fafbfd"');
			}
			eval(layerRef + '"' + layerName + '"' + propertyRef + '="'+expand+'"');
			eval('document.getElementById("' + titleName + '").style.color' + '="#000000"');
			eval('document.getElementById("' + titleName + '").style.backgroundColor ' + '="#f4f8fb"');
		} else {
			eval(layerRef + '"' + layerName + '"' + propertyRef + '="'+shrink+'"');
			eval('document.getElementById("' + titleName + '").style.color' + '="#2b62ae"');
			eval('document.getElementById("' + titleName + '").style.backgroundColor ' + '="#fafbfd"');
		}
	}

function showParticipants(me) {
	if (document.getElementById(me).style.display =='none' || document.getElementById(me).style.display ==''){
		document.getElementById(me).style.display ='block';
		document.getElementById('teilnehmerhref').style.color ='black';
		void(0);
	} else {
		document.getElementById(me).style.display ='none';
		document.getElementById('teilnehmerhref').style.color ='#2b62ae';
		void(0);
	}
}


/* Validation Functions */

function disallowBlnk(el, error_message) {
	if (el.value.length==0) {
		document.getElementById('message').innerHTML = error_message;
		// showError ();
		document.getElementById('message').className='error';
		el.select();
		el.focus();
		return false;
	} else {
	return true;
	}
}

<!-- V1.1.3: Sandeep V. Tamhankar (stamhankar@hotmail.com) -->
<!-- Original:  Sandeep V. Tamhankar (stamhankar@hotmail.com) -->
function isEmailValid (emailStr,msgTitle) {

	/* The following variable tells the rest of the function whether or not
	to verify that the address ends in a two-letter country or well-known
	TLD.  1 means check it, 0 means don't. */
	var checkTLD=1;

	/* The following is the list of known TLDs that an e-mail address must end with. */
	var knownDomsPat=/^(de|com)$/;

	/* The following pattern is used to check if the entered e-mail address
	fits the user@domain format.  It also is used to separate the username
	from the domain. */
	var emailPat=/^(.+)@(.+)$/;

	/* The following string represents the pattern for matching all special
	characters.  We don't want to allow special characters in the address. 
	These characters include ( ) < > @ , ; : \ " . [ ] */
	var specialChars="\\(\\)><@,;:\\\\\\\"\\.\\[\\]";

	/* The following string represents the range of characters allowed in a 
	username or domainname.  It really states which chars aren't allowed.*/
	var validChars="\[^\\s" + specialChars + "\]";

	/* The following pattern applies if the "user" is a quoted string (in
	which case, there are no rules about which characters are allowed
	and which aren't; anything goes).  E.g. "jiminy cricket"@disney.com
	is a legal e-mail address. */
	var quotedUser="(\"[^\"]*\")";

	/* The following pattern applies for domains that are IP addresses,
	rather than symbolic names.  E.g. joe@[123.124.233.4] is a legal
	e-mail address. NOTE: The square brackets are required. */
	var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/;

	/* The following string represents an atom (basically a series of non-special characters.) */
	var atom=validChars + '+';

	/* The following string represents one word in the typical username.
	For example, in john.doe@somewhere.com, john and doe are words.
	Basically, a word is either an atom or quoted string. */
	var word="(" + atom + "|" + quotedUser + ")";

	// The following pattern describes the structure of the user
	var userPat=new RegExp("^" + word + "(\\." + word + ")*$");

	/* The following pattern describes the structure of a normal symbolic
	domain, as opposed to ipDomainPat, shown above. */
	var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$");

	/* Finally, let's start trying to figure out if the supplied address is valid. */

	/* Begin with the coarse pattern to simply break up user@domain into
	different pieces that are easy to analyze. */

	var matchArray=emailStr.value.match(emailPat);
	if (matchArray==null) {
		/* Too many/few @'s or something; basically, this address doesn't
		even fit the general mould of a valid e-mail address. */
		document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
		document.getElementById('message').className='error';
		emailStr.select();
		emailStr.focus();
		return false;
	}
	var user=matchArray[1];
	var domain=matchArray[2];

	// Start by checking that only basic ASCII characters are in the strings (0-127).
	for (i=0; i<user.length; i++) {
		if (user.charCodeAt(i)>127) {
			document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
			document.getElementById('message').className='error';
			emailStr.select();
			emailStr.focus();
			return false;
		}
	}
	for (i=0; i<domain.length; i++) {
		if (domain.charCodeAt(i)>127) {
			document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
			document.getElementById('message').className='error';
			emailStr.select();
			emailStr.focus();
			return false;
		}
	}

	// See if "user" is valid 
	if (user.match(userPat)==null) {
		// user is not valid
		document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
		document.getElementById('message').className='error';
		emailStr.select();
		emailStr.focus();
		return false;
	}

	/* if the e-mail address is at an IP address (as opposed to a symbolic
	host name) make sure the IP address is valid. */
	var IPArray=domain.match(ipDomainPat);
	if (IPArray!=null) {
		// this is an IP address
		for (var i=1;i<=4;i++) {
			if (IPArray[i]>255) {
				document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
				document.getElementById('message').className='error';
				emailStr.select();
				emailStr.focus();
				return false;
	   		}
		}
		return true;
	}

	// Domain is symbolic name.  Check if it's valid.
	var atomPat=new RegExp("^" + atom + "$");
	var domArr=domain.split(".");
	var len=domArr.length;
	for (i=0;i<len;i++) {
		if (domArr[i].search(atomPat)==-1) {
			document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
			document.getElementById('message').className='error';
			emailStr.select();
			emailStr.focus();
			return false;
		}
	}

	/* domain name seems valid, but now make sure that it ends in a
	known top-level domain (like com, edu, gov) or a two-letter word,
	representing country (uk, nl), and that there's a hostname preceding 
	the domain or country. */

//	if (checkTLD && domArr[domArr.length-1].length!=2 && 
//	domArr[domArr.length-1].search(knownDomsPat)==-1) {
	if (checkTLD && domArr[domArr.length-1].search(knownDomsPat)==-1) {
		document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
		document.getElementById('message').className='error';
		emailStr.select();
		emailStr.focus();
		return false;
	}

	// Make sure there's a host name preceding the domain.

	if (len<2) {
		document.getElementById('message').innerHTML = msgTitle+"Sie m&uuml;ssen eine g&uuml;ltige Email Adresse eingeben!";
		document.getElementById('message').className='error';
		emailStr.select();
		emailStr.focus();
		return false;
	}

	// If we've gotten this far, everything's valid!
	return true;
}


function fmSubmit(fm) {
	if (fm.action.value == 'register') {
		return disallowBlnk(fm.register_username, 'Registrierung: Bitte geben Sie Ihre E-Mail-Adresse ein.') && disallowBlnk(fm.register_password, 'Registrierung: Bitte geben Sie Ihr gew&uuml;nschtes Passwort ein.') && isEmailValid(fm.register_username, 'Registrierung: ');
	} else if  (fm.action.value == 'login') {
		return disallowBlnk(fm.ac_name, 'Login: Bitte geben Sie Ihre E-Mail-Adresse ein.') && disallowBlnk(fm.login_pass, 'Login: Bitte geben Sie Ihr Passwort ein.') && isEmailValid(fm.ac_name, 'Login: ');
	} else if  (fm.action.value == 'password_forgotten') {
		return disallowBlnk(fm.email1, 'Passwort vergessen: Bitte geben Sie Ihre E-Mail-Adresse ein.') && isEmailValid(fm.email1, 'Passwort vergessen: ');
	} else {
	return false;
	}
}

// -->
