function noemailspam(dmain,adrs,nme,clss) {      	
    var first = 'ma';
    var second = 'il';
    var third = 'to:';
    
    ausgabe = '<a href="';
    ausgabe = ausgabe+first+second+third;
    ausgabe = ausgabe+adrs+'&#64'+dmain;
    ausgabe = ausgabe+'">';
    
    // Check: Insert Style-Class? PART 1
    if(clss != ''){
        ausgabe = ausgabe+'<span class="'+clss+'">';    
    }
    
    // ### Check: Show E-Mail or Name? ###
    if(nme != ''){
        ausgabe = ausgabe+nme;
    } else {
        ausgabe = ausgabe+adrs+'&#64'+dmain;
    }    
    
    // Check: Insert Style-Class? PART 2
    if(clss != ''){
        ausgabe = ausgabe+'</span>';
    }
    
    // ### FINISH IT ###    
    ausgabe = ausgabe+'<\/a>';
    document.write(ausgabe);
}     


function CheckLen(Target) {
  StrLen = Target.value.length
  if (StrLen == 1 && Target.value.substring(0,1) == " ") {
    Target.value = ""
    StrLen = 0
  }
  if (StrLen > 160 ) {
    Target.value = Target.value.substring(0,160)
    CharsLeft = 0
  } else {
    CharsLeft = 160 - StrLen
  }
  document.form_schnellkontakt.anzahl.value = CharsLeft
}

function chkcomment_form(){
   
   fehlermeldung = "";

    if (document.comment_form.form_email.value != ""){
      if(document.comment_form.form_email.value.indexOf('@') == -1){
        alert("Your email adress does not seem to be correct");
        document.comment_form.form_email.style.borderColor='ff0000';
    	document.comment_form.form_email.style.borderStyle='dotted';
    	document.comment_form.form_email.focus();
        return false;
      }
      if(document.comment_form.form_email.value.indexOf('.') == -1){
        alert("Your email adress does not seem to be correct");
        document.comment_form.form_email.style.borderColor='ff0000';
    	document.comment_form.form_email.style.borderStyle='dotted';
    	document.comment_form.form_email.focus();
        return false;
      }
    }
    
    if (document.comment_form.form_homepage.value != ""){
    	if(document.comment_form.form_homepage.value.indexOf('http://') == -1 && document.comment_form.form_homepage.value.indexOf('www.') == -1){
	        alert("Your homepage adress does not seem to be correct");
	        document.comment_form.form_homepage.style.borderColor='ff0000';
	    	document.comment_form.form_homepage.style.borderStyle='dotted';
	    	document.comment_form.form_homepage.focus();
	        return false;
      	}
    
    
    }    	
    
    
    if(document.comment_form.form_email.value == ""){  
       fehlermeldung = "Please enter your email adress for possible contact purpose. Your email will not be published nor be given to others";
       feld = "document.comment_form.form_email";
    }
    
    if(document.comment_form.form_name.value == ""){  
       fehlermeldung = "Please enter your name";
       feld = "document.comment_form.form_name";
    }

    if(document.comment_form.form_comment.value == ""){  
       fehlermeldung = "Please enter your comment";
       feld = "document.comment_form.form_comment";
    }
    
    if (fehlermeldung != "")
    	{alert (fehlermeldung);
    	 feld_dom=eval(feld);
    	 fehlermeldung = "";
    	 feld_dom.focus();
    	 feld_dom.style.borderColor='ff0000';
    	 feld_dom.style.borderStyle='dotted';
    	 return false;
    }


}


var myEffects = {
  fade: function(elid) {
	var opacs = ["0",".1",".2",".3",".4",".5",".6",".7",".8",".9","1"];
	var backopacs = ["1",".9",".8",".7",".6",".5",".4",".3",".2",".1","0"];
		document.getElementById(elid).style.opacity = '0';

		for (var i = 0; i < 11; i++){
			setTimeout('document.getElementById(\''+elid+'\').style.opacity = "'+opacs[i]+'";', i * 120);
		}
		for (var i = 0; i < 11; i++){
			setTimeout('document.getElementById(\''+elid+'\').style.opacity = "'+backopacs[i]+'";', i * 40);
		}
		for (var i = 0; i < 11; i++){
			setTimeout('document.getElementById(\''+elid+'\').style.opacity = "'+opacs[i]+'";', i * 20);
		}

	}
}


function hide_show_Layer(myid){
	if(this.blur) this.blur();
	thisElem = document.getElementById(myid);
	
	if (thisElem.style.display != 'block'){
		thisElem.style.display = 'block';
	} else {
		thisElem.style.display = 'none';
	}
}
function hide(myid){
	thisElem = document.getElementById(myid);
	thisElem.style.display = 'none';
}

function show(myid){
	thisElem = document.getElementById(myid);
	thisElem.style.display = 'block';
}
function make_bold_tu(){
	thisElem = document.getElementById('link_gruppenboerse_tu');
	thisElem.style.fontWeight = 'bold';
	thisElem.style.fontSize = '14px';
	thisElem.blur();
	
	otherElem = document.getElementById('link_gruppenboerse_htw');
	otherElem.style.fontWeight = 'normal';
	otherElem.style.fontSize = '11px';
}
function make_bold_htw(){
	thisElem = document.getElementById('link_gruppenboerse_htw');
	thisElem.style.fontWeight = 'bold';
	thisElem.style.fontSize = '14px';
	thisElem.blur();
		
	otherElem = document.getElementById('link_gruppenboerse_tu');
	otherElem.style.fontWeight = 'normal';
	otherElem.style.fontSize = '11px';
}
