var i=-75, j=-75;
var delay=10; //10-20 ms is optimal interval
var ls, rs;

function logo_rotator()
{
	var code = new Array(
	"<img class=\'logo\' id=\'eye\' src=\'/design/logo_eye.png\' alt=\'Guess Who\' />",
	"<img class=\'logo\' id=\'skull\' src=\'/design/logo_skull.png\' alt=\'Guess Who\' />",
	"<img class=\'logo\' id=\'ges_hu\' src=\'/design/logo_ges_hu.png\' alt=\'Guess Who\' />",
	"<img class=\'logo\' id=\'ilgw\' src=\'/design/logo_ilgw.png\' alt=\'Guess Who\' />"
	);
	
	var rand = Math.floor(Math.random() * code.length);
	document.write (code[rand]);
}

function postman(u, s)
{
	var l="ilto";
	document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +"com.ua"+">"+u+"&#64;"+s+ "." +"com.ua"+"</a>");
}

function eget(id)
{
	if (document.all)
	{
		var el = document.getElementById(id) ? document.getElementById(id) : document.all[id];
	}
	else
	{
		var el = document.getElementById(id);
	}

	if (el)
	{
		return el;
	}
	else
	{
		return null;
	}
}

function lh()
{
	if (ls=="s")
	{
		eget("shot_l").style.left=i + "px";
		if (i<-25)
		{
			i=i+5;
			setTimeout("lh()", delay);
		}
	}
	else if (ls=="e")
	{
		eget("shot_l").style.left=i + "px";

		if (i>-75)
		{
			i=i-5;
			setTimeout("lh()",delay);
		}
	}
}

function rh()
{
	if (rs=="s")
	{
		eget("shot_r").style.left=j + "px";
		if (j>-125)
		{
			j=j-5;
			setTimeout("rh()", delay);
		}
	}
	else if (rs=="e")
	{
		eget("shot_r").style.left=j + "px";

		if (j<-75)
		{
			j=j+5;
			setTimeout("rh()",delay);
		}
	}
}


function lhs()
{
	if (ls=='s') {} else { ls='s'; lh(); }
}

function lhe()
{
	if (ls=='e') {} else { ls='e'; lh(); }
}

function rhs()
{
	if (rs=='s') {} else { rs='s'; rh(); }
}


function rhe()
{
	if (rs=='e') {} else { rs='e'; rh(); }
}