/*
* loading the images dynamically to the home page (location: left side of page)
*/
var bannerAD=new Array();
var adNum=0;
var preloadedimages=new Array();
for (i=1;i<bannerAD.length;i++){
  preloadedimages[i]=new Image();
  preloadedimages[i].src=bannerAD[i];
  }

function setTransition(){
   if (document.all){
      quotesRotator.filters.revealTrans.Transition=5;
      quotesRotator.filters.revealTrans.apply();
   }
}

function playTransition(){
   if (document.all)
      quotesRotator.filters.revealTrans.play()
}

function nextAd(){
   if(adNum<bannerAD.length-1)adNum++ ;
      else adNum=0;
   setTransition();
   document.images.quotesRotator.src=bannerAD[adNum];
   playTransition();
   //if(bannerAD[adNum]=="img/pix.gif") setTimeout("nextAd()", 2100);
     // else 
  setTimeout("nextAd()", 7000);
}
setTimeout("fadeElem('anim')", 1000);

/*
* loading/setting up the tabs (location: homepage)
*/
function loadTabs(){
	for (var i=0;i<tabs.length;i++){
		addEvent(document.getElementById('tab_'+tabs[i]), 'mouseover', clickTab);
		//addEvent(document.getElementById('tab_'+tabs[i]), 'click', clickTab);
	}//end for
}//end function loadTabs()


function clickTab(){
	var selTabNr = 0;
	for (var i=0;i<tabs.length;i++){
		if(this.id == 'tab_'+tabs[i]){
			selTabNr = i;	
		}
		document.getElementById(tabs[i]).style.display = "none";
		document.getElementById('tab_'+tabs[i]).className = document.getElementById('tab_'+tabs[i]).className.replace(/((fc|lc)[_]selected|selected)/, '');
	}
	if(selTabNr == 0)
		this.className += ' fc_selected';
	else if(selTabNr == (tabs.length-1))
		this.className += ' lc_selected';
	else
		this.className += ' selected';
	//display area
	var displayArea = this.id.replace(/tab_/, '');
	document.getElementById(displayArea).style.display =  "block";
}