function colourchange() {
 //	var bar = document.getElementByID('colourbar');
//	bar.style.backgroundColor='#65ABA8';
// document.getElementByID('navBar').style.borderRightColor='#65ABA8';

}

var MouseMoveEnabled=true;
// Kontakt Seite Javascript Mouseover //
function mouseOverKont(kont) {
	// create the object using chosen ID
	if(MouseMoveEnabled==true){
		document.getElementById('no_kont').style.display = "none";
		var kontS = kont + '_s';
		document.getElementById(kontS).style.backgroundColor = "#D5E4BC";
		document.getElementById(kont).style.display = "block";
		/*var tag = document.getElementById('kont_details').childNodes;
		//var tag = document.getElementsByTagName("div");
		for (var i=0;i<tag.length;i++) {
			alert(tag[i].id);
			//tag[i].style.display="none";
			if (tag[i].id=='kont_'.kont) {
				if (tag[i].id=='kont_'.kont) {
					alert(tag[i].id);
					//tag[i].style.display="block";
				}
			}
		}*/
	}
}
function mouseOutKont(kont) {
	if(MouseMoveEnabled==true){
		// Hide standard text
		document.getElementById(kont).style.display = "none";
		// Display chosen detail
		document.getElementById(kont).style.display = "none";
		var kontS = kont + '_s';
		document.getElementById(kontS).style.backgroundColor = "";
		document.getElementById('no_kont').style.display = "block";
	}
	
}
function mouseClickKont (kont){
	MouseMoveEnabled=false;
	// Hide default text
	document.getElementById('no_kont').style.display = "none";
	
	// Hide all other detailed Contacts. Not very elegant, but hey...
	var Xkontaks = new Array('1A','1B','1C','1D','2A','2B','2C','2D','3A','3B','3C','3D','4A','4B','5A','5B');
	for (var i=0;i<Xkontaks.length;i++) {
		var Xkont = Xkontaks[i];
		var XkontS = Xkont + '_s';
		document.getElementById(Xkont).style.display = "none";
		document.getElementById(XkontS).style.backgroundColor = "";
	}	
	var kontS = kont + '_s';
	document.getElementById(kontS).style.backgroundColor = "#D5E4BC";
	document.getElementById(kont).style.display = "block";
	
}
function PadDigits(n, totalDigits) { 
        n = n.toString(); 
        var pd = ''; 
        if (totalDigits > n.length) 
        { 
            for (i=0; i < (totalDigits-n.length); i++) 
            { 
                pd += '0'; 
            } 
        } 
        return pd + n.toString(); 
} 

function mailto(Name,E1,Domain)  {
Email=(E1 + '@' + Domain)	;
document.write('<A href="mailto:' + Email + '" title="Mailto: ' + Name + '">' + Email + '</a>' );
}
function versenden(subject) {
var url=new String(window.location);
subject = escape(subject);
var vershref="mailto:?subject="+subject+"&body="+url;
document.getElementById('versenden').href = vershref;
}

function Copy()  {
today = new Date()
CurrentYear = today.getYear();
if(CurrentYear < 2000) { CurrentYear = CurrentYear + 1900; }
document.write("&copy " + CurrentYear);
}

function prt_Date(Beschreibung)  {
today = new Date()
CurrentYear = today.getYear();
if(CurrentYear < 2000) { CurrentYear = CurrentYear + 1900; }
document.write(Beschreibung + " " + PadDigits(today.getDate(), 2) + "." + PadDigits((today.getMonth()+1), 2) + "." + CurrentYear + " " + PadDigits(today.getHours(), 2) + ":" + PadDigits(today.getMinutes(), 2));
}
function menu_goto( menuform )
{
    //var baseurl = "http://www.put-your-domain-name-here.com" ;
    selecteditem = menuform.newurl.selectedIndex ;
    newurl = menuform.newurl.options[ selecteditem ].value ;
    if (newurl.length != 0) {
      //location.href = baseurl + newurl ;
    }
}
function checkFormular(form) // Funktioniert nicht!!
{
valid = true;

var required= form.required.value ;
required = required.replace(" ","");
Arequired = required.split(",");

var compare= form.compare.value ;
compare = compare.replace(" ","");
compare = compare.split(",");

var warning_on_ID= form.warning_on_ID.value ;
warning_on_ID = warning_on_ID.replace(" ","");
warning_on_ID = warning_on_ID.split(",");

var warning_off_ID= form.warning_off_ID.value ;
warning_off_ID = warning_off_ID.replace(" ","");
warning_off_ID = warning_off_ID.split(",");

for(var i=0; i < required.length; i++)
	{
		
	var x = getElementsByTagName(required[i]);
	alert(x.value);
	if ( x.value == "" ) //&& document.getElementById(required[i])
    	{
			
		document.getElementById(required[i]).style.color = 'red';
		valid = false;
    	}
	else document.getElementById(required[i]).style.color = '';
	}

/*for(var i=0; i < form.compare.length; i++)
	{
	if ( form.compare[i].value != form.compare[i+1].value && document.getElementById(compare[i+1]))
    	{
		document.getElementById(compare[i+1]).style.color = 'red';
		valid = false;
    	}
	else document.getElementById(compare[i+1]).style.color = '';
	}
 */
 
 // also add thing to check that has email 'at'
 
 
 if ( valid == false )
	{
	 	document.getElementById('pflicht_1').style.display = 'none';
		document.getElementById('pflicht_2').style.color = 'red';
		document.getElementById('pflicht_2').style.display = 'block';
		document.getElementById('ueberprufen').style.color = 'red';
		document.getElementById('ueberprufen').style.display = 'block';
	}
 if (valid == true) {
	 	//form.submit();
    }
}
