function mail(u, s, d, img)
{
var l="ilto";
	if (img == "txt")
		{document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +d+">"+u+"&#64;"+s+ "." +d+"</a>");}
	else
		{document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +d+">"+"<img src=\"../img/"+img+"\" alt=\"E-mail\" /></a>");}
}

function date()
{
site = new Date('November 15, 2006');
d = new Date(); 
date = ((d.getTime() - site.getTime())-(1000*60*60*7)) / (1000*60*60*24); 
document.write(Math.round(date));
}

function men_draw()
{
i=1;
var men = new Array("angel", "rasta", "gentle", "skater", "napoleon", "police", "astro", "elvis", "disco");
var serial_random = new Array();
serial_random[0] = (Math.floor(Math.random() * men.length));
for (i=1; i < men.length; i++)
	{
	j = 0;
	serial_random[i] = (Math.floor(Math.random() * men.length));
	while (j < i)
		{
		if (serial_random[i] == serial_random[j])
			{
		    serial_random[i] = (Math.floor(Math.random() * men.length));
			j=0;
			}
			else
			{j++;}
		}
	}
for (i=1; i <= men.length; i++)
	{
	var rand = (Math.floor(Math.random() * men.length));
	var px = (i-1)*75;
	document.write ("<div style=\"background-image: url('../img/man-"+men[serial_random[i - 1]]+".gif');\" id=\"man"+i+"\" onmouseover=\"javascript: point('"+px+"px', 'man"+i+"');\"></div>");
	}
}

function point(x, man)
{
	document.getElementById("hand").style.marginLeft = x;
	
	//i=1;
	for(i=1; i<=9; i++) document.getElementById("man" + i).style.backgroundPosition = "top";
	
	document.getElementById(man).style.backgroundPosition = "bottom";
}

function resize()
{
point('150px', 'man3')
}

function third()
{
if(!!(document.getElementById("man3"))) document.getElementById('man3').style.backgroundPosition = "bottom"
}
/*
function mail(u, s, d, img)
{
var l="ilto";
	if (img == "txt")
		{document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +d+">"+u+"&#64;"+s+ "." +d+"</a>");}
	else
		{document.write("<a"+" href="+"ma"+l+":"+u+"&#64;"+s+ "." +d+">"+"<img src=\"img/"+img+"\" alt=\"E-mail\" /></a>");}
}
*/
function man_draw()
{
var men = new Array("angel", "rasta", "gentle", "skater", "napoleon", "police", "astro", "elvis", "disco");
var rand = Math.floor(Math.random() * men.length);
document.write ("<div style=\"background-image: url('../img/man-"+men[rand]+".gif');\">&nbsp;</div>");
}

function ill_draw()
{
var ill = new Array("matches", "billyard", "toys", "apples", "pencils", "eggs", "buttons");
var rand = Math.floor(Math.random() * ill.length);
document.write ("<img src=\"../img/ill-"+ill[rand]+".jpg\" alt=\"\" />");
}

window.onresize = resize;
window.onload = third;
