function GetElement(sElementName){
	var oElement;
	
	if(document.getElementById){
		oElement = document.getElementById(sElementName);
	}
	else if(document.all){
		oElement = document.all(sElementName);
	}
	else
		return null;
		
	return oElement;	
}

//function fyrir ævsöfn sem skiptir um mynd á gengisþróunar charti

function ChangeGengisThrounChart(oIcon, nTimabil, sImgName){
	var oChart6Man	= GetElement("GengisThroun6Man");
	var oChart12Man = GetElement("GengisThroun12Man");
	var oChart60Man	= GetElement("GengisThroun60Man");
	var oStartImage = GetElement("img12M");
	
	if(oIcon && oChart6Man && oChart12Man && oChart60Man){
		if(nTimabil == 6){
			oChart6Man.style.display = "";
			oChart12Man.style.display = "none";
			oChart60Man.style.display = "none";
		}
		else if(nTimabil == 12){
			oChart6Man.style.display = "none";
			oChart12Man.style.display = "";
			oChart60Man.style.display = "none";
		}
		else if(nTimabil == 60){
			oChart6Man.style.display = "none";
			oChart12Man.style.display = "none";
			oChart60Man.style.display = "";
		}
	}
}
