/*
	firdom() version 1.1 (24.11.2003)
	written by Chris Heilmann (http://www.onlinetools.org)
	http://alistapart.com/articles/javascriptreplacement
*/

replaceImages = new Array(
'Welcome|/images/h_imgs/welcome.gif',
'Iowa Treasury News|/images/h_imgs/treasury_news.gif',
'The Great Iowa Treasure Hunt|/images/h_imgs/gith.gif',
'College Savings Iowa|/images/h_imgs/college_savings.gif',
'The Treasurers Office|/images/h_imgs/the_treasurers_office.gif',
'Meet Michael L. Fitzgerald|/images/h_imgs/meet_michael_fitzgerald.gif',
'Our Responsibilities|/images/h_imgs/our_responsibilities.gif',
'Current News|/images/h_imgs/current_news.gif',
'Education|/images/h_imgs/education.gif',
'Save for America|/images/h_imgs/save_for_america.gif',
'Credit Card Education|/images/h_imgs/credit_card_education.gif',
'Credit Card Education for High School Students|/images/h_imgs/ccedu_highschool.gif',
'Prepare for the Basics Campaign|/images/h_imgs/prepare_for_the_basics.gif',
'Unclaimed Property and the Great Iowa Treasure Hunt|/images/h_imgs/unclaimed_property.gif',
'Finance|/images/h_imgs/finance.gif',
'Peace Officers Retirement System|/images/h_imgs/peace_officers_retirement_s.gif',
'Judicial Retirement System|/images/h_imgs/judicial_retirement_system.gif',
'Invest In Iowa|/images/h_imgs/invest_in_iowa.gif',
'State Financings|/images/h_imgs/state_financings.gif',
'State Operating Fund|/images/h_imgs/state_operating_fund.gif',
'Tobacco Settlement Authority (TSA)|/images/h_imgs/tobacco_settlement_authorit.gif',
'Outstanding Obligations Report|/images/h_imgs/outstanding_obligations_rep.gif',
'Information for Local Governments|/images/h_imgs/information_local_governments.gif',
'Street Construction / Transfer of Jurisdiction|/images/h_imgs/street_construction.gif',
'Protection of Public Deposits|/images/h_imgs/protection_of_public_deposits.gif',
'Public Fund Rates|/images/h_imgs/pubic_funds_rates.gif',
'Information for Financial Institutions|/images/h_imgs/information_for_financial_i.gif',
'Request for Proposals|/images/h_imgs/requests_for_proposals.gif',
'Links|/images/h_imgs/links.gif',
'Contact Information|/images/h_imgs/contact_information.gif',
'Site Map|/images/h_imgs/site_map.gif',
'Annual Reports|/images/h_imgs/annual_reports.gif',
'Pay YOURSELF First Program|/images/h_imgs/pay_yourself_first_program.gif',
'Financial Literacy|/images/h_imgs/financial_literacy.gif'
);

function firdom(){
	if(document.getElementsByTagName && document.createElement){
		for (var l=1;l<=2;l++){
			var h1s=document.getElementsByTagName('h'+l);
			scanandreplace(h1s,'h'+l);
		}
	}
}
function scanandreplace(h1s,tag){
	for(var i=0;i<h1s.length;i++){
		for(var f=0;f<replaceImages.length;f++){
			var chunks=replaceImages[f].split('|');
			var thish1=document.getElementsByTagName(tag)[i];
			if(thish1.firstChild.nodeValue==chunks[0]){
				var newImg=document.createElement('img');			
				newImg.setAttribute('alt',chunks[0])
				newImg.setAttribute('src',chunks[1])
				// or newImg.src=chunks[1];
				thish1.replaceChild(newImg,thish1.firstChild)
				break;
			}
		}
	}
}
window.onload=firdom;

