<!--

/**  All of the below code is the default Dreamweaver transform and swap functions.  Also included are a few sparse functions that are used through out the site.  **/

function go2()
{
//window.location=document.ql.Dropdown.options[document.ql.Dropdown.selectedIndex].value
window.open(document.ql.Dropdown.options[document.ql.Dropdown.selectedIndex].value, 'newWin');
}

function GroupJump(site)
{
  parent.mainFrame.location.href=site;
}

function openWindow(url, w, h, sb) {
  var options = "width=" + w + ",height=" + h + ",";
  options += "resizable=no, status=no,";
  options += "menubar=no, toolbar=no, location=no, directories=no,";
  options += "scrollbars=" + sb;
  var newWin = window.open(url, 'newWin', options);
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

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_preloadImages() { //v3.0
  var d=document; 

  if(d.images){ 
    if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; 
    for(i=0; i<a.length; i++)
     
    if (a[i].indexOf("#")!=0){ 
      d.MM_p[j]=new Image; 
      d.MM_p[j++].src=a[i];}
  }
}

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;
}

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];}
}


/************ browser / system detection  ****************/
// used for non-flash navigation
var detect = navigator.userAgent.toLowerCase();
var OS,browser,version,total,thestring;

function checkIt(string) {
	place = detect.indexOf(string) + 1;
	thestring = string;
	return place;
}

if (checkIt('safari')) {
  browser = "Safari";
} else if (checkIt('opera')) {
  browser = "Opera";
} else if (checkIt('msie')) {
  browser = "Internet Explorer";
} else if (!checkIt('compatible')) {
	browser = "Netscape Navigator";
	version = detect.charAt(8);
} else {
	browser = false;
}

if (!version) version = detect.charAt(place + thestring.length);

if (!OS) {
	if (checkIt('linux')) {
		OS = "Linux";
	} else if (checkIt('mac')) {
		OS = "Mac";
	} else if (checkIt('win')) {
		OS = "Windows";
	} else { 
	  OS = "an unknown operating system";
	}
}

// checks browsers to determin which css class to use...
// on the subGlobal links (placement from top varies from browser to browser
function useMacOrMoz() {
	if (OS == 'Mac') {
		 if (browser == 'Netscape Navigator' || browser == 'Safari') {
			return true;
		 }
	} else if (OS == 'Windows' && browser == 'Netscape Navigator') {
	  return true;
	} else {
	  return false;
	}
}

// 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;
  }
} 

/************ non-flash menu functions  ****************/
var time = 3000;

// number of subnav menu items for the page
/* The subglobal menus must begin with global link1 and carry linearly through the global links. This means that even if you only want subglobal menus for global link2 and 4, you must still have empty subglobal divisions for global link1 and 3, as well as a total of four menu items. */
/* So if you have 5 global nav items, but only 3 of them have subnav menus, numofitems must be 5 */
var numofitems = 5;
// the top and bottom y positions of the navigation bar, so that when your mouse exits that area, the subnav will be hidden again
var menuYmin = 75;
var menuYmax = 170;

//menu constructor
function menu(allitems,thisitem,startstate){ 
  callname= "gl"+thisitem;
  divname="subglobal"+thisitem;  
  this.numberofmenuitems = numofitems;
  this.caller = document.getElementById(callname);
  this.thediv = document.getElementById(divname);
  this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
  // set all the subnav items to hidden
  for (var i=1; i<= theobj.numberofmenuitems; i++){
    var shutdiv =eval( "menuitem"+i+".thediv");
    shutdiv.style.visibility="hidden";
  }
  // set the selected subnav item to visible
  theobj.thediv.style.visibility="visible";
}

// close a subnav menu item
function closesubnav(event){
  // if the y position of the mouse is not in the area of the navigation bar
  if (flash_detected == false) {
    if ((event.clientY < menuYmin)||(event.clientY > menuYmax)){
      for (var i=1; i <= numofitems; i++){
        var shutdiv =eval('menuitem'+i+'.thediv');
        shutdiv.style.visibility='hidden';
      }
    }
  }
}

function isDefined(property) {
  return (typeof property != 'undefined');
}

function createMenuItems() {
  if (flash_detected == false) {
    for(var i=1;i<=numofitems;i++) { 
      window["menuitem"+i] = new menu(numofitems,i,"hidden"); 
      //document.writeln(numofitems);
    }
  } 
}

// 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;
  }
}

/************ non-flash menu content  ****************/
function writeNavigationMenu(flashVersion, requiredVersion) {
  if (flashVersion >= requiredVersion) {
    flash_detected = true;
    // write the flash content
    document.writeln("<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=\"54\">");
      document.writeln("<param name=\"movie\" value=\"/cob/images/navigation.swf\">");
      document.writeln("<param name=\"quality\" value=\"high\">");
      document.writeln("<embed src=\"/cob/images/navigation.swf\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"708\" height=\"54\"></embed>");
    document.writeln("</object>");
  } 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)
    document.writeln("<div id=\"navigation\">	");
    document.writeln("  <div id=\"globalNav\">  ");  
    document.writeln("  <div id=\"globalLink\"> ");
    document.writeln("    <a href=\"/cob/info/index.htm\" id=\"gl1\" class=\"glink\" onmouseover=\"ehandler(event,menuitem1);\">&raquo; college information</a>");
    document.writeln("    <a href=\"/cob/academics/index.htm\" id=\"gl2\" class=\"glink\" onmouseover=\"ehandler(event,menuitem2);\">&raquo; academics</a>");
    document.writeln("    <a href=\"/cob/departments/index.htm\" id=\"gl3\" class=\"glink\" onmouseover=\"ehandler(event,menuitem3);\">&raquo; departments</a>");
    document.writeln("    <a href=\"/cob/technology/index.htm\" id=\"gl4\" class=\"glink\" onmouseover=\"ehandler(event,menuitem4);\">&raquo; technology</a>");
    document.writeln("    <a href=\"/cob/make_a_connection/index.htm\" id=\"gl5\" class=\"glink\" onmouseover=\"ehandler(event,menuitem5);\">&raquo; make a connection</a>");
    document.writeln("  </div>	");
    document.writeln("  <!--end globalLinks--> ");
    document.writeln("  </div>	");
    document.writeln("  <!-- end globalNav --> ");
		if (useMacOrMoz()) {
      document.writeln("  <div id=\"subglobal1\" class=\"subglobalNav_mac\"> ");
		} else {
			document.writeln("  <div id=\"subglobal1\" class=\"subglobalNav\">");
		}
    document.writeln("  »<a href=/cob/info/about_us.htm> About Us</a>  ");
    document.writeln("  »<a href=/cob/info/mission_vision.htm> Mission/Vision</a>  ");
    document.writeln("  »<a href=/cob/info/eau_claire_advantage.htm> The Eau Claire Advantage</a>  ");
    document.writeln("  »<a href=/cob/info/news_events.htm> News & Events</a>  ");
    document.writeln("  »<a href=/cob/info/cob_directory.htm> COB Directory</a>  ");
	  document.writeln("  »<a href=/cob/info/contact_us.htm> Contact Us</a>  ");
    document.writeln("  </div>	");
		if (useMacOrMoz()) {
      document.writeln("  <div id=\"subglobal2\" class=\"subglobalNav_mac\"> ");
		} else {
			document.writeln("  <div id=\"subglobal2\" class=\"subglobalNav\"> ");
		}
    document.writeln("  »<a href=/cob/academics/undergraduate/index.htm> Undergraduate</a>  ");
    document.writeln("  »<a href=/cob/academics/mba/index.htm> MBA</a>  ");
    document.writeln("  »<a href=/cob/academics/leadership/index.htm> Leadership</a>  ");
    document.writeln("  »<a href=/cob/departments/management_marketing/entrepreneur/index.htm> Entrepreneur</a>  ");
    document.writeln("  »<a href=/cob/academics/international/index.htm> International Business</a> ");
    document.writeln("  </div>	");
		if (useMacOrMoz()) {
      document.writeln("  <div id=\"subglobal3\" class=\"subglobalNav_mac\"> ");
		} else {
			document.writeln("  <div id=\"subglobal3\" class=\"subglobalNav\"> ");
		}
    document.writeln("  »<a href=/cob/departments/accounting_finance/index.htm> Accounting & Finance</a>  ");
    document.writeln("  »<a href=/cob/departments/business_communication/index.htm> Business Communication</a>  ");
    document.writeln("  »<a href=/cob/departments/management_marketing/index.htm> Management & Marketing</a>  ");
    document.writeln("  »<a href=/cob/departments/is/index.htm> Information Systems</a>  ");
    document.writeln("  </div>	");
		if (useMacOrMoz()) {
      document.writeln("  <div id=\"subglobal4\" class=\"subglobalNav_mac\"> ");
		} else {
			document.writeln("  <div id=\"subglobal4\" class=\"subglobalNav\"> ");
		}
    document.writeln("  »<a href=/cob/technology/about_us.htm> About Us</a>  ");
    document.writeln("  »<a href=/cob/technology/cob_labs/index.htm> COB Labs</a>  ");
    document.writeln("  »<a href=/cob/technology/cyber_labs.htm> Cyberlabs</a>  ");
    document.writeln("  »<a href=/cob/technology/computing_recommendations.htm> Computing Recommendations</a>  ");
    document.writeln("  »<a href=/cob/technology/mobile_computing/index.htm> Mobile Computing Program</a>  ");
    document.writeln("  »<a href=/cob/technology/tech_resources.htm> Tech Resources</a> ");
    document.writeln("  </div> ");
		if (useMacOrMoz()) {
      document.writeln("  <div id=\"subglobal5\" class=\"subglobalNav_mac\"> ");
		} else {
			document.writeln("  <div id=\"subglobal5\" class=\"subglobalNav\"> ");
		}
    document.writeln("  »<a href=/cob/make_a_connection/for_alumni.htm> For Alumni</a>  ");
		document.writeln("  »<a href=/cob/make_a_connection/for_the_community.htm> For the Community</a>  ");
		document.writeln("  »<a href=/cob/make_a_connection/support_the_cob/index.htm> Support the COB</a>  ");
    document.writeln("  </div>	");
    document.writeln("</div>	");
  }
}


/*
        -------------------------------------------------------------------------------------------------
        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 () {}


//-->
