var browse, servyt, servyb, count=0, timwelc, let, preloadFlag = false, tjpopwindow;

window.onunload = closepopup;
var ie = document.all ? 1 : 0;

function newImage(arg) 
{
	if (document.images) 
	{
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() 
{
	if (document.images && (preloadFlag == true)) 
	{
		for (var i=0; i<changeImages.arguments.length; i+=2) 
		{
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}

function preloadImagesg() 
{
	if (document.images) 
	{
		triangle_over = newImage("images/triangle-over.gif");
		preloadFlag = true;
	}
}

function welc(letr)
{
 if (letr == 1)
 {
    let = document.getElementById("idw");
    if (count == 0)
    {
       logopic = newImage("images/logo.jpg");
       let.style.zIndex=10;
       let.style.left = 390 + "px";
    }
    count = count + 1;
    if (count < 90)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(1)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("ide");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(2)",1);
    }
 }
 else
 if (letr == 2)
 {
    let = document.getElementById("ide");
    count = count + 1;
    if (count < 86)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(2)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("idl");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(3)",1);
    }
 }
 else
 if (letr == 3)
 {
    let = document.getElementById("idl");
    count = count + 1;
    if (count < 81)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(3)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("idc");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(4)",1);
    }
 }
 else
 if (letr == 4)
 {
    let = document.getElementById("idc");
    count = count + 1;
    if (count < 78)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(4)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("ido");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(5)",1);
    }
 }
 else
 if (letr == 5)
 {
    var let = document.getElementById("ido");
    count = count + 1;
    if (count < 73)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(5)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("idm");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(6)",1);
    }
 }
 else
 if (letr == 6)
 {
    let = document.getElementById("idm");
    count = count + 1;
    if (count < 68)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(6)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("ide2");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(7)",1);
    }
 }
 else
 if (letr == 7)
 {
    let = document.getElementById("ide2");
    count = count + 1;
    if (count < 61)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(7)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("idt");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(8)",1);
    }
 }
 else
 if (letr == 8)
 {
    let = document.getElementById("idt");
    count = count + 1;
    if (count < 47)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(8)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("ido2");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(9)",1);
    }
 }
 else
 if (letr == 9)
 {
    let = document.getElementById("ido2");
    count = count + 1;
    if (count < 43)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(9)",1);
    }
    else
    {
       count = 0;
       let = document.getElementById("idco");
       let.style.zIndex=10;
       let.style.left = 400 + "px";
       timwelc = setTimeout("welc(10)",1);
    }
 }
 else
 if (letr == 10)
 {
    let = document.getElementById("idco");
    count = count + 1;
    if (count < 39)
    {
      let.style.left = (parseInt(let.style.left) - 3) + "px";
      timwelc = setTimeout("welc(10)",1);
    }
    else
    {
      count = 0;
      timwelc = setTimeout("welc(11)",1000);
    }
  }
 else
 if (letr == 11)
 {
    if (count == 0)
    {
      document.getElementById("idlogopic").src="images/logo.jpg";
      count = 1;
      timwelc = setTimeout("welc(11)",4000);
    }
    else
    {
      clearTimeout(timwelc);
      location.href="index.php";
     }
  }
}
function showvert(ind)
{
  if (ind == 1)
  {
     document.getElementById("idpic").style.visibility="hidden";
     document.getElementById("idvertpic").style.zIndex=10;
  }
  else
  {
     document.getElementById("idpic").style.visibility="visible";
     document.getElementById("idvertpic").style.zIndex=5;
  }
}

function tjpopup(popurl)
{
   if (tjpopwindow != null) tjpopwindow.close();
   tjpopwindow= window.open(popurl, "", "top=5, left=5, width=795, height=570, scrollbars, resizable");
}

function closepopup()
{
  if(tjpopwindow != null) tjpopwindow.close();
}