I'm not surprised the LED doesn't blink - the entirety of your logic in the loop() function is so bizarre as to elicit the question:
WTF?
Let's take a look at it line by line:
digitalWrite(13,val);
Set the LED to whatever valval is - valval starts as 0, so the LED is off.
while(!val);
While valval is not anything except 0, so while val is zero, do nothing. (The interrupt would escape you from this if your val was volatile)
val=0;
Set valval to 0.
So how can valval be anything except 0 when you do the digitalWrite?