var css1 = 'a {color:#a2a2a2; text-decoration:none} a:hover {color:#ffffff; text-decoration:none}';
var css2 = 'a {color:#ffffff; text-decoration:none} a:hover {color:#ffffff; text-decoration:none}';

var css3 = 'a {text-decoration:none;color:#272727;} a:hover {color:#272727;}';
var css4 = 'a {text-decoration:none;color:#c9c9c9;} a:hover {color:#272727;}';

function expandHeader()
{
	document.getElementById('header').className = "expand";
	
	document.cookie = 'headerOpen=1; expires=Thu, 2 Aug 2010 20:47:11 UTC; path=/'

	// if the header is stored as closed. load the sIFRs
	if (initialstate == 0)
	{
		/*
		sIFR.replace(calendarFont, {
		selector: 'h1'
		,css: [
		  '.sIFR-root { text-align: left; color:#696969;cursor:pointer;vertical-align:middle }',
		  'a { color:#696969;text-decoration:none;cursor:pointer}',
		  'a:hover { color:#696969;text-decoration:none;cursor:pointer}'
		]
		,wmode:'transparent'
		,selectable: false
		,fitExactly:true
	  ,forceWidth:true
	  ,tuneHeight:11
	  ,offsetTop:8});
		
		sIFR.replace(menuTitleFont, {
    selector: 'h6'
    ,css: [
      '.sIFR-root { text-align: left; color:#a2a2a2 }' 
	  ,'a {text-decoration:none;color:#c9c9c9;}'
	  ,'a:hover {color:#272727;}'
	  ,'.activated {color:#272727}'
	  ,'a.activated {color:#272727}'
    ]
   ,wmode:'transparent'}); */

	}
	
	//alert($.x_multiply(3,4););
	//alert(x_page_saveHeaderState('1'));
}

function collapseHeader()
{
	document.getElementById('header').className = "collapse";
	//alert(x_page_saveHeaderState('0'));
	document.cookie = 'headerOpen=0; expires=Thu, 2 Aug 2010 20:47:11 UTC; path=/'
//	alert($.x_multiply(3,2);
}

function gotoPage(url)
{
	document.location = url;
}

var currentCalendarPage = 1;
var newId;

var myLoadedTabs = new Array();
myLoadedTabs[1] = true;

function fadeOut(nId)
{
	if (currentCalendarPage != nId)
	{	
		newId = nId;
		
		//rollOutTab(currentCalendarPage);
		//rollOverTab(newId);
		
		//opacityTweenA = new OpacityTween(document.getElementById('calendarPage'+currentCalendarPage),Tween.strongEaseOut, 100, 0, 1);
		//opacityTweenA.onMotionFinished = fadeIn;
		fadeIn();
		//opacityTweenA.start();
	}
}

function fadeIn()
{
	
	document.getElementById('calendarPage'+currentCalendarPage).style.display='none';
	document.getElementById('calendarPage'+newId).style.display='block';
/*
	if (myLoadedTabs[newId]==undefined)
	{
		sIFR.replace(calendarFont, {
			selector: '#calendarPage'+newId+' h1'
			,css: [
			  '.sIFR-root { text-align: left; color:#696969;cursor:pointer;vertical-align:middle }',
			  'a { color:#696969;text-decoration:none;cursor:pointer}',
			  'a:hover { color:#696969;text-decoration:none;cursor:pointer}'
			]
			,wmode:'transparent'
			,selectable: false
			,fitExactly:true
		  ,forceWidth:true
		  ,tuneHeight:11
		  ,offsetTop:8});
	}

	myLoadedTabs[newId] = true;
*/	
	//opacityTweenB = new OpacityTween(document.getElementById('calendarPage'+newId),Tween.strongEaseOut, 0, 100, 1);
	//opacityTweenB.start();
	currentCalendarPage = newId;
}

function callCalendar()
{
	var requiredMajorVersion = 9;var requiredMinorVersion = 0;var requiredRevision = 28;
	// Version check for the Flash Player that has the ability to start Player Product Install (6.0r65)
	var hasProductInstall = DetectFlashVer(6, 0, 65);

// Version check based upon the values defined in globals
var hasRequestedVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);

if ( hasProductInstall && !hasRequestedVersion ) {
	// DO NOT MODIFY THE FOLLOWING FOUR LINES
	// Location visited after installation is complete if installation is required
	var MMPlayerType = (isIE == true) ? "ActiveX" : "PlugIn";
	var MMredirectURL = window.location;
    document.title = document.title.slice(0, 47) + " - Flash Player Installation";
    var MMdoctitle = document.title;
	var MMvars = window.location.split("#")[1];
	
	AC_FL_RunContent(
		"src", "/coursecalendar/playerProductInstall",
		"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
		"width", "860",
		"height", "800",
		"align", "middle",
		"id", "CourseCalendar",
		"quality", "high",
		"bgcolor", "#efefef",
		"name", "CourseCalendar",
		"allowScriptAccess","sameDomain",
		"type", "application/x-shockwave-flash",
		"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
} else if (hasRequestedVersion) {
	// if we've detected an acceptable version
	// embed the Flash Content SWF when all tests are passed
	AC_FL_RunContent(
			"src", "/coursecalendar/CourseCalendar",
			"width", "860",
			"height", "800",
			"align", "middle",
			"id", "CourseCalendar",
			"quality", "high",
			"bgcolor", "#efefef",
			"name", "CourseCalendar",
			"allowScriptAccess","sameDomain",
			"type", "application/x-shockwave-flash",
			"pluginspage", "http://www.adobe.com/go/getflashplayer"
	);
  } else {  // flash is too old or we can't detect the plugin
    var alternateContent = 'Alternate HTML content should be placed here. '
  	+ 'This content requires the Adobe Flash Player. '
   	+ '<a href=http://www.adobe.com/go/getflash/>Get Flash</a>';
    document.write(alternateContent);  // insert non-flash content
  }
// -->
}