// * Active Network / version 2.0 / edition 2002 / CFG Power Engine 2.0

// * Для подключения скрипта проверки броузера для дальнейшей подстановки
// * css в html документ (IE, NN) нужно указать следующее:
// * <head>
// * 	<script language="Javascript" src="checkBrowser.js"></script>
// * 	<script language="Javascript">
// *  		checkBrowser();
// * 	</script>
// * </head>

function checkBrowser()

{

if (navigator.appName.indexOf("Netscape") != -1) document.writeln("<link rel=stylesheet type=text/css href='css/netscape.css'>");
else 
if (navigator.appName.indexOf("Microsoft") != -1) document.writeln("<link rel=stylesheet type=text/css href='css/microsoft.css'>");

browserName = navigator.appName;
browserVersion = parseFloat(navigator.appVersion);

if (browserName == "Netscape" && browserVersion >= 4.0) {javaDetection = 'true';}
else
if (browserName == "Microsoft Internet Explorer" && browserVersion >= 4.0) {javaDetection = 'true';}
else
{javaDetection = 'false';}

}

{
picture1=new Image;
picture1.src="/i/main/1.png";
picture2=new Image;
picture2.src="/i/main/2.png";
picture3=new Image;
picture3.src="/i/main/3.png";
picture4=new Image;
picture4.src="/i/main/4.png";
picture5=new Image;
picture5.src="/i/main/5.png";

}

function openPage(source,x,y)

{
var input = "width=" + x + ",height=" + y + ",resizable=0,menubar=0,titlebar=yes,toolbar=0,location=0,status=1,scrollbars=no";
var output = window.open([source], "view", [input]);
}

// SlideShow

var slideShowSpeed = 5000;
var crossFadeDuration = 3;
var images = new Array();

images[0] = 'i/main/1.png';
images[1] = 'i/main/2.png';
images[2] = 'i/main/3.png';
images[3] = 'i/main/4.png';
images[4] = 'i/main/5.png';

var t
var j = 0
var p = images.length

var preLoad = new Array()
for (i = 0; i < p; i++){
   preLoad[i] = new Image()
   preLoad[i].src = images[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)
}


// end
