// JavaScript Document
//GUI
var browser = navigator.appName;
var platform = navigator.platform;

function initGUI()
{
	if(browser == "Microsoft Internet Explorer")
	{
		
		//Banner Animation Init
		class81w = new Tween(document.getElementById('bannerHead').style,'width',Tween.elasticEaseOut,0,443,4,'px');
		class81h = new Tween(document.getElementById('bannerHead').style,'height',Tween.elasticEaseOut,0,78,4,'px');
		class81w.start();
		class81h.start();
		pkwyNw = new Tween(document.getElementById('pkwyN').style,'width',Tween.elasticEaseOut,0,197,2,'px');
		pkwyNh = new Tween(document.getElementById('pkwyN').style,'height',Tween.elasticEaseOut,0,27,2,'px');
		pkwyNw.start();
		pkwyNh.start();
		
		
		//Button Animation Init
		
		contactsBtnW = new Tween(document.getElementById('classMates_btn').style,'width',Tween.elasticEaseOut,0,128,2.5,'px');
		contactsBtnH = new Tween(document.getElementById('classMates_btn').style,'height',Tween.elasticEaseOut,0,26,2.5,'px');
		contactsBtnPara = new Parallel();
		contactsBtnPara.addChild(contactsBtnH);
		contactsBtnPara.addChild(contactsBtnW);
		//contactsBtnPara.start();
		
		postsBtnW = new Tween(document.getElementById('newsInfo_btn').style,'width',Tween.elasticEaseOut,0,49,3,'px');
		postsBtnH = new Tween(document.getElementById('newsInfo_btn').style,'height',Tween.elasticEaseOut,0,26,3,'px');
		postsBtnPara = new Parallel();
		postsBtnPara.addChild(postsBtnH);
		postsBtnPara.addChild(postsBtnW);
		//postsBtnPara.start();
		
		picsBtnW = new Tween(document.getElementById('photos_btn').style,'width',Tween.elasticEaseOut,0,75,3.5,'px');
		picsBtnH = new Tween(document.getElementById('photos_btn').style,'height',Tween.elasticEaseOut,0,26,3.5,'px');
		picsBtnPara = new Parallel();
		picsBtnPara.addChild(picsBtnH);
		picsBtnPara.addChild(picsBtnW);
		//picsBtnPara.start();
		activeStatic();
	}
	else
	{
		contactsTween = new OpacityTween(document.getElementById('contact'),Tween.strongEaseInOut,100,100,2);
		staticTween = new OpacityTween(document.getElementById('static'),Tween.strongEaseInOut,100,100,2);
		photosTween = new OpacityTween(document.getElementById('photos'),Tween.strongEaseInOut,100,100,2);
		
		
		//Banner Animation Init
		class81w = new Tween(document.getElementById('bannerHead').style,'width',Tween.elasticEaseOut,0,443,4,'px');
		class81h = new Tween(document.getElementById('bannerHead').style,'height',Tween.elasticEaseOut,0,78,4,'px');
		class81w.start();
		class81h.start();
		pkwyNw = new Tween(document.getElementById('pkwyN').style,'width',Tween.elasticEaseOut,0,197,2,'px');
		pkwyNh = new Tween(document.getElementById('pkwyN').style,'height',Tween.elasticEaseOut,0,27,2,'px');
		pkwyNw.start();
		pkwyNh.start();
		
		
		//Button Animation Init
		
		contactsBtnW = new Tween(document.getElementById('classMates_btn').style,'width',Tween.elasticEaseOut,0,128,2.5,'px');
		contactsBtnH = new Tween(document.getElementById('classMates_btn').style,'height',Tween.elasticEaseOut,0,26,2.5,'px');
		contactsBtnPara = new Parallel();
		contactsBtnPara.addChild(contactsBtnH);
		contactsBtnPara.addChild(contactsBtnW);
		contactsBtnPara.start();
		
		postsBtnW = new Tween(document.getElementById('newsInfo_btn').style,'width',Tween.elasticEaseOut,0,49,4,'px');
		postsBtnH = new Tween(document.getElementById('newsInfo_btn').style,'height',Tween.elasticEaseOut,0,26,4,'px');
		postsBtnPara = new Parallel();
		postsBtnPara.addChild(postsBtnH);
		postsBtnPara.addChild(postsBtnW);
		postsBtnPara.start();
		
		picsBtnW = new Tween(document.getElementById('photos_btn').style,'width',Tween.elasticEaseOut,0,75,3.5,'px');
		picsBtnH = new Tween(document.getElementById('photos_btn').style,'height',Tween.elasticEaseOut,0,26,3.5,'px');
		picsBtnPara = new Parallel();
		picsBtnPara.addChild(picsBtnH);
		picsBtnPara.addChild(picsBtnW);
		picsBtnPara.start();
		activeStatic();
	}
}


///////Button Rollover States

//contacts
function contactsRollOver()
{
	contactsBtnH.continueTo(34,.5);
	contactsBtnW.continueTo(170,.5);
	
	
}

function contactsRollOut()
{
	contactsBtnH.continueTo(26,.5);
	contactsBtnW.continueTo(128,.5);
	
}


//posts
function postsRollOver()
{
	postsBtnH.continueTo(35,.5);
	postsBtnW.continueTo(65,.5);	
}

function postsRollOut()
{
	postsBtnH.continueTo(26,.5);
	postsBtnW.continueTo(49,.5);
	
}

//pictures
function picsRollOver()
{
	picsBtnH.continueTo(34,.5);
	picsBtnW.continueTo(104,.5);
	
}

function picsRollOut()
{
	picsBtnH.continueTo(26,.5);
	picsBtnW.continueTo(75,.5);
	
}

//DIV replacement
function activeContacts()
{
	if(browser == "Microsoft Internet Explorer")
	{
		
		contactsBtnH.continueTo(26,.5);
		contactsBtnW.continueTo(128,.5);
	
		document.getElementById('static').style.display = 'none';
		document.getElementById('photos').style.display = 'none';
		document.getElementById('contact').style.display = 'block';
		
	}
	else
	{
		contactsBtnH.continueTo(26,.5);
		contactsBtnW.continueTo(128,.5);
		
		contactsNull = new Tween(new Object(),"",Tween.elasticEaseOut,0,1,.5);
		contactsNull.start();
		contactsTween.continueTo(100,1.5);
		staticTween.continueTo(0,.5);
		photosTween.continueTo(0,.5);
		contactsNull.onMotionFinished = function()
		{
			delete(contactsNull);
			//document.getElementById('contact').style.display = 'inherit';
			document.getElementById('static').style.display = 'none';
			document.getElementById('photos').style.display = 'none';
		}
	}
	
}

function activePhotos()
{
	if(browser == "Microsoft Internet Explorer")
	{
		picsBtnH.continueTo(26,.5);
		picsBtnW.continueTo(75,.5);
		
		document.getElementById('contact').style.display = 'none';
		document.getElementById('static').style.display = 'none';
		document.getElementById('photos').style.display = 'block';
	}
	else
	{
		picsBtnH.continueTo(26,.5);
		picsBtnW.continueTo(75,.5);
		
		photosNull = new Tween(new Object(),"",Tween.elasticEaseOut,0,1,.5);
		photosNull.start();
		
		contactsTween.continueTo(0,.5);
		staticTween.continueTo(0,.5);
		photosTween.continueTo(100,1.5);
		photosNull.onMotionFinished = function()
		{
			delete(photosNull);
			//document.getElementById('contact').style.display = 'none';
			document.getElementById('static').style.display = 'none';
			document.getElementById('photos').style.display = 'inherit';
		}
	}
}

function activeStatic()
{
	if(browser == "Microsoft Internet Explorer")
	{
	
		postsBtnH.continueTo(26,.5);
		postsBtnW.continueTo(49,.5);
		
		document.getElementById('contact').style.display = 'none';
		document.getElementById('photos').style.display = 'none';
		document.getElementById('static').style.display = 'block';	
	}
	else
	{
		postsBtnH.continueTo(26,.5);
		postsBtnW.continueTo(49,.5);
		
		staticNull = new Tween(new Object(),"",Tween.elasticEaseOut,0,1,.5);
		staticNull.start();
		
		contactsTween.continueTo(0,.5);
		staticTween.continueTo(100,1.5);
		photosTween.continueTo(0,.5);
		staticNull.onMotionFinished = function()
		{
			delete(staticNull);
			//document.getElementById('contact').style.display = 'none';
			document.getElementById('static').style.display = 'inherit';
			document.getElementById('photos').style.display = 'none';
		}
	}
}



