// JavaScript Document
        

        //safety articles
        function articleLink(articleTotal,newID) {
                var curArticleText = document.getElementById('lcart'+newID);
                var curArticleImage = document.getElementById('lcimage'+newID);
                var curArticleLink = document.getElementById('lcarticle'+newID);
                var articleTotalPlus = (articleTotal+1);
                var lcArticleImage = document.getElementById('lcimage'+articleTotalPlus);

                if (curArticleLink.className == 'max') {
                        for (i=1; i<=articleTotal; ++i) {
                                if (i != newID) {
                                        var prevArticleText = document.getElementById('lcart'+i);
                                        var prevArticleImage = document.getElementById('lcimage'+i);
                                        var prevArticleLink = document.getElementById('lcarticle'+i);
                                        prevArticleText.style.display = 'none';
                                        prevArticleImage.style.display = 'none';
                                        prevArticleLink.src = 'images/artexp.PNG';
                                        prevArticleLink.className = 'max';
                                }
                                else {
                                        curArticleText.style.display = 'block';
                                        curArticleImage.style.display = 'block';
                                        curArticleLink.src = 'images/artdec.PNG';
                                        curArticleLink.className = 'min';
                                        lcArticleImage.style.display = 'none';
                                }
                        }
                }
                else {
                        curArticleText.style.display = 'none';
                        curArticleImage.style.display = 'none';
                        curArticleLink.src = 'images/artexp.PNG';
                        curArticleLink.className = 'max';
                        lcArticleImage.style.display = 'block';
                }
        }              
		
		function showCurrentLearningCenter() {
			//Show the top 3 current newsbreaks in the sidebar			
			document.write('<p><a href="IMT-Insurance-learning010401.html" class="article2">Take Steps to Prevent Dog Bites</a></p>');
			document.write('<p><a href="IMT-Insurance-learning112503.html" class="article2">Prevent Frozen Pipes</a></p>');
			document.write('<p><a href="IMT-Insurance-learning112505.html" class="article2">Winterize Your Home</a></p><br />');					
			document.write('<p><a href="../IMT-insurance-learning-center.html" class="article2" style="font-variant:small-caps">Archives</a></p>');
		}

		function showAnnualReport() {
			document.getElementById('areports').style.display='block';
			document.getElementById('currareport').onclick='';
		}
		
		function loadhc() {
		//Randomly select the four highlighted content sections to show on the home page

		//highlight coverage articles available, 'a' is image, 'b' is text		
		//OLD - St. Baldrick's 2010 event
		//var hc1a = '<div class="shadowimg"><a href="http://www.stbaldricks.org" rel="ext"><img border="0" width="160" height="160" alt="St. Baldrick’s Foundation" src="http://i856.photobucket.com/albums/ab122/stbaldricks/Set2_250x250.jpg" /></a></div>';
		//var hc1b = '<h2>Shaving the Way to Conquer Kids\' Cancer</h2><p>The IMT Group is sponsoring 5 employees who\'ve volunteered to be shavees in a local St. Baldrick\'s Foundation event with all proceeds going to support childhood cancer research. <a href="imt-stbaldricksfoundation.html" class="article3">Meet our shavees</a> and consider supporting them.</p>';
		var hc1a = '<div class="shadowimg"><a href="IMT-From-the-President.html" class="article3"><img width="160" height="140" src="images/pres1.png" alt="pic" border="0" /></a></div>';
		var hc1b = '<h2>From our President</h2><p>A New Year Begins!</p><p>Welcome to our updated web site. A message from the President is one of the new features. I\'ll be updating throughout the year, so please check back frequently to see what we are up to at The IMT Group.</p><p>Please view <a href="IMT-From-the-President.html" class="article3">Richard\'s latest update</a>.</p>';
		var hc2a = '<div class="shadowimg"><a href="http://www.desmoinesmarathon.com/" class="article3" rel="ext"><img width="160" height="140" src="images/marathonNew.png" alt="pic" border="0" /></a></div>';
		var hc2b = '<h2>The IMT Des Moines Marathon</h2><p>Experience the IMT Des Moines Marathon on Sunday, October 17, 2010. <a href="http://www.desmoinesmarathon.com/" class="article3" rel="ext">Click here</a> for more details.</p>';
		var hc3a = '<div class="shadowimg"><a href="http://www.facebook.com/theimtgroup" class="article3"><img width="160" height="140" src="images/hcfacebook.png" alt="pic" border="0" /></a></div>';
		var hc3b = '<h2>IMT is on Facebook!</h2><p>What is our intent with Facebook? We\'d like to connect with customers, potential customers and agents where they are. <a href="http://www.facebook.com/theimtgroup" class="article4" target="_blank">Check us out!</a></p>';
		var hc4a = '<div class="shadowimg"><a href="learning-center/IMT-insurance-learning010401.html" class="article3"><img width="160" height="140" src="images/pets_dogbites.jpg" alt="pic" border="0" /></a></div>';
		var hc4b = '<h2>The Scoop</h2><h3><a href="learning-center/IMT-insurance-learning010401.html" class="article2">Take Steps to Prevent Dog Bites</a></h3><p>The Centers for Disease Control (CDC) report that about 800,000 dog bite injuires require immediate medical care in the United States yearly.  If your dog bites someone, you can be held legally liable. Read more to find out how to prevent this from happening.</p>';
		var hc5a = '<div class="shadowimg"><a href="learning-center/IMT-insurance-learning112503.html" class="article3"><img width="160" height="140" src="images/heatingsafety.png" alt="pic" border="0" /></a></div>';
		var hc5b = '<h2>The Scoop</h2><h3><a href="learning-center/IMT-insurance-learning112503.html" class="article2">Prevent Frozen Pipes</a></h3><p>Avoid frozen and bursting pipes this winter with these safety guidelines offered to The IMT Group by engineers at the Institute for Business &amp; Home Safety.</p>';		
		
		//Update the total highlight coverage articles available
		var hc_total = 5;
		
		//customer testimonials
		var hcct1a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct1b = '<h2>Thank You!</h2><p>Dan (Iowa) ~ I just wanted to say, THANK YOU for all of your help and assistance in getting my daughter\'s car fixed. Your professionalism and prompt response was truly appreciated and is not typical of what I am used to when dealing with other insurance carriers.</p>';
		var hcct2a = '<div class="shadowimg"><a href=testimonials/ct100802.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct2b = '<h2>Thank You!</h2><p>Laura (Iowa) ~ I am EXTREMELY impressed with the entire process. Starting with my insurance agent, who I called at 5:30p.m. on a Sunday, to filing a claim, to being called on Monday morning and having everything resolved by Tuesday. <a href="testimonials/ct100802.html" class="article2">...more</a></p>';
		var hcct3a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct3b = '<h2>Thank You!</h2><p>Kerry (Iowa) ~ I just wanted to let you know how impressed I am with your company, and particularly with my adjuster. My car was recently totaled. The adjuster went above and beyond all expectations to investigate and settle the claim in a pleasant and efficient manner. Keep up the good work!</p>';
		var hcct4a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct4b = '<h2>Thank You!</h2><p>Kay (Iowa) ~ I want to express my gratitude to the adjuster for his prompt service and his friendliness to my husband on the day of our accident. We were able to get the pickup in to the body shop on the same day as the accident.</p>';
		var hcct5a = '<div class="shadowimg"><a href=testimonials/ct100805.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct5b = '<h2>Thank You!</h2><p>Claire (South Dakota) ~ I was recently interviewed by your adjuster in regard to injuries I received as a result of a fall on an icy sidewalk. I do hope that you appreciate your good fortune in having this adjuster representing your company. <a href="testimonials/ct100805.html" class="article2">...more</a></p>';
		var hcct6a = '<div class="shadowimg"><a href=testimonials/ct100806.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct6b = '<h2>Thank You!</h2><p>Richard (Iowa) ~ I want to thank you for the prompt processing of our recent claim. Barbara and I appreciate it very much. This confirms why we keep our insurance with IMT! Every year people try to tell us why we should switch our auto insurance, etc. <a href="testimonials/ct100806.html" class="article2">...more</a></p>';
		var hcct7a = '<div class="shadowimg"><a href=testimonials/ct100807.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct7b = '<h2>Thank You!</h2><p>Shanna & Mike (South Dakota) ~ Mike and I are very impressed with your timely and efficient work on our claim! It\'s only been a little over a week and we\'re already driving our new vehicle (a Volvo V70). You obviously know how difficult it can be for a family <a href="testimonials/ct100807.html" class="article2">...more</a></p>';
		var hcct8a = '<div class="shadowimg"><a href=testimonials/ct100808.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct8b = '<h2>Thank You!</h2><p>Darrell & Carolyn (Iowa) ~ Carolyn and I want to thank you for your prompt handling of our claim. We called you, telling you about our damage, twenty minutes later the IMT Adjuster called, arrangements were made and just seven days later our body shop had the parts installed, <a href="testimonials/ct100808.html" class="article2">...more</a></p>';
		var hcct9a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct9b = '<h2>Thank You!</h2><p>Bill (Iowa) ~ I would like to say that I am very pleased with my settlement on the hail damage. IMT was very prompt and fair. The adjuster was competent, thorough, and courteous. Thank you again!</p>';
		var hcct10a = '<div class="shadowimg"><a href=testimonials/ct100810.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct10b = '<h2>Thank You!</h2><p>Jeanne (South Dakota) ~ My husband Michael had filed a claim with you last year when a garbage truck had clipped the front of his pickup out in front of our house and he was so impressed with your company and the adjuster that handled his claim.  <a href="testimonials/ct100810.html" class="article2">...more</a></p>';
		var hcct11a = '<div class="shadowimg"><a href=testimonials/ct100811.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct11b = '<h2>Thank You!</h2><p>Kevin (Nebraska) ~ I would like to thank you for taking the time to really listen to one of your agents. Thank you for recognizing the scope of damage of the ice storm and the devastating effect on our clients even before the President of the United States declared a national disaster in Nebraska. <a href="testimonials/ct100811.html" class="article2">...more</a></p>';
		var hcct12a = '<div class="shadowimg"><a href=testimonials/ct100812.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct12b = '<h2>Thank You!</h2><p>Dixie (Illinois) ~ I had a claim due to a recent ice storm as did thousands of other customers. My adjuster treated me with total respect and took time to talk to me on several occasions even though he was so very busy. He returned my phone calls as I needed his advice and expertise. <a href="testimonials/ct100812.html" class="article2">...more</a></p>';
		var hcct13a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct13b = '<h2>Thank You!</h2><p>Donna (Iowa) ~ I sincerely want to thank you for the nice settlement you gave me on my new kitchen floor. I was contacted last week to switch insurance, but didn\'t do it. IMT has been good to me. Stop in sometime and see the kitchen.</p>';
		var hcct14a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct14b = '<h2>Thank You!</h2><p>Don (South Dakota) ~ On Saturday evening, over seven inches of rain fell in my town. On Sunday, sewer systems were backing up and there were power outages. In my twenty years of being an insurance agent, this was the most severe storm I\'ve been involved with. It was great to know by mid-Monday morning IMT was bringing in a storm team to town.</p>';
		var hcct15a = '<div class="shadowimg"><a href=testimonials/ct100815.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct15b = '<h2>Thank You!</h2><p>Mark & Lois (South Dakota) ~ I want to take this occasion to thank IM for the excellent service we received. Our adjuster was very prompt and accommodating. We thought the settlement was very fair to us. Thank you! It was interesting to note that during this process we received a letter <a href="testimonials/ct100815.html" class="article2">...more</a></p>';
		var hcct16a = '<div class="shadowimg"><a href=testimonials/ct100816.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct16b = '<h2>Thank You!</h2><p>Matt (Nebraska) ~ I was a bit disappointed at first when I realized my F-150 might be totaled, but all things considered, I\'m very pleased with the outcome. I\'m writing to let you know that I enjoyed working with the adjuster on what I\'m sure was a very difficult case. <a href="testimonials/ct100816.html" class="article2">...more</a></p>';
		var hcct17a = '<div class="shadowimg"><a href=testimonials/ct100817.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct17b = '<h2>Thank You!</h2><p>Terry & Cheryl (Wisconsin) ~ We have been covered by IMT Insurance for several years now. Recently, we had two instances when we needed to use our insurance. We want to let you know how very pleased we were with IMT\'s prompt and ultimately satisfactory settlement responses. <a href="testimonials/ct100817.html" class="article2">...more</a></p>';
		var hcct18a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct18b = '<h2>Thank You!</h2><p>Teresa & Todd (Wisconsin) ~ I do hope this reaches you -- my husband and I just want to thank you for your help with our accident. We were truly surprised with your call when you told us everything would be paid in full. Thanks again for your extra help in this.</p>';
		var hcct19a = '<div class="shadowimg"><a href=testimonials/ct100819.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct19b = '<h2>Thank You!</h2><p>Kathy & James (Iowa) ~ We would like your company and our agent to know that we are very pleased with the quality of service your company provides. My husband contacted our agent after the hail and wind storm we had on Wednesday. He informed our agent that we had a broken windshield <a href="testimonials/ct100819.html" class="article2">...more</a></p>';
		var hcct20a = '<div class="shadowimg"><a href=testimonials/ct100820.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct20b = '<h2>Thank You!</h2><p>Tom & Rachel (Iowa) ~ I wanted to say, “Thank You!” for getting our estimate done quickly and fairly. Our house was finished this past Tuesday and the contractors we had were also excellent and fair which made everything pretty painless.  We have been hearing <a href="testimonials/ct100820.html" class="article2">...more</a></p>';
		var hcct21a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct21b = '<h2>Thank You!</h2><p>Anonymous (Website Customer Satisfaction Survey) ~ I had an excellent experience with one of your Claims Adjusters out of Sioux City. He handled a claim I had with one of your policyholders. Very nice young man. Seriously considering switching insurance companies. He expedited everything for me. Thank you IMT!</p>';
		var hcct22a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct22b = '<h2>Thank You!</h2><p>Orval (Iowa) ~ I can say that I was treated very well while the damage was inspected and the value of the damage was determined.  Thank you!</p>';
		var hcct23a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct23b = '<h2>Thank You!</h2><p>Sara & Jason (Iowa) ~ We wanted to take a moment and notify you of the exceptional customer service one of your employees provided me last week. She provided excellent service with a positive attitude and was very helpful and courteous. ...It is people like her that make your company very successful.</p>';
		var hcct24a = '<div class="shadowimg"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></div>';
		var hcct24b = '<h2>Thank You!</h2><p>Roger & Rita (Iowa) ~ As always your service and concern were not only timely, but fair! Thank you!</p>';
		var hcct25a = '<div class="shadowimg"><a href=testimonials/ct100821.html class="article3"><img width="160" height="140" src="images/thankyou.png" alt="pic" border="0" /></a></div>';
		var hcct25b = '<h2>Thank You!</h2><p>Tom & Rachel (Iowa) ~ We would like your company and our agent to know that we are very pleased with the quality of service your company provides. My husband contacted our agent after the hail and wind storm we had in June. We had a broken windshield on <a href="testimonials/ct100821.html" class="article2">...more</a></p>';
								
		//Update the total customer testimonials available
		var ct_total = 25;
		
		//add one to access the customer testimonials
		hc_total = hc_total+1;
		
		//randomly select the displayed highlight coverage articles
		var num1=Math.floor(Math.random()*hc_total+1)+1;
		var ct_display = 0;
		var num2 = 0;
		var num3 = 0;
		var num4 = 0;
		if (num1 < (hc_total-1)) {
			num2 = num1+1;
		}
		else if (num1 == (hc_total-1)) {
			num2 = 1;
		}
		else {
			num1 = 1;
			num2 = 'ct';
			ct_display = 1;
		}
		if (num2 < (hc_total-1)) {
			num3 = num2+1;
		}		
		else if (num2 == (hc_total-1) || num2 == 'ct') {			
			var testnum = 1;
			while (num1 == testnum) {
				testnum = testnum + 1;
			}
			num3 = testnum;
		}
		else {
			num3 = 'ct';
			ct_display = 1;
		}
		if (num3 < (hc_total-1)) {
			num4 = num3+1;
		}
		else if (num3 == (hc_total-1) || num3 == 'ct') {
			var testnum = 1;
			while (num1 == testnum || num2 == testnum) {
				testnum = testnum + 1;
			}
			num4 = testnum;			
		}		
		else {
			num4 = 'ct';
			ct_display = 1;
		}
		
		//if any of the 4 spots is to show a customer testimonial, randomly select the testimonial
		if (ct_display) {
			var ctnum=Math.floor(Math.random()*ct_total+1)+1;
			if (ctnum > ct_total) {ctnum = 1};
			if (num1 == 'ct') {num1=num1+ctnum};
			if (num2 == 'ct') {num2=num2+ctnum};
			if (num3 == 'ct') {num3=num3+ctnum};
			if (num4 == 'ct') {num4=num4+ctnum};
		}

//TEMPORARY CODE
//TEMPORARILY ** Fix 1st content in top left corner, then randomly select remaining three **		
//		if (num2 == 1) {
//			num2 = num1;
//		}
//		else if (num3 == 1) {
//			num3 = num1;
//		}
//		else if (num4 == 1) {
//			num4 = num1;
//		}
//		num1 = 1;	
//end TEMPORARY CODE

		document.write ('<div class="hcside"><div class="hc"><div class="hci">');
		document.write (eval('hc'+num1+'a'));
        document.write ('</div><div>');
        document.write (eval('hc'+num1+'b'));
		document.write ('</div></div><br class="clearfloat" /><div class="hc"><div class="hci">');
		document.write (eval('hc'+num2+'a'));
		document.write ('</div><div>');
		document.write (eval('hc'+num2+'b'));
        document.write ('</div></div></div><div class="hcside"><div class="hc"><div class="hci">');
		document.write (eval('hc'+num3+'a'));
		document.write ('</div><div>');
		document.write (eval('hc'+num3+'b'));
        document.write ('</div></div><br class="clearfloat" /><div class="hc"><div class="hci">');
		document.write (eval('hc'+num4+'a'));
        document.write ('</div><div>');
        document.write (eval('hc'+num4+'b'));
		document.write ('</div></div></div>');		        
    }