// JavaScript Document

// Macromedia Scripts //

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; 
  for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; 
  document.MM_sr=new Array; 
  for(i=0;i<(a.length-2);i+=3)
  
  if ((x=MM_findObj(a[i]))!=null){
    document.MM_sr[j++]=x; 
    if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function MM_findObj(n, d) { //v4.0
  var p,i,x;  
  if(!d) d=document; 

  if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  
  if(!(x=d[n])&&d.all) x=d.all[n]; 
  for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && document.getElementById) x=document.getElementById(n);
  return x;
}

// IE flash plugin solution - Don't have to click on flash content to interact
function fixFlash() {
  theObjects = document.getElementsByTagName("object");
  for (var i = 0; i < theObjects.length; i++) {
    theObjects[i].outerHTML = theObjects[i].outerHTML;
  }
} 

// Intro Script //

function homepageintro() {
	
	// Regular non-flash banner images

	// ae_('<img src="images/home_communication.jpg" alt="Communication" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	// ae_('<img src="images/home_diversity.jpg" alt="Diversity" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	// ae_('<img src="images/home_globalization.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	// ae_('<img src="images/home_technology.jpg" alt="Technology" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	// ae_('<img src="images/home_social_responsibility.jpg" alt="Social Responsibility" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	// ae_('<img src="images/home_teamwork.jpg" alt="Teamwork"  name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	
	// Summer Orientation Flash Elements
	
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	 ae_('<img src="images/home_orientation.jpg" alt="Globalization" name="competency" width="708" height="249" border="0" id="competency" usemap="#competencyMap" />');
	
	// flash banner embeds
	
	var flashBanners = new Array();
	// flashBanners[1] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/communication.swf"><param name="quality" value="high"><embed src="/cob/communication.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	// flashBanners[2] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/diversity.swf"><param name="quality" value="high"><embed src="/cob/diversity.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	// flashBanners[3] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/globalization.swf"><param name="quality" value="high"><embed src="/cob/globalization.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	// flashBanners[4] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/social_responsibility.swf"><param name="quality" value="high"><embed src="/cob/social_responsibility.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	// flashBanners[5] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/teamwork.swf"><param name="quality" value="high"><embed src="/cob/teamwork.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	// flashBanners[6] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/technology.swf"><param name="quality" value="high"><embed src="/cob/technology.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	
	 flashBanners[1] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[2] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-2.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-2.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[3] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-3.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-3.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[4] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-4.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-4.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[5] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-5.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-5.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[6] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-6.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-6.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[7] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-7.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-7.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[8] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-8.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-8.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[9] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-9.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-9.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	 flashBanners[10] = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/orientation06-10.swf"><param name="quality" value="high"><embed src="/cob/flash/orientation06-10.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	
	// var winter = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="708" height="249"><param name="movie" value="/cob/flash/winter06-07.swf"><param name="quality" value="high"><embed src="/cob/winter06-07.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="708" height="249"></embed></object>';
	

	// standard flash pieces
	if (flashFound(my_flash_version, requiredVersion)) {
		document.getElementById('headerImage2').innerHTML = ( flashBanners[rand()] );
	}

	/*	
	// winterim 2007
	if (flashFound(my_flash_version, requiredVersion)) {
	 document.getElementById('headerImage2').innerHTML = winter;
	}	
	*/
}

/*
        -------------------------------------------------------------------------------------------------
        Random Image/Link JavaScript(tm) by Jim Matvichuk

        This code may be used freely as long as this copyright notice
        remains with the code.
        
                        Copyright© 1997, Jim Matvichuk
                        Jim_Matvichuk@compuserve.com
                        All rights reserved

        Last Revision: August 19, 1997  
        -------------------------------------------------------------------------------------------------
        Instructions:
        There are two Script sections on this page to create the
        Random Image/Link. This section (which should be placed between
        your HEAD tags, after the title and any meta tgas) and the section 
        in the body of this document.
 
        You will need both sections to display the Image/link.
   
        Change the array elements:     ae_('your href and/or image');
        in this section AND place the Javascript section in the body of this 
        document between your BODY tags where you want it to appear.

*/

// Global vars----
G_total_sa = 0;                                 // total random elements
G_day = new Date();                             // date for seed
G_seed = G_day.getTime();                       // G_seed for random number


//---CHANGE THESE ARRAY ELEMENTS TO YOUR LINK/IMAGE
//---ADD/SUBTRACT AS MANY AS YOU NEED
// Just replace your URL and image tags between the single quotes:  ae_('   your stuff here   ');

//------------------------------------------------------------------------------------
// Function to Create image/link Object Array
//------------------------------------------------------------------------------------
function ae_ (description) {
        G_total_sa++;
        sa [G_total_sa] = description;
}

//-------------------------------------------------------------------------------------
// function to create a random number from 1 to total number
// of array elements
//-------------------------------------------------------------------------------------
function rand() {
RN = parseInt(((G_seed - (parseInt(G_seed/1000,10) * 1000))/10)/100*G_total_sa + 1,10);
        return RN;
}

///////////////////////////////////////////////////////////////////
// CREATE THE image/link OBJECT ARRAY
function sa () {}


//-->

// Flash Version Detector  v1.2.1
// documentation: http://www.dithered.com/javascript/flash_detect/index.html
// license: http://creativecommons.org/licenses/by/1.0/
// code by Chris Nott (chris[at]dithered[dot]com)
// with VBScript code from Alastair Hamilton (now somewhat modified)
var flashVersion = 0;



function getFlashVersion() {
  var latestFlashVersion = 8;
  var agent = navigator.userAgent.toLowerCase(); 
  
   // NS3 needs flashVersion to be a local variable
   if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
      flashVersion = 0;
   }
  // NS3+, Opera3+, IE5+ Mac (support plugin array):  check for Flash plugin in plugin array
  if (navigator.plugins != null && navigator.plugins.length > 0) {
    var flashPlugin = navigator.plugins['Shockwave Flash'];
    if (typeof flashPlugin == 'object') { 
      for (var i = latestFlashVersion; i >= 3; i--) {
            if (flashPlugin.description.indexOf(i + '.') != -1) {
               flashVersion = i;
               break;
            }
         }
    }
  }

  // IE4+ Win32:  attempt to create an ActiveX object using VBScript
  else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
     var doc = '<scr' + 'ipt language="VBScript"\> \n';
      doc += 'On Error Resume Next \n';
      doc += 'Dim obFlash \n';
      doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
      doc += '   Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
      doc += '   If IsObject(obFlash) Then \n';
      doc += '      flashVersion = i \n';
      doc += '      Exit For \n';
      doc += '   End If \n';
      doc += 'Next \n';
      doc += '</scr' + 'ipt\> \n';
      document.write(doc);
   }
  // WebTV 2.5 supports flash 3
  else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3;

  // older WebTV supports flash 2
  else if (agent.indexOf("webtv") != -1) flashVersion = 2;

  // Can't detect in all other cases
  else {
    flashVersion = flashVersion_DONTKNOW;
  }
  return flashVersion;
}

flashVersion_DONTKNOW = -1;

// required version of the flash player for the flash navigation menu
/*****************************/
var requiredVersion = 0;
/*****************************/

// HTML for a standard no-flash message that can be displayed if Flash is not found
/*****************************/
var no_flash = '<div align="center" style="width:250px; height:215px; background-color:#FFFFFF; padding:10px;"><font face="Arial" size="2" color="#CC0000"><strong>This feature requires the Macromedia Flash Player version 7.</strong></font><br /><br /><font face="Arial" size="2">If you are seeing this message, you either have a lower version of the Flash Player or you do not have it installed.</font><br><br><font face="Arial" size="2"><strong><a href="http://www.macromedia.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" target="_blank">Download the Flash Player</a></strong></font></div>';
/*****************************/


var my_flash_version = getFlashVersion();
var flash_detected = false;

/************ non-flash menu content  ****************/
function flashFound(flashVersion, requiredVersion) {
  if (flashVersion >= requiredVersion) {
    flash_detected = true;
    // write the flash content
    return true;
  } else {
    // you either have a lower version of flash or you don't have it, or the browser can't use javascript to detect it (MAC IE 4.5)
    return false;
  }
}

// Browser Dectection Script //

var BrowserDetect = {
	init: function () {
		this.browser = this.searchString(this.dataBrowser) || "An unknown browser";
		this.version = this.searchVersion(navigator.userAgent)
			|| this.searchVersion(navigator.appVersion)
			|| "an unknown version";
		this.OS = this.searchString(this.dataOS) || "an unknown OS";
	},
	searchString: function (data) {
		for (var i=0;i<data.length;i++)	{
			var dataString = data[i].string;
			var dataProp = data[i].prop;
			this.versionSearchString = data[i].versionSearch || data[i].identity;
			if (dataString) {
				if (dataString.indexOf(data[i].subString) != -1)
					return data[i].identity;
			}
			else if (dataProp)
				return data[i].identity;
		}
	},
	searchVersion: function (dataString) {
		var index = dataString.indexOf(this.versionSearchString);
		if (index == -1) return;
		return parseFloat(dataString.substring(index+this.versionSearchString.length+1));
	},
	dataBrowser: [
		{ 	string: navigator.userAgent,
			subString: "OmniWeb",
			versionSearch: "OmniWeb/",
			identity: "OmniWeb"
		},
		{
			string: navigator.vendor,
			subString: "Apple",
			identity: "Safari"
		},
		{
			prop: window.opera,
			identity: "Opera"
		},
		{
			string: navigator.vendor,
			subString: "iCab",
			identity: "iCab"
		},
		{
			string: navigator.vendor,
			subString: "KDE",
			identity: "Konqueror"
		},
		{
			string: navigator.userAgent,
			subString: "Firefox",
			identity: "Firefox"
		},
		{
			string: navigator.vendor,
			subString: "Camino",
			identity: "Camino"
		},
		{		// for newer Netscapes (6+)
			string: navigator.userAgent,
			subString: "Netscape",
			identity: "Netscape"
		},
		{
			string: navigator.userAgent,
			subString: "MSIE",
			identity: "Explorer",
			versionSearch: "MSIE"
		},
		{
			string: navigator.userAgent,
			subString: "Gecko",
			identity: "Mozilla",
			versionSearch: "rv"
		},
		{ 		// for older Netscapes (4-)
			string: navigator.userAgent,
			subString: "Mozilla",
			identity: "Netscape",
			versionSearch: "Mozilla"
		}
	],
	dataOS : [
		{
			string: navigator.platform,
			subString: "Win",
			identity: "Windows"
		},
		{
			string: navigator.platform,
			subString: "Mac",
			identity: "Mac"
		},
		{
			string: navigator.platform,
			subString: "Linux",
			identity: "Linux"
		}
	]

};
BrowserDetect.init();

// Top Navigation Script //
function option1() {
	
	document.getElementById('item1').style.background = "#a7bcd8";
	document.getElementById('item1').style.color = "#000066";
	
	document.getElementById('item2').style.background = "none";
	document.getElementById('item2').style.color = "#ffffff";

	document.getElementById('item3').style.background = "none";
	document.getElementById('item3').style.color = "#ffffff";
	
	document.getElementById('item4').style.background = "none";
	document.getElementById('item4').style.color = "#ffffff";
	
	document.getElementById('item5').style.background = "none";
	document.getElementById('item5').style.color = "#ffffff";
	
	document.getElementById('cobsubmenu').innerHTML = "";
	}
	
	
function option2() {
	
	document.getElementById('item2').style.background = "#a7bcd8";
	document.getElementById('item2').style.color = "#000066";
	
	if(BrowserDetect.browser=="Firefox" && BrowserDetect.OS=="Windows"  || BrowserDetect.browser=="Opera" || BrowserDetect.browser=="Safari") {
		document.getElementById('cobsubmenu').innerHTML = "<ul><li><a href='/cob/essentials_ce/community_members/community_noncredit.htm'>NON-CREDIT/CEU Students</a></li><li><a href='/cob/essentials_ce/community_members/community_credit.htm'>CREDIT Students</a></li><li><a href='/cob/essentials_ce/community_members/community_schedule.htm'>Course Schedule</a></li><li><a href='/cob/essentials_ce/community_members/community_courses.htm'>Course Descriptions</a></li><li><a href='/cob/essentials_ce/community_members/index.htm'>Overview</a></li></ul>";
	}
	if(BrowserDetect.browser=="Explorer") {
		document.getElementById('cobsubmenu').innerHTML = "<ul><li style='margin-top: -1px;'><a href='/cob/essentials_ce/community_members/community_noncredit.htm'>NON-CREDIT/CEU Students</a></li><li style='margin-top: -13px;'><a href='/cob/essentials_ce/community_members/community_credit.htm'>CREDIT Students</a></li><li style='margin-top: -13px;'><a href='/cob/essentials_ce/community_members/community_schedule.htm'>Course Schedule</a></li><li style='margin-top: -13px;'><a href='/cob/essentials_ce/community_members/community_courses.htm'>Course Descriptions</a></li><li style='margin-top: -13px;'><a href='/cob/essentials_ce/community_members/index.htm'>Overview</a></li></ul>";
	}
	if(BrowserDetect.browser=="Firefox" && BrowserDetect.OS=="Mac" || BrowserDetect.browser=="Camino" && BrowserDetect.OS=="Mac") {
		document.getElementById('cobsubmenu').innerHTML = "<ul><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/community_members/community_noncredit.htm'>NON-CREDIT/CEU Students</a></li><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/community_members/community_credit.htm'>CREDIT Students</a></li><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/community_members/community_schedule.htm'>Course Schedule</a></li><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/community_members/community_courses.htm'>Course Descriptions</a></li><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/community_members/index.htm'>Overview</a></li></ul>";
	}
	
	document.getElementById('item1').style.background = "none";
	document.getElementById('item1').style.color = "#ffffff";

	document.getElementById('item3').style.background = "none";
	document.getElementById('item3').style.color = "#ffffff";
	
	document.getElementById('item4').style.background = "none";
	document.getElementById('item4').style.color = "#ffffff";
	
	document.getElementById('item5').style.background = "none";
	document.getElementById('item5').style.color = "#ffffff";
	

	}
	
function option3() {
	
	document.getElementById('item3').style.background = "#a7bcd8";
	document.getElementById('item3').style.color = "#000066";
	
	if(BrowserDetect.browser=="Firefox" && BrowserDetect.OS=="Windows"  || BrowserDetect.browser=="Opera" || BrowserDetect.browser=="Safari") {
		document.getElementById('cobsubmenu').innerHTML = "<ul><li><a href='/cob/essentials_ce/online_classes/technology_req.htm'>Technology Requirements</a></li><li><a href='/cob/essentials_ce/online_classes/index.htm'>Overview</a></li></ul>";
	}
	if(BrowserDetect.browser=="Explorer") {
		document.getElementById('cobsubmenu').innerHTML = "<ul><li style='margin-top: -1px;'><a href='/cob/essentials_ce/online_classes/technology_req.htm'>Technology Requirements</a></li><li style='margin-top: -13px;'><a href='/cob/essentials_ce/online_classes/index.htm'>Overview</a></li></ul>";
	}
	if(BrowserDetect.browser=="Firefox" && BrowserDetect.OS=="Mac" || BrowserDetect.browser=="Camino" && BrowserDetect.OS=="Mac") {
		document.getElementById('cobsubmenu').innerHTML = "<ul><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/online_classes/technology_req.htm'>Technology Requirements</a></li><li><a style='padding-bottom: 6px;' href='/cob/essentials_ce/online_classes/index.htm'>Overview</a></li></ul>";
	}
	
	document.getElementById('item1').style.background = "none";
	document.getElementById('item1').style.color = "#ffffff";

	document.getElementById('item2').style.background = "none";
	document.getElementById('item2').style.color = "#ffffff";
	
	document.getElementById('item4').style.background = "none";
	document.getElementById('item4').style.color = "#ffffff";
	
	document.getElementById('item5').style.background = "none";
	document.getElementById('item5').style.color = "#ffffff";
	
	
	}
	
function option4() {
	
	document.getElementById('item4').style.background = "#a7bcd8";
	document.getElementById('item4').style.color = "#000066";
	
	document.getElementById('item1').style.background = "none";
	document.getElementById('item1').style.color = "#ffffff";

	document.getElementById('item2').style.background = "none";
	document.getElementById('item2').style.color = "#ffffff";
	
	document.getElementById('item3').style.background = "none";
	document.getElementById('item3').style.color = "#ffffff";
	
	document.getElementById('item5').style.background = "none";
	document.getElementById('item5').style.color = "#ffffff";
	
	document.getElementById('cobsubmenu').innerHTML = "";
	}
	
function option5() {
	
	document.getElementById('item5').style.background = "#a7bcd8";
	document.getElementById('item5').style.color = "#000066";
	
	document.getElementById('item1').style.background = "none";
	document.getElementById('item1').style.color = "#ffffff";
	
	document.getElementById('item2').style.background = "none";
	document.getElementById('item2').style.color = "#ffffff";

	document.getElementById('item3').style.background = "none";
	document.getElementById('item3').style.color = "#ffffff";
	
	document.getElementById('item4').style.background = "none";
	document.getElementById('item4').style.color = "#ffffff";
	
	document.getElementById('cobsubmenu').innerHTML = "";
	}

if(BrowserDetect.browser=="Explorer") {
	document.getElementById('mainmenu2').style.margin = "-13px 0 0 0";
	document.getElementById('mainmenu3').style.margin = "-13px 0 0 0";
	document.getElementById('mainmenu4').style.margin = "-13px 0 0 0";
	document.getElementById('mainmenu5').style.margin = "-13px 0 0 0";
}

function offoption1() {

}
function offoption2() {

}
function offoption3() {

}
function offoption4() {

}
function offoption5() {

}

function clearallmenu() {
	document.getElementById('item1').style.background = "none";
	document.getElementById('item1').style.color = "#ffffff";

	document.getElementById('item2').style.background = "none";
	document.getElementById('item2').style.color = "#ffffff";
	
	document.getElementById('item3').style.background = "none";
	document.getElementById('item3').style.color = "#ffffff";
	
	document.getElementById('item4').style.background = "none";
	document.getElementById('item4').style.color = "#ffffff";
	
	document.getElementById('item5').style.background = "none";
	document.getElementById('item5').style.color = "#ffffff";
	
	document.getElementById('cobsubmenu').innerHTML = "";
}


document.getElementById('cobsubmenu').style.display = "Block";
document.getElementById('cobsubmenu').innerHTML = "";
//<div style='padding: 5px;'>You're using "+BrowserDetect.browser+" "+BrowserDetect.version+" (OS: "+BrowserDetect.OS+")</div>

// Cookie's Script.  These are useful for RSVPs

function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}

// CSS Fixes //

/***

Notes on using the browserdetect function

Browser Types
* Firefox
* Camino
* Safari
* Opera
* Explorer (IE)

OS's
* Mac
* Linux
* Win

Versions
* All you have to do is find out the 

For information on the browser your using go to "http://www.uwec.edu/cob/browserdata.htm"

***/

if(BrowserDetect.browser=="Firefox" && BrowserDetect.OS=="Mac") {
	document.getElementById('cobsubmenu').style.height = "23px";
	document.getElementById('cobsubmenu').style.overflow = "hidden"
	document.getElementById('cobsubmenu').style.margin = "1px 0 0 0";
}

if(BrowserDetect.browser=="Firefox" && BrowserDetect.version=="3" && BrowserDetect.OS=="Mac") {
	document.getElementById('cobsubmenu').style.height = "23px";
	document.getElementById('cobsubmenu').style.overflow = "hidden"
	document.getElementById('cobmenu').style.marginTop = "7px";
	
	
	document.getElementById('cobsubmenu').style.marginTop = "0px";
	document.getElementById('qp').style.height = "18px";
}

if(BrowserDetect.browser=="Camino" && BrowserDetect.OS=="Mac") {
	document.getElementById('cobsubmenu').style.height = "23px";
	document.getElementById('cobsubmenu').style.overflow = "hidden"
	document.getElementById('cobsubmenu').style.margin = "1px 0 0 0";
}
if(BrowserDetect.browser=="Safari" && BrowserDetect.OS=="Mac") {
	document.getElementById('qt').style.height = "18px";
	document.getElementById('qt').style.width = "150px";
	document.getElementById('qp').style.margin = "1px 0 0 0";
}
if(BrowserDetect.browser=="Safari" && BrowserDetect.OS=="Windows") {
	document.getElementById('qp').style.margin = "1px 0 0 0";
}
if(BrowserDetect.browser=="Opera") {
	document.getElementById('qp').style.height = "18px";
}
if(BrowserDetect.browser=="Explorer" && BrowserDetect.version=="6") {
	document.getElementById('qp').style.height = "18px";
	document.getElementById('qp').style.border = "none";
	document.getElementById('qp').style.margin = "-1px -1px 0 0";
	document.getElementById('cobmenu').style.margin = "7px 0 0 40px";
	document.getElementById('search').style.width = "226px";
}
if(BrowserDetect.browser=="Explorer" && BrowserDetect.version=="7") {
	document.getElementById('qp').style.height = "18px";
	document.getElementById('qp').style.border = "none";
}