// Resizes the iFrame it resides in
function getY( oElement )
{
var iReturnValue = 0;
while( oElement != null ) {
iReturnValue += oElement.offsetTop;
oElement = oElement.offsetParent;
}

return iReturnValue;

}
function onLoaded()
{
var posY =  getY(top.document.getElementById("theFrame"));
var pos = posY +  document.body.clientHeight + 40;
if(pos < top.window.innerHeight){
top.document.getElementById("theFrame").height = document.body.clientHeight + 40;}
else{
top.document.getElementById("theFrame").height = top.window.innerHeight - 50 - posY; 
}
}

//resizes a picture to the size of the screen
function pictureHeight()
{
document.getElementById("thePicture").height = screen.availHeight - 105;
}
