// JavaScript Document
	//var id = ' ';
	var AllLI = new Array();//для лев меню
	var count = 0;
	var rrr = ' ';
function opacity(id, opacStart, opacEnd, millisec) { 
    //alert(id);
	//speed for each frame 
    var speed = Math.round(millisec / 100); 
    var timer = 0; 

    //determine the direction for the blending, if start and end are the same nothing happens 
    if(opacStart > opacEnd) { 
        for(i = opacStart; i >= opacEnd; i--) {
			time=timer * speed;
            setTimeout("changeOpac(" + i + ",'" + id + "')",time); 
            timer++; 
        } //End cycle "for"
    } else if(opacStart < opacEnd) { 
        alert("Должно быть затухание, т.е. первый параметр больше второго");
    }//End "else if" 
} //End "function opacity"

//change the opacity for different browsers 
function changeOpac(op, id) { 
    var object = document.getElementById(id).style; 
    var tt=op;
	var tt1=tt/101;
	object.opacity = (op/101); 
    object.MozOpacity = (op/101); 
    object.KhtmlOpacity = (op/101); 
    object.filter = "alpha(opacity=" + op + ")";
	//alert(tt);
}

function show() {
 AllLI = document.getElementById('navLeft').getElementsByTagName("LI");// для лев меню
 newImg = new Image();
 newImg.src=im_url+"main_BGR.jpg";
 rrr=newImg.src;
 wait()
}

function wait() { 
 if (!newImg.complete) { 
   count+=1;
   var ID = setTimeout("wait()", 500) 
 } else switchOK()
} 

function switchOK() { 
 //alert(rrr);
 window.document.getElementById("MainBgr").style.backgroundImage="url("+rrr+")";
opacity('ScreenBgr',100,0,5000);

} 



function invisLI(){
	//AllLI = document.getElementById('navLeft').getElementsByTagName("LI");
	for (var i=0; i<AllLI.length; i++) {
		AllLI[i].className=AllLI[i].className.replace(/ show/g, " hide");
		}//end for
	}//end function invisLI

function invAll(){
	invisLI();
	document.getElementById('Line_cnt').className='hide';
	document.getElementById('Line_lft').className='hide';
	document.getElementById('Line_rig').className='hide';
	}//end function invAll

function ShowLeftM(pointer) {
	var group = pointer.className;
	visLine(group);
	for (var i=0; i<AllLI.length; i++) {
		
		if (AllLI[i].className.search(group)>=0){
			AllLI[i].className=AllLI[i].className.replace(/ hide/, " show")}
			else {
				AllLI[i].className=AllLI[i].className.replace(/ show/, " hide")};//end if совпало
		}//end for
	}//end function ShowLeftM
	
function visLine(pointer){
	document.getElementById('Line_cnt').className='show';
	document.getElementById('Line_lft').className='show';
	document.getElementById('Line_rig').className='show';
	switch(pointer){
			case "about" :
			document.getElementById('Line_lft').style.top="191px";
			document.getElementById('Line_rig').style.top="12px";
			break
			case "work" :
			document.getElementById('Line_lft').style.top="181px";
			document.getElementById('Line_rig').style.top="35px";
			break
			case "publ" :
			document.getElementById('Line_lft').style.top="168px";
			document.getElementById('Line_rig').style.top="58px";
			break
	}//end switch
	}//end function visLine