<!--
function lib_bwcheck(){ //Browsercheck (needed)
	this.ver=navigator.appVersion
	this.agent=navigator.userAgent
	this.dom=document.getElementById?1:0
	this.opera5=this.agent.indexOf("Opera 5")>-1
	this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera5)?1:0;
	this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera5)?1:0;
	this.ie4=(document.all && !this.dom && !this.opera5)?1:0;
	this.ie=this.ie4||this.ie5||this.ie6
	this.mac=this.agent.indexOf("Mac")>-1
	this.ns6=(this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4=(document.layers && !this.dom)?1:0;
	this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns4 || this.ns6 || this.opera5)
	return this
}
var bw=new lib_bwcheck()
//The speed
timSpeed = 15000
//The height of the container
contHeight = 100
function makePageObj(obj,nest){
	nest=(!nest) ? "":'document.'+nest+'.'
	this.el=bw.dom?document.getElementById(obj):bw.ie4?document.all[obj]:bw.ns4?eval(nest+'document.'+obj):0;
  	this.css=bw.dom?document.getElementById(obj).style:bw.ie4?document.all[obj].style:bw.ns4?eval(nest+'document.'+obj):0;
	this.height=bw.ns4?this.css.document.height:this.el.offsetHeight
	//this.top=b_gettop
	this.moveIt=moveIt;
	return this
}
function moveIt(x,y){
	this.css.left=x
	this.css.top=y;
}
function makePageObject(){  //page==documet
	this.x=0;
    this.x2=(bw.ns4 || bw.ns6)?innerWidth:document.body.offsetWidth-20;
	this.y=0;
    this.y2=(bw.ns4 || bw.ns6)?innerHeight:document.body.offsetHeight-4;
	this.x50=this.x2/2;
	this.y50=this.y2/2;
	return this;
}
// A unit of measure that will be added when setting the position of a layer.
var px = bw.ns4||window.opera?"":"px";
//Getting the top for the top method
function b_gettop(){
	var gleft=(bw.ns4 || bw.ns6)?parseInt(this.css.top):eval(this.css.pixelTop);
	return gleft;
}
//Variables
var selectTim = 1;
var active = 1;
var status=false;
/*********************************************************************************/
function changeActive(num){
    oPage[active].css.visibility = "hidden"
	oSlogan[active].css.visibility = "hidden"
	active = num
	oPage[active].css.visibility = "visible"
	oSlogan[active].css.visibility = "visible"
}
/********************************************************************************/
function Select(){
    var num;
	clearTimeout(selectTim)
    if (active==1) {
		num=0;
	} else {
	    num=active;
		num++;
	}
	changeActive(num)
	selectTim = setTimeout("Select()",timSpeed)

}
//Clears the timeout so the scroll stops, this is called onmouseout.
function selectPause(){
    if  (status==false) {
		clearTimeout(selectTim)
		status=true;
		document.pause.src=oImage[1].src;
	} else {
		Select();
		status=false;
		document.pause.src=oImage[0].src;
	}
}
function selectStop(){
	clearTimeout(selectTim)
	status=true;
}
function selectBack(){
	var num;
	if (active==0) {
        num=1;
	} else {
	    num=active;
		num--;
	}
	selectStop()
	changeActive(num)
}
function selectForward(){
	var num;
    if (active==1) {
		num=0;
	} else {
	    num=active;
		num++;
	}
	selectStop()
	changeActive(num)
}
/********************************************************************************/
var loaded;
function selectInit(){
	page=new makePageObject()
	oPage = new Array()
	// You can add and remove scrollObjects here.
	oPages = new makePageObj('divPages',false)
	oPage[0] = new makePageObj('divPage1','divPages')
	oPage[1] = new makePageObj('divPage2','divPages')
    //oPage[2] = new makePageObj('divPage3','divPages')
    //oPage[3] = new makePageObj('divPage4','divPages')
	oPage[0].css.visibility = "visible"

	oSlogan = new Array()
	oSlogans = new makePageObj('divSlogans',false)
	oSlogan[0] = new makePageObj('divSlogan1','divSlogans')
	oSlogan[1] = new makePageObj('divSlogan2','divSlogans')
    //oSlogan[2] = new makePageObj('divSlogan3','divSlogans')
    //oSlogan[3] = new makePageObj('divSlogan4','divSlogans')
	oSlogan[0].css.visibility = "visible"


	oImage=new Array();
	oImage[0]=new Image;
	oImage[1]=new Image;
	oImage[0].src='img/r_pause.gif';
	oImage[1].src='img/r_play.gif';

	//move this layers
	if (bw.ns6) {shiftx=10;shifty=14;} else if(bw.ns5){shiftx=-10;shifty=-9;} else if (bw.ns4) {shiftx=-12;shifty=-5;} else {shiftx=-1;shifty=3;}
	var a;
	a=90;
	oPages.moveIt(shiftx+page.x50-333,shifty+0+367-a)
	oSlogans.moveIt(shiftx+page.x50-330,shifty+0+520-a)
	Select() // zapusk
}
function selectInit_1(){
	page=new makePageObject()
	oPage = new Array()
	// You can add and remove scrollObjects here.
	oPages = new makePageObj('divPages',false)
	oPage[0] = new makePageObj('divPage1','divPages')
	oPage[1] = new makePageObj('divPage2','divPages')
    //oPage[2] = new makePageObj('divPage3','divPages')
    //oPage[3] = new makePageObj('divPage4','divPages')
	oPage[0].css.visibility = "visible"

	oSlogan = new Array()
	oSlogans = new makePageObj('divSlogans',false)
	oSlogan[0] = new makePageObj('divSlogan1','divSlogans')
	oSlogan[1] = new makePageObj('divSlogan2','divSlogans')
    //oSlogan[2] = new makePageObj('divSlogan3','divSlogans')
    //oSlogan[3] = new makePageObj('divSlogan4','divSlogans')
	oSlogan[0].css.visibility = "visible"


	oImage=new Array();
	oImage[0]=new Image;
	oImage[1]=new Image;
	oImage[0].src='img/dugme3.gif';
	oImage[1].src='img/dugme3_play.gif';

	//move this layers
	if (bw.ns5){shiftx=-10;shifty=-9;} else if (bw.ns4) {shiftx=-12;shifty=-5;} else {shiftx=-1;shifty=3;}
	var a;
	a=92;
	oPages.moveIt(shiftx+page.x50-280,shifty+0+364-a)
	oSlogans.moveIt(shiftx+page.x50-10,shifty+0+340-a)

	Select() // zapusk
}
function resized(){
	page2=new makePageObject()
	if(page2.x2!=page.x2 || page2.y2!=page.y2){
		 location.reload() //If the width or height have changed we reload the page.
	}
}
window.onresize=resized;//-->

