/* scroll begin */
scrollStep=8

timerLeft=""
timerRight=""
var z=0;

function containerResize() {
	if (navigator.appName=='Microsoft Internet Explorer' && parseFloat(navigator.appVersion)=='4'){
		var imgArray = document.getElementById('dataContainer').getElementsByTagName('IMG');
		var widthSize=0;
		var maxSize=0;
		if (imgArray.length!=0){
			for (var i = 0 ; i < imgArray.length; i++) {
				if (imgArray[i].offsetWidth > 630)
				{
					widthSize=imgArray[i].offsetWidth;
					if (widthSize > maxSize){
						maxSize=widthSize;
					}
				}
			}
			if (maxSize!=0){
				document.getElementById('mainContainer').style.width = (maxSize + 250) + "px";
			}
		}
	}
}


function scrollDivLeft(id){
  z=z+1;
  if(z=='28'){stopMe();} else {
  clearTimeout(timerRight) 
  document.getElementById(id).scrollLeft+=scrollStep
  timerRight=setTimeout("scrollDivLeft('"+id+"')",10)
  }
}

function scrollDivRight(id){
  z=z+1;
  if(z=='28'){stopMe();} else {
  clearTimeout(timerLeft)
  document.getElementById(id).scrollLeft-=scrollStep
  timerLeft=setTimeout("scrollDivRight('"+id+"')",10)
  }
}

function stopMe(){
  clearTimeout(timerRight); 
  clearTimeout(timerLeft);
  z=0;
}
/* *** */

/*
* input
*/
function inputCh(_obj,_text){
	if (_obj.value==_text){
		_obj.value="";
	}
}

function inputCh2(_obj,_text){
	if (_obj.value==""){
		_obj.value=_text;
	}
}
/* **** */

/*
* navigation
*/
function showMenu(_obj, clName){
	_obj.className=addClass(_obj.className,clName);
}

function hideMenu(_obj, clName){
	_obj.className=removeClass(_obj.className,clName);
}

	function addClass(className, classToAdd) {
		var arr = className.split(" ");
		arr[arr.length]= classToAdd;
		return arr.join(" ");
	}

	function removeClass(className, classToRemove) {
		var arr = className.split(" ");
		for(var i = 0 ; i < arr.length ; i++) {
			if(arr[i] == classToRemove) {
				arr[i] = "";
			}
		}
		return arr.join(" ");
	}
/* *** */
	