var tabsName=new Array();
var tabs=new Array();
function getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber){

  getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, null, null, null, null,null,null,null)

}

function getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, target, hideTabs, hideRightSpace, shiftTabBy){

  getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, target, hideTabs, hideRightSpace, shiftTabBy,null,null,null)

}


function getTabs(selectedTabName, isAgent, hideYourAccount, hideHorizontalLine, secure, customCareNumber, target, hideTabs, hideRightSpace, shiftTabBy,tabArray,ibaseURL,ilinkURL){
     if(shiftTabBy==null){
      shiftTabBy=67;
   }


   var myTarget='';
   if(target!=null){
      myTarget=' target="'+target+'"';
   }

   tabsName=new Array();
   tabsName["newsletter"]=9;
   tabsName["calendar"]=10;
   tabsName["home"]=2;
   tabsName["contact"]=3;
   tabsName["sitemap"]=4;
   tabsName["about"]=6;
   tabsName["dmap"]=5;
   tabsName["signup"]=7;
   tabsName["programs"]=8;
   tabsName["resources"]=11;
   tabsName["faq"]=12;
   tabsName["dboard"]=13;
   tabsName["hoyime"]=14;
//   tabsName["dental"]=3;
 

//   tabsName["home"]=9;

   var selectedTab=tabsName[selectedTabName];

   
   tabs=new Array(
      new Array('<a href="index.htm"><img border="0" src="images/topBan_r1_c2.gif" alt="ban"></a>', null),
      new Array('<a href="home.htm"><img src="images/home_', '.gif" border="0" alt="home" srcover="images/home_1.gif"></a>'),
      new Array('<a href="contact.htm"><img src="images/contact_', '.gif" border="0" alt="contact" srcover="images/contact_1.gif"></a>'),
      new Array('<a href="sitemap.htm"><img src="images/sitemap_', '.gif" border="0" alt="sitemap" srcover="images/sitemap_1.gif"></a>'),
      new Array('<a href="districtmap.htm"><img src="images/districtmap_', '.gif" border="0" alt="dmap" srcover="images/districtmap_1.gif"></a>'),
      new Array('<a href="aboutus.htm"><img src="images/about_', '.gif" border="0" alt="about" srcover="images/about_1.gif"></a>'),  
      new Array('<a href="signup.asp"><img src="images/signup_', '.gif" border="0" alt="signup" srcover="images/signup_1.gif"></a>'),
      new Array('<a href="programs.htm"><img src="images/programs_', '.gif" border="0" alt="programs" srcover="images/programs_1.gif"></a>'),
      new Array('<a href="newsletter.htm"><img src="images/newsletter_', '.gif" border="0" alt="newsletter" srcover="images/newsletter_1.gif"></a>'),
      new Array('<a href="calendar/main.asp"><img src="images/calendar_', '.gif" border="0" alt="calendar" srcover="images/calendar_1.gif"></a>'),
      new Array('<a href="resources.htm"><img src="images/resources_', '.gif" border="0" alt="resources" srcover="images/resources_1.gif"></a>'),
      new Array('<a href="faq.htm"><img src="images/faq_', '.gif" border="0" alt="faq" srcover="images/faq_1.gif"></a>'),
      new Array('<a href="disforum/default.asp"><img src="images/discusboard_', '.gif" border="0" alt="dboard" srcover="images/discusboard_1.gif"></a>')  
	  );
   // allow overide of tabs
   if(tabArray!=null){
      tabs=tabArray;
   }
 document.write('<td><img src="images/spacer.gif" width="1" height="3" border="0" alt=""></td>');
document.write('<center>');
            document.write('<table width="760" height="84" border="0" cellpadding="0" cellspacing="0">');
			   document.write('<tr>');
                  document.write('<td width="79" height="84" scope="row">'+getImageTab(2, selectedTab)+''+getImageTab(3, selectedTab)+''+getImageTab(4, selectedTab)+'</td>');

					         document.write('<th width="681" height="84" scope="row">'+getImageTab(1, selectedTab)+'</th><td><img src="images/spacer.gif" width="1" height="0" border="0" alt=""></td></tr></table>');
							 document.write('<div><table width="760"  border="0" cellpadding="0" cellspacing="0"><tr>');
document.write('<th scope="row">'+getImageTab(5, selectedTab)+'</th><td>'+getImageTab(6, selectedTab)+'</td><td>'+getImageTab(7, selectedTab)+'</td><td>'+getImageTab(8, selectedTab)+'</td><td>'+getImageTab(9, selectedTab)+'</td><td>'+getImageTab(10, selectedTab)+'</td><td>'+getImageTab(11, selectedTab)+'</td><td>'+getImageTab(12, selectedTab)+'</td><td>'+getImageTab(13, selectedTab)+'</td><td><img src="images/spacer.gif" width="1" height="0" border="0" alt=""></td></tr></table></div>');







/* THIS THE END POINT FOR REPLACEMENT OF WINTER SCENE */

}

function getImageTab(tabIndex, selectIndex){
   var result=tabs[tabIndex-1][0];
   if(tabs[tabIndex-1][1]!=null){
      if(selectIndex==tabIndex){
         result+='1';
      }
      else{
         result+='0';
      }
      result+=tabs[tabIndex-1][1];
   }
   return result;
}


/*
	Header Information------------------------------------[Do Not Remove This Header]--
	Title: OO Dom Image Rollover
	Description: This script makes it easy to add rollover/ mousedown 
  	effects to any image on the page, including image submit buttons. Automatically 
  	preloads images as well. Script works in all DOM capable browsers- IE5+, NS6+, 
  	Opera7+.
	
	Legal: Copyright 2005 Adam Smith
	Author Email Address: ibulwark@hotmail.com
	Date Created: June 6, 2005
	Website: Codevendor.com | eBadgeman.com
	Script featured on Dynamic Drive: http://www.dynamicdrive.com
	-----------------------------------------------------------------------------------
*/

function imageholderclass(){
	this.over=new Array();
	this.down=new Array();
	this.src=new Array();
	this.store=store;
	
	function store(src, down, over){
		var AL=this.src.length;
		this.src[AL]=new Image(); this.src[AL].src=src;
		this.over[AL]=new Image(); this.over[AL].src=over;
		this.down[AL]=new Image(); this.down[AL].src=down;
	}
}

var ih = new imageholderclass();
var mouseisdown=0;

function preloader(t){
	for(i=0;i<t.length;i++){
		if(t[i].getAttribute('srcover')||t[i].getAttribute('srcdown')){
			
			storeimages(t[i]);
			var checker='';
			checker=(t[i].getAttribute('srcover'))?checker+'A':checker+'';
			checker=(t[i].getAttribute('srcdown'))?checker+'B':checker+'';
			
			switch(checker){
			case 'A' : mouseover(t[i]);mouseout(t[i]); break;
			case 'B' : mousedown(t[i]); mouseup2(t[i]); break;
			case 'AB' : mouseover(t[i]);mouseout(t[i]); mousedown(t[i]); mouseup(t[i]); break;
			default : return;			
			}
			
			if(t[i].src){t[i].setAttribute("oldsrc",t[i].src);}
		}
	}
}
function mouseup(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");this.oldmouseup();}

	}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("srcover");}}
	t.onmouseup=newmouseup;
}

function mouseup2(t){
	var newmouseup;
	if(t.onmouseup){
		t.oldmouseup=t.onmouseup;
		newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");this.oldmouseup();}
		}
	else{newmouseup=function(){mouseisdown=0;this.src=this.getAttribute("oldsrc");}}
	t.onmouseup = newmouseup;
}

function mousedown(t){
	var newmousedown;
	if(t.onmousedown){
		t.oldmousedown=t.onmousedown;
		newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");this.oldmousedown();}}
	}
	else{newmousedown=function(){if(mouseisdown==0){this.src=this.getAttribute("srcdown");}}}
	t.onmousedown=newmousedown;
}

function mouseover(t){
	var newmouseover;
	if(t.onmouseover){
		t.oldmouseover=t.onmouseover;
		newmouseover=function(){this.src=this.getAttribute("srcover");this.oldmouseover();}
	}
	else{newmouseover=function(){this.src=this.getAttribute("srcover");}}
	t.onmouseover=newmouseover;
}

function mouseout(t){
	var newmouseout;
	if(t.onmouseout){
		t.oldmouseout=t.onmouseout;
		newmouseout=function(){this.src=this.getAttribute("oldsrc");this.oldmouseout();}
	}
	else{newmouseout=function(){this.src=this.getAttribute("oldsrc");}}
	t.onmouseout=newmouseout;
}

function storeimages(t){
	var s=(t.getAttribute('src'))?t.getAttribute('src'):'';
	var d=(t.getAttribute('srcdown'))?t.getAttribute('srcdown'):'';
	var o=(t.getAttribute('srcover'))?t.getAttribute('srcover'):'';
	ih.store(s,d,o);
}

function preloadimgsrc(){
	if(!document.getElementById) return;
	var it=document.getElementsByTagName('IMG');
	var it2=document.getElementsByTagName('INPUT');
	preloader(it);
	preloader(it2);
}

if(window.addEventListener){window.addEventListener("load", preloadimgsrc, false);} 
else{
	if(window.attachEvent){window.attachEvent("onload", preloadimgsrc);}
	else{if(document.getElementById){window.onload=preloadimgsrc;}}
}

