The following code is in a file called Dog_features.ht m

Code:
document.getElementById('MyDiv').innerHTML = "<iframe src='Dog_Page1.htm'></iframe>";
Is there a way to replace the word Dog in the code with a variable which resolves to the first word in the page's file name? e.g.

Code:
document.getElementById('MyDiv').innerHTML = "<iframe src='Animal_Page1.htm'></iframe>";
...