var resizeTimer=null;$(window).bind('resize',function(){if(resizeTimer)clearTimeout(resizeTimer);resizeTimer=setTimeout(updateImageDimensions,100);});function findPageHeight(){if(typeof window.innerHeight!='undefined'){return window.innerHeight;}
if(document.documentElement&&typeof
document.documentElement.clientWidth!='undefined'&&document.documentElement.clientHeight!=0){return document.documentElement.clientHeight;}
if(document.body&&typeof document.body.clientWidth!='undefined'){return document.body.clientHeight;}
return(null);}
function updateImageDimensions(){imgWidth=$('#source_image').width();imgHeight=$('#source_image').height();bodyWidth=document.body.clientWidth;bodyHeight=findPageHeight();if(bodyHeight>=imgHeight)
{$('#source_image').css({'height':bodyHeight+'px'});$('#source_image').css({'width':'auto'});}
if(bodyWidth>imgWidth)
{$('#source_image').css({'width':'100%'});$('#source_image').css({'height':'auto'});}
else if(bodyWidth<imgWidth)
{$('#source_image').css({'height':bodyHeight+'px'});$('#source_image').css({'width':'auto'});}}
window.onload=function()
{$('#source_image').css({'width':'auto'});var windowheight=$(window).height();$('#source_image').css({'height':windowheight+'px'});updateImageDimensions();};
