function createUrl(that){
  var string = that.value;

  if(string.length == 0) {
    return '';
  }

  var index = 0;
  var anArray = new Array(2);
  anArray[0] = new Array("Ö", "ö", "Ä", "ä", "Ü", "ü", "ß", " ");
  anArray[1] = new Array("Oe", "oe", "Ae", "ae", "Ue", "ue", "ss", "-");
  for (var i=0; i<anArray[0].length; i++){
    myRegExp = new RegExp(anArray[index][i],"g");
    string = string.replace(myRegExp, anArray[(index==0?1:0)][i]);
  }
  if(string.substr(0,1) != '/') {
    string = '/'+string;
  }

  string = string.replace("--", "-");

  $('#url').val(string);
  $('#preview').html(string);
}



function displayCMSFields(that) {
  switch(that.options[that.selectedIndex].value) {
    case 'cms___GetCMSRecord':
      $('#contentField').show();
      break;
    default :
      $('#contentField').hide();
  }
}


function confirmDelete(delUrl) {
  if (confirm("Möchten Sie den Eintrag wirklich löschen?")) {
    document.location = delUrl;
  }
}
function confirmMessage(thaturl,thatmessage) {
  if (confirm(thatmessage)) {
    document.location = thaturl;
  }
}

