/*
	core js file 
	
*/

var gActiveFeat = 'feat1';
function changeActiveFeat(idName) {
	document.getElementById(gActiveFeat+'-text').className='hide';
	document.getElementById(gActiveFeat).className='feat';
	document.getElementById(idName).className='feat active';
	document.getElementById(idName+'-text').className='text';
	gActiveFeat = idName;
}

function tabswitch(id) {
	for (var x = 1; x <= 3; x++) {
		document.getElementById('tab' + x).setAttribute('class', '');
		document.getElementById('tabdiv' + x).style.display = 'none';	
	}
	document.getElementById('tab' + id).setAttribute('class', 'current');
	document.getElementById('tabdiv' + id).style.display = 'block';
}


scrollStep=4;
timerLeft="";
timerRight="";
function toLeft(id){
  document.getElementById(id).scrollLeft=0
}
function scrollDivLeft(id){
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
}
function scrollDivRight(id){
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
}
function toRight(id){
  document.getElementById(id).scrollLeft=document.getElementById(id).scrollWidth
}
function stopMe(){
  clearTimeout(timerRight) 
  clearTimeout(timerLeft)
}