var color = "#ffe5cc";
var left = 0;
var width = 0;
function load(){
fir1 = setInterval('fire()', 100);
var w = eval(document.getElementById('run')).offsetWidth;
document.getElementById('text').style.pixelLeft = w;
left = w;
run1 = setInterval('runing()', 100);
}

function fire(){
	 if(color=="#ffe5cc")
        color = "#FF0000";
     else
     	 color = "#ffe5cc";
     document.getElementById("fir").style.color = color;     
}

function runing(){
isDOM=document.getElementById;
isMozilla=isDOM && navigator.appName=="Netscape";
var w = eval(document.getElementById('run')).offsetWidth;
if(!isMozilla){
if(document.getElementById('text').style.pixelLeft <= w && document.getElementById('text').style.pixelLeft>=0)
	document.getElementById('text').style.pixelLeft -= 5;
else
	document.getElementById('text').style.pixelLeft = w;
}else{
	if(left <= w && left>=0)
	{
		 left -= 5;
	//	 document.getElementById('text').style.display = 'inline';
		 width += 5;
	// 	 document.getElementById('text').style.width  = width;
     	 document.getElementById('text').style.left = left + 'px';
	}
	else
	{
		width = 0;
	//	document.getElementById('text').style.display = 'none';
	// 	document.getElementById('text').style.width = 0;
		left = w;
		document.getElementById('text').style.left = w+'px';
	}
}
}
	
<!-- Begin 
// Set slideShowSpeed (milliseconds) 
function Out(id)
{
setElementOpacity(id, 85/100);
}

function display(elem) {
                if (elem.style.display != "block") { 
                    elem.style.display = "block";
                }
                else {
                    elem.style.display = "none";
                }
                return false;
}
function ok(n)
{
       if(document.forms[n].elements["fname"].value=='')
	      alert('Заполните все поля!');
       else
          document.forms[n].submit();	
}
function del()
{
	var form = document.forms["f2"];
	var ids = '';
for(i=0; i<form.length; i++)
	if(form.elements[i].type=="checkbox"&&form.elements[i].checked)
	{
	if(ids!='') ids += '|';
	ids += form.elements[i].name;
	}
	
	if(ids!='')
	{
var q = 'ids='+ids+'&f=del';
SmartyAjax.update('d2', 'admin.php', 'get', q);
	}	
}



function openWin(url, home, id)
{
     var w = window.open(""+home+"/open.php?img="+url+"&hotel="+id+"", "", "", "resizable=no, scrollbars=yes");
}
function openWin2(url, home, id)
{
     var w = window.open(""+home+"/open2.php?img="+url+"&countries="+id+"", "", "", "resizable=no, scrollbars=yes");
}
function openWin3(url, home, id)
{
     var w = window.open(""+home+"/open3.php?img="+url+"&fire="+id+"", "", "", "resizable=no, scrollbars=yes");
}
function ShowWin(url,x,y,name,isscrollbars) {
	cx=screen.width / 2 - (x / 2);
	cy=(screen.height/2-(y/2));
    
    isscrollbars=(isscrollbars=="no")?"no":"yes";
	window.open(url,name,"toolbar=no,status=no,directories=no,menubar=no,resizable=yes,width="+x+",height="+y+",scrollbars="+isscrollbars+",top="+cy+",left="+cx);
}
function Child(value)
{
var q = "value="+value+"&f=child";
SmartyAjax.update('child', '/index.php', 'get', q);
}

function over(id, col1)
{
document.getElementById(id).style.backgroundColor = col1;
}

function out(id, col2)
{
document.getElementById(id).style.backgroundColor = 'transparent';
}

