// JavaScript Document
var imgCheck = true;

function resizeNewsimg(){
	var NS = (navigator.appName=="Netscape")?true:false;
	var newsImg = document.getElementById('news_img');
	
    var img = new Image();
    img.src = newsImg.src;
    
    var width = img.width;
    var height = img.height;
	
	var normal = 150 / 230 ;
	
	var orignal = height / width;
	
	
    if(normal > orignal){
        if(NS){
            newsImg.width = 230;
            newsImg.height = (230 /width)*height;
        }else{
           newsImg.style.width = 230;
           newsImg.style.height = (230/width)*height;
        }
		
    }else{
        if(NS){
            newsImg.height = 150;
            newsImg.width = (150/height)*width;
        }else{
            newsImg.style.height = 150;
            newsImg.style.width = (150/height )*width;
        }
    }
}

function doThis(){
	window.setTimeout("resizeNewsimg()",3000);
}

function resizeLifeimg(){
    var NS = (navigator.appName=="Netscape")?true:false;
    var lifeImg = "";
    for ( var i = 1; i < 3; i++ ) {
        
        if ( document.getElementById("life_img"+i) ) {
            lifeImg = document.getElementById("life_img"+i);
            var img = new Image();
            img.src = lifeImg.src;
    
            var width = img.width;
            var height = img.height;
	
            var normal = 317 / 450 ;
	
            var orignal = height / width;
	
            if(normal > orignal){
                if(NS){
                    lifeImg.width = 450;
                    lifeImg.height = (450 /width)*height;
                }else{
                    lifeImg.style.width = 450;
                    lifeImg.style.height = (450/width)*height;
                }
		
            }else{
                if(NS){
                    lifeImg.height = 317;
                    lifeImg.width = (317/height)*width;
                }else{
                    lifeImg.style.height = 317;
                    lifeImg.style.width = (317/height )*width;
                }
            }
        }
    }
}
