function url()
{
  if ((location.host == "www.cambridgecourt.de")  || (location.host == "www.cambridge-court.com"))
  	{
  window.location.href="http://www.cambridge-court.de/";
  	}
}
  url();


  if (parent.frames.length>=1) {
	window.top.location.href="index.htm";
}

function Bild_On(BildName,BildImgSrc) {
	if(parent.document.images) {
		parent.document.images[BildName].src=BildImgSrc;
	}
}
function sendmail(to) {		// Uebergabe der Mailadresse an das Formular
	document.forms.courtpost.postzu.value = to;
	document.forms.courtpost.submit();
}
function CheckLen(Target) {	// Pruefung der Eingabemenge im Textfeld
    StrLen = Target.value.length
    if (StrLen == 1 && Target.value.substring(0,1) == " ") {
            Target.value = ""
            StrLen = 0}
    if (StrLen > 1234 ) {
    	Target.value = Target.value.substring(0,1200)
    	alert("\t\tCambridge-Court.de \n\nVielen Dank! \nDas Ende ist erreicht. \nBitte jetzt noch zu Ende schreiben, \nmit restlich [ 33 ] Zeichen.");
    	CharsLeft = 0}
    else {
    CharsLeft = 1234 - StrLen}
    document.courtpost.Anzahl.value = CharsLeft
}
function ResetCheck () {	// Abfrage bei Reset im Formular
  var chk = window.confirm("Alle Eingaben loeschen?");
  return (chk);
}
function setPointer(theRow, thePointerColor) { // Farbwechsel im <tr> einer Tabelle
	if(thePointerColor == '' || typeof(theRow.style) == 'undefined') {
		return false;
	}
	if(typeof(document.getElementsByTagName) != 'undefined') {
		var theCells = theRow.getElementsByTagName('td');
	} else if(typeof(theRow.cells) != 'undefined') {
		var theCells = theRow.cells;
	} else {
		return false;
	}
	var rowCellsCnt  = theCells.length;
	for(var c = 0; c < rowCellsCnt; c++) {
		theCells[c].style.backgroundColor = thePointerColor;
	}
	return true;
}
