var p=1;
var z=0;
//var begin=setInterval('changeImg()',3999);
var rand_no_x;
var rand_no_y;
var rand_no_x2;
var rand_no_y2;
var site;
var placement=1;

function hide()
{
	$("#slideshow").hide();
	$("#slideshow2").hide();
}

function boxChange()
{
	$("#content").animateToClass("content1", 500).animateToClass("content2", 500);	
}

//function moveImg()
//{
//	rand_no_x = Math.floor((500)*Math.random());
//	rand_no_y = Math.floor((200)*Math.random());
//	String(rand_no_x);
//	String(rand_no_y);
//	document.getElementById('slideshow').style.left=rand_no_x+'px';
//	document.getElementById('slideshow').style.top=rand_no_y+'px';
//	Number(rand_no_x);
//	Number(rand_no_y);
//	
//	rand_no_x2 = Math.floor((500)*Math.random());
//	rand_no_y2 = Math.floor((200)*Math.random());
//	
//	while (z==0)
//	{
//		if (rand_no_x2 < (rand_no_x+200) && (rand_no_x2+200)>rand_no_x)
//		{
//			rand_no_x2 = Math.floor((500)*Math.random());
//			rand_no_y2 = Math.floor((200)*Math.random());
//		}
//		else
//		{
//			z=1;
//		}
//		
//	}
//	z=0;
//	String(rand_no_x2);
//	String(rand_no_y2);
//	document.getElementById('slideshow2').style.left=rand_no_x2+'px';
//	document.getElementById('slideshow2').style.top=rand_no_y2+'px';
//	Number(rand_no_x2);
//	Number(rand_no_y2);
//}


function leave()
{
		$("#content").animateToClass("content1", 500).animateToClass("content", 500);
		setTimeout("window.open(site, '_self')", 1000);
}

function toCareer()
{
	$("#content").animateToClass("content3", 1000);	
	$("#career").animateToClass("content4", 1000);
}

function toContact()
{
	$("#content").animateToClass("content4", 1000);
	$("#career").animateToClass("content3", 1000);
}
	
function spotSwitch()
{
	if (placement==-1)
	{
		document.getElementById('slideshow').style.top="10px"
		document.getElementById('slideshow2').style.top="190px"
		placement = 1;
	}
	else
	{
		document.getElementById('slideshow').style.top="190px"
		document.getElementById('slideshow2').style.top="10px"
		placement = -1;
	}
}