Ok. no one was helping me(*SOB*) so I figured it out by myself
ON YOUR SKIN FILE (.ascx)
<Img src="" id="SwapThisImage">
<script language="JavaScript">
<!--
//Where is the image folder?
var SkinImgPath = '/Portals/_default/Skins/MySuperBlueSkin/Images/';
// get root tabid
var AncestorID = <%= PortalSettings.ActiveTab.ParentId %>;
// if the tab is root tab, it will return "-1" as tabid, we don't want that - just get a current tabid.
if(AncestorID==-1){
AncestorID = <%= PortalSettings.ActiveTab.TabID %>;
}
//dump the ancestorID to imageswapper function
ImageSwapper(AncestorID);
function ImageSwapper(AncestorID){
var ImgName ="Default.jpg"
switch(AncestorID)
{
case 23: // Tabid for tab "Play"
ImgName = "Kids.jpg";
break;
case 24: // Tabid for tab "yummy"
ImgName = "Fruits.jpg";
break;
default:
ImgName = "Default.jpg";
}
//swap image
document.getElementById('SwapThisImage').src = SkinImgPath+ImgName';
}
//-->
</script>
I don't like the inside of switch statement. it's not dynamic solution but I can live with it.