function DisplayFlash(path, width, height, wmode){

    text = "<object type=\"application/x-shockwave-flash\" allowScriptAccess=\"always\" data=\""+path+"\" width=\""+width+"\" height=\""+height+"\" wmode=\""+wmode+"\" quality=\"high\" name=\"flash\" id=\"flash\">\r\n";
    text += "<param name=\"allowScriptAccess\"	value=\"always\" />\r\n";
    text += "<param name=\"movie\"	value=\""+path+"\" />\r\n";
    text += "<param name=\"wmode\" value=\""+wmode+"\" />\r\n";
    text += "<param name=\"quality\" value=\"high\" />\r\n";
    text += "<param name=\"width\" value=\""+width+"\" />\r\n";
    text += "<param name=\"height\" value=\""+height+"\" />\r\n";
    text += "</object>";
    document.write(text);
}


DOM = document.getElementById;
Netscape4 = document.layer;
Netscape6 = Mozilla = (navigator.appName == "Netscape") && DOM;
Netscape7 = navigator.userAgent.indexOf("Netscape/7") >= 0;
Opera5 = window.opera && DOM;
Opera6 = Opera5 && window.print;
Opera7 = Opera5 && navigator.userAgent.indexOf("Opera 7") >= 0;
IE = document.all && !Opera5;
Firefox = navigator.userAgent.indexOf("Firefox") >= 0;

  function setLayout() {
  
    if(window.innerHeight<800) {
      document.body.style.backgroundPosition = "50% -100px"
      if(Opera5) {document.body.style.backgroundAttachment = "scroll";}
      if(window.innerWidth<1000) document.body.style.backgroundPosition = "-140px -100px"
      }
    else {
      document.body.style.backgroundPosition = "center center";
      if(Opera5) {document.body.style.backgroundAttachment = "fixed";}
        if(window.innerWidth<1000) document.body.style.backgroundPosition = "-200px center"      
      }
    if(!IE) {
    dblay = document.getElementById("layout");
    dblay.style.top = window.innerHeight<800 ? "0px" : ((window.innerHeight-800)/2+3+"px");
    dblay.style.left = window.innerWidth<1000 ? "500px" : "50%";
	}
	document.getElementById("left-page").style.visibility = "visible";
	document.getElementById("right-page").style.visibility = "visible";
	document.getElementById("lang").style.visibility = "visible";
	
  }

function toggle(node) {
	for(i=1;i<10;i++)
	if(document.getElementById("list" + i)) {
		myList = document.getElementById("list" + i);
		if(!(node.parentNode.parentNode.parentNode.parentNode==myList||node.parentNode.parentNode.parentNode==myList||node.parentNode.parentNode==myList||node.parentNode==myList)) myList.style.display = 'none';
	}
if(node.parentNode.childNodes[2]) {	
	if(node.parentNode.childNodes[2].style.display!='block')
		node.parentNode.childNodes[2].style.display='block'
	else 
		node.parentNode.childNodes[2].style.display='none';
	}
}

function turn(side) {
var opera = Boolean(window["opera"]);
// IE или не IE, вот в чем вопрос
var MSIE = (navigator.userAgent.indexOf("Microsoft") != -1) || opera;

var flash = MSIE ? window["map"] : document["map"];
//alert(flash);
	if(side=="1") flash.SetVariable("turnLeft", "true");
	if(side=="2") flash.SetVariable("turnRight", "true");
	if(side=="3") flash.SetVariable("turnLeft1", "true");
	if(side=="4") flash.SetVariable("turnRight1", "true");

	var flashPages = document.getElementById("fla-pages");
	flashPages.style.visibility = "visible";
}

function hide() {
	var flashPages = document.getElementById("fla-pages");
	flashPages.style.visibility = "hidden";

}

function setcontent(arrInd) {
	var rC = document.getElementById("right-content");
	rC.innerHTML = newsArr[arrInd];

}
function gotoPage2(page2go) {
	window.location.href = page2go;
	document.URL.href = page2go;
	window.location = page2go;
	setTimeout('gotoPage2("' + page2go + '");',700 );
}
function gotoPage(page2go) {
	window.location.href = page2go;
	document.URL.href = page2go;
	window.location = page2go;
	document.getElementById("right-page").innerHTML = '';
	document.getElementById("left-page").innerHTML = '';
	//alert('test');
	setTimeout('gotoPage2("' + page2go + '");',700 );
	
	
}


function close_start() {
	document.getElementById("start").style.display = 'none';
}

function fl_detect(){
 var d, n = navigator, f = 'Shockwave Flash';
 if((n = n.plugins) && n[f]){d = n[f].description}
 else if (window.ActiveXObject) { try { d = (new ActiveXObject((f+'.'+f).replace(/ /g,''))).GetVariable('$version');} catch (e) { try { new ActiveXObject((f+'.'+f+'.6').replace(/ /g,'')); d='WIN 6,0,21,0';} catch (e) {} }}
 return d ? true : false;
};


if(fl_detect()) {
      DisplayFlash("/ss_vak.swf", "800", "300", "transparent");
}
else {
alert('Внимание !!! Для корректного отображения сайта необходимо установить флеш-плеер.')
}
