// http://javascript.internet.com
// (C) 2000 www.CodeLifter.com
// Web Site: http://www.codelifter.com
//
// Set slideShowSpeed (milliseconds)
var slideShowSpeed = 3000
// Duration of crossfade (seconds)
var crossFadeDuration = 1
// Specify the image files
var Pic = new Array() // don't touch this
// to add more images, just continue
// the pattern, adding to the array below
Pic[0] = 'images/slide01.jpg'
Pic[1] = 'images/slide02.jpg'
Pic[2] = 'images/slide03.jpg'
Pic[3] = 'images/slide04.jpg'
Pic[4] = 'images/slide05.jpg'
var t
var j = 0
var p = Pic.length
var preLoad = new Array()
for (i = 0; i < p; i++) {
   preLoad[i] = new Image()
   preLoad[i].src = Pic[i]
}
function runSlideShow() {
   if (document.all) {
      document.images.SlideShow.style.filter="blendTrans(duration=2)"
      document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
      document.images.SlideShow.filters.blendTrans.Apply()      
   }
   document.images.SlideShow.src = preLoad[j].src
   if (document.all) {
      document.images.SlideShow.filters.blendTrans.Play()
   }
   j = j + 1
   if (j > (p-1)) j=0
   t = setTimeout('runSlideShow()', slideShowSpeed)
}
// 
function disp(self, content, kogus) {
	//var suva = ((document.getElementById) ? document.getElementById(self) : eval("document.all['" + self + "']")).style.display = "none";
	//var suvo = ((document.getElementById) ? document.getElementById(content) : eval("document.all['" + content + "']")).style.display = "block";
	for (i = 1 ; i <= kogus ; i++) document.getElementById("divb" + i).style.display = "none";
	for (i = 1 ; i <= kogus ; i++) document.getElementById("diva" + i).style.display = "block";
	document.getElementById(self).style.display = "none";
	if (content != "") document.getElementById(content).style.display = "block";
}
//
function nospam(user,domain) {
	locationstring = "mailto:" + user + "@" + domain;
	window.location = locationstring;
}
//
function winOpen(loc,nimi,scr,rez,pwidth,pheight) {
ltpopup = window.open (loc,nimi,"directories=0,toolbar=0,location=0,status=0,menubar=0,scrollbars="+scr+",resizable="+rez+",width="+pwidth+",height="+pheight+",copyhistory=1");
}
// 
function pilt(ploc,pnimi,pwidth,pheight) {
	myWin= open('', 'displayWindow', 'toolbar=no,directories=no,status=no,location=no,resizable=no,scrollbars=no,menubar=no,width='+(pwidth+36)+',height='+(pheight+36)+'');
	myWin.document.open();
	myWin.document.write('<html>\n\r<head>\n\r<title>'+pnimi+'<\/title>\n\r<\/head>'
	+'\n\r<body style="background-color: #99cc99; margin: 18px;">'
	+'\n\r<a href="javascript:window.close();"><img src="'+ploc+'" height="'+pheight+'" width="'+pwidth+'" alt="" border="0" title="sulge pilt"><\/a>'
	+'\n\r<\/body>\n\r<\/html>');
	myWin.document.close();  
}
//
function changeLinks(nlink, alink, aclass) {
	var anchors = document.getElementsByClassName(aclass);
	//alert(nlink);
	for (i = 0; i < anchors.length; i++) {
		anchors[i].className = nlink;
	}
	alink.className = aclass;
}
//
/*function changeLinks(menuid, nlink, alink, aclass) {
	var anchors = menuid.getElementsByTagName('a');
	//alert(anchors);
	//var anchors = menuid.links;//document.links
	//var anchors = document.getElementById(menuid).links;
	//var anchors = document.getElementsByName(linkname).links;
	//var anchors = document.getElementsByClassName(nlink);
	for (i = 0; i < anchors.length; i++) {
		anchors[i].className = nlink;
	}
	alink.className = aclass;
}*/

