function cOn(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.className="button2";
td.style.cursor="pointer";
}
}

function cOut(td){
if(document.getElementById||(document.all && !(document.getElementById))){
td.className="button";
td.style.cursor="pointer";
}
}

function stripa(aString)
{
  var newString = "";
  for (i=0; i<aString.length; i++)
    {
      if (aString.charAt(i) != ' ')
        {
          newString=newString+aString.charAt(i);
        }
    }
  return(newString);
}

function isEmpty ( inputValue ) {

        if ( inputValue == "null" || inputValue == "" )  {
                return true
        }
                return false
}

function isnotEmpty ( inputValue ) {

        if ( inputValue == "null" || inputValue == "" )  {
                return false
        }
                return true
}

function isNumeric ( inputValue ) {
        oneDecimal = false
        inputStr = inputValue.toString()
        for ( var i = 0 ; i < inputStr.length ; i++ ) {
                var oneChar = inputStr.charAt(i)
                if ( i == 0 && oneChar == "-" ) {
                        continue
                }
                if ( oneChar == "." && !oneDecimal ) {
                        oneDecimal = true
                        continue
                }
                if ( oneChar < "0" || oneChar > "9" ) {
                        return false
                }
        }
        return true
}

function ValidateAndSubmit()
{
if(isEmpty(document.kontakt.realname.value) || document.kontakt.realname.value == 'Nachname*' || document.kontakt.realname.value == 'Lastname*')
        {
                alert("Nachname/Lastname fehlt/is missing");
                document.kontakt.realname.value='';
                document.kontakt.realname.focus();
                return false;
        }

if(isEmpty(document.kontakt.email.value) || document.kontakt.email.value == 'Ihre E-Mail Adresse*' || document.kontakt.email.value == 'Your E-Mail*')
        {
                alert("E-Mail fehlt/is missing");
                document.kontakt.email.value='';
                document.kontakt.email.focus();
                return false;
        }
    else
        {
                var filter=/^.+@.+\..{2,3}$/
                var fv02=stripa(document.kontakt.email.value);
                if ((!filter.test(fv02)))
                {
                        document.kontakt.email.focus();
                        alert("E-Mail falsch/wrong");
                        return false;
                }
        }

if(isEmpty(document.kontakt.message.value) || document.kontakt.message.value=='Ihre Nachricht*' || document.kontakt.message.value=='Your message*')
        {
                alert("Nachricht/Message fehlt/is missing");
                document.kontakt.message.value='';
                document.kontakt.message.focus();
                return false;
        }
document.kontakt.submit();
}

which_image_loadeda = 0;
NUMBER_OF_IMAGESa = 34;

function start1a(direction) {
ImageNamesa = new Object();
ImageNamesa.length = NUMBER_OF_IMAGESa - 1;

for (countera = 0; countera < NUMBER_OF_IMAGESa; countera++){
    file_numbera = countera + 1;
    filenamea = ("img/gallery/IMG_" + file_numbera + ".jpg");
    ImageNamesa[countera] = filenamea;
}
changeImage1(-1)  ;
}

function start1b(direction) {
ImageNamesa = new Object();
ImageNamesa.length = NUMBER_OF_IMAGESa - 1;

for (countera = 0; countera < NUMBER_OF_IMAGESa; countera++){
    file_numbera = countera + 1;
    filenamea = ("img/gallery/IMG_" + file_numbera + ".jpg");
    ImageNamesa[countera] = filenamea;
}
changeImage1(1)  ;
}

function changeImage1(direction) {
    which_image_loadeda += direction;
    if (which_image_loadeda < 0)
        which_image_loadeda = NUMBER_OF_IMAGESa - 1;
    if (which_image_loadeda == NUMBER_OF_IMAGESa)
        which_image_loadeda = 0;
    if (document.images)
        document.myimage1.src = ImageNamesa[which_image_loadeda];
}
