
var n0 = 'kom_dm1.jpg';
var n1 = 'kom_sm2.jpg';
var n2 = 'kom_gm3.jpg';
var n3 = 'kom_im4.jpg';
var n4 = 'kom_sp5.jpg';
var mySL = [n0,n1,n2,n3,n4];
var D_img1,D_img2,D_bg;
var poz = 0;
var op = 1.;
var num = 0;
 
function Beg_home1()          
{  
	D_img = document.getElementById("id_img");
		D_img.style.left = "100px";
	
	D_bg  = document.getElementById("id_bg");
		D_bg.style.background = "url(uploads/cge_new/img/" + mySL[4] + ")";
}

function Beg_home()          
{  
	D_img1 = document.getElementById("id_img1");
	D_img2 = document.getElementById("id_img2");
	D_bg  = document.getElementById("id_bg");
	setTimeout("home_s()",2000); 
}

function home_s() 
{
    if(poz <210)
	{
		poz += 2;
		D_img1.style.left = poz + "px";
		setTimeout("home_s()", 1);
	}
	else
	{
		D_img2.src = D_img1.src;
		num ++;
		D_img1.src = "uploads/cge_new/img/" + mySL[num];
		D_img1.style.left = "0px";
		if(num == 4) { num = -1; }
		D_bg.style.background = "url(uploads/cge_new/img/" + mySL[num+1] + ") no-repeat";
		poz = 0;
		setTimeout("home_s()", 2000);
	}
}        
/*
function home_s() 
{
    if(poz <200)
	{
		poz += 1;
		op -= 0.005;
		D_img.style.left = poz + "px";
		D_img.style.opacity = op;
		setTimeout("home_s()", 1);
	}
	else
	{
		num ++;
		D_img.src = "../uploads/cge_new/img/" + mySL[num];
		D_img.style.opacity = 1;
		D_img.style.left = "0px";
		if(num == 3) { num = -1; }
		D_bg.style.background = "url(../uploads/cge_new/img/" + mySL[num+1] + ") no-repeat";
		poz = 0;
		op = 1.;
		setTimeout("home_s()", 2000);
	}
}        
*/


