function bookmark(url,caption){
	var ver = navigator.appName;
	var num = parseInt(navigator.appVersion);
	if ((ver == "Microsoft Internet Explorer")&&(num >= 4)) {
		window.external.AddFavorite(url,caption);
	}
}

function printWindow(){
   bV = parseInt(navigator.appVersion)
   if (bV >= 4) {
   		window.print();
   }	
}

function closeWindow(){
	window.close();
}
function closeWindowReload(){
	window.opener.location.reload();
	window.close();
}
function backWindow(){
	history.back();
}


function changeSheets_1(){
  if(document.styleSheets){
    var c = document.styleSheets.length;
    for(var i=0;i<c;i++){
	  if(document.styleSheets[i].href == '../_css/editframes_2.css'){
        document.styleSheets[i].disabled=true;
      }
	  if(document.styleSheets[i].href == '../_css/editframes_3.css'){
        document.styleSheets[i].disabled=true;
      }
	  if(document.styleSheets[i].href == '../_css/editframes.css'){
        document.styleSheets[i].disabled=false;
      }
    }
  }
}
function changeSheets_2(){
  if(document.styleSheets){
    var c = document.styleSheets.length;
    for(var i=0;i<c;i++){
	  if(document.styleSheets[i].href == '../_css/editframes_2.css'){
        document.styleSheets[i].disabled=false;
      }
	  if(document.styleSheets[i].href == '../_css/editframes_3.css'){
        document.styleSheets[i].disabled=true;
      }
	  if(document.styleSheets[i].href == '../_css/editframes.css'){
        document.styleSheets[i].disabled=true;
      }
    }
  }
}
function changeSheets_3(){
  if(document.styleSheets){
    var c = document.styleSheets.length;
    for(var i=0;i<c;i++){
	  if(document.styleSheets[i].href == '../_css/editframes_2.css'){
        document.styleSheets[i].disabled=true;
      }
	  if(document.styleSheets[i].href == '../_css/editframes_3.css'){
        document.styleSheets[i].disabled=false;
      }
	  if(document.styleSheets[i].href == '../_css/editframes.css'){
        document.styleSheets[i].disabled=true;
      }
    }
  }
}


function myFormSubmitSend() {
	ok = true;
	meldung = "Folgende Angaben stimmen noch nicht:\n\n";
	if (document.main.Name_Empfaenger.value == "") {
		ok = false;
		meldung = meldung + "Name Empfänger fehlt\n";
	}

	if (document.main.Email_Empfaenger.value == "" || document.main.Email_Empfaenger.value.indexOf('@') == -1 || document.main.Email_Empfaenger.value.indexOf('.') == -1) {
		ok = false;
		meldung = meldung + "E-mail Empfänger fehlt oder ist keine gültige E-mail Adresse\n";
	}

	if (document.main.Name_Sender.value == "") {
		ok = false;
		meldung = meldung + "Name Absender fehlt\n";
	}

	if (document.main.Email_Sender.value == "" || document.main.Email_Sender.value.indexOf('@') == -1 || document.main.Email_Sender.value.indexOf('.') == -1) {
		ok = false;
		meldung = meldung + "E-mail Absender fehlt oder ist keine gültige E-mail Adresse\n";
	}

	if (document.main.bemerkungen.value == "") {
		ok = false;
		meldung = meldung + "Bemerkungen fehlen\n";
	}

	
	
	if (ok) {
		document.main.submit();
	} else {
		meldung = meldung + "\nBitte korrigieren Sie die Angaben."
		alert(meldung);
	}
}

function myFormReset() {
	document.main.reset();
}

function openWindow(url,name,breite,hoehe,scrollbar) {
	newAnyWindow = window.open(url, name, "toolbar=no,menubar=no,statusbar=no,scrollbars=" + scrollbar + ",width=" + breite + ",height=" + hoehe);
	newAnyWindow.focus();	
}

