function preloadIntroImages()
{
	var imageWidth  = 752;
	var imageHeight = 117;

	var imgSrc = new Array("/cs/bg-intro-1.jpg", "/cs/bg-intro-2.jpg", "/cs/bg-intro-3.jpg", "/cs/bg-intro-4.jpg");
	var images = new Array();

	for (var imageNum=0; imageNum < imgSrc.length; imageNum++)
	{
		images[imageNum] = new Image(imageWidth, imageHeight);
		images[imageNum].src = imgSrc[imageNum];
	}
}


window.onload=function() {
	addTB();
	if(browser.isIE&&browser.getIEversion()<=6.0)initNav();

	preloadIntroImages();
}

var initNav=function(){
	var uls=getEl("nav").getElementsByTagName("ul");
	for(var i=1;i<uls.length;i++){
		uls[i].parentNode.onmouseover=function(){
			if(!this.contains(event.fromElement)){
				setVV(this.lastChild);
				this.firstChild.className="act";
			}
			event.cancelBubble=true;
		}
		uls[i].parentNode.onmouseout=function(){
			if(!this.contains(event.toElement)){
				setVH(this.lastChild);
			 	this.firstChild.className="";
			}
			event.cancelBubble=true;
		}
	}
}



function isCzechLang()
{
  return /\/cs\//.test(window.location);
}


var switchIntro = function(pos)
{
	var introObj  = document.getElementById("intro");
	var introText = document.getElementById("introtext");
	// alert();
	switch(pos)
	{
		case 1:
				if (isCzechLang())
				{
					introText.firstChild.nodeValue = "Specialist\u00e9 na dokumenty";
				}
				else
				{
					introText.firstChild.nodeValue = "Document specialists";
				}
				// newimage = 'url("bg-intro-1.jpg")';
				introObj.style.backgroundImage = 'url("/cs/bg-intro-1.jpg")';
				break;
		case 2:
				if (isCzechLang())
				{
					introText.firstChild.nodeValue = "Data pod kontrolou";
				}
				else
				{
					introText.firstChild.nodeValue = "Data under control";
				}
				introObj.style.backgroundImage = 'url("/cs/bg-intro-2.jpg")';
				break;
		case 3:
				if (isCzechLang())
				{
					introText.firstChild.nodeValue = "Efektivn\u00ed procesy";
				}
				else
				{
					introText.firstChild.nodeValue = "Effective processes";
				}
				introObj.style.backgroundImage = 'url("/cs/bg-intro-3.jpg")';
				break;
		case 4:
				if (isCzechLang())
				{
					introText.firstChild.nodeValue = "Slu\u017eby pro ECM \u0159e\u0161en\u00ed";
				}
				else
				{
					introText.firstChild.nodeValue = "ECM solutions services";
				}
				introObj.style.backgroundImage = 'url("/cs/bg-intro-4.jpg")';
				break;
	}
}
