trouble with simple IF...ELSE

Moving 'pinstate' outside of the 'BlinkLED13' function would do pretty much the same thing.

int pinstate;

void BlinkLED13()
{
    // blinks LED 13
    if ( pinstate == 0 ) 
    {
        digitalWrite(ledPin, pinstate);
        pinstate = 1;  
        delay(100);
    } 
    else
    {
        digitalWrite(ledPin, pinstate);
        pinstate = 0; 
        delay(100);
    }
}

When pins are set as OUTPUT 'digitalWrite' tracks the last value written to it which can then be read with 'digitalRead'. Combining this with the '!' not operator will allow your code to be simplified as -

void BlinkLED13()
{
    // blinks LED 13
    digitalWrite(ledPin, ! digitalWrite(ledPin));
    delay(100);
}

I do find your choice of the function name, 'BlinkLED13', to be somewhat misleading as it simply changes the LED to it's opposite state.