// JavaScript Document
<!--
var OSName="Unknown OS";
if (navigator.appVersion.indexOf("Mac")!=-1) OSName="MacOS";
if (navigator.appVersion.indexOf("Win")!=-1) OSName="Windows";
if (navigator.appVersion.indexOf("X11")!=-1) OSName="UNIX";
if (navigator.appVersion.indexOf("Linux")!=-1) OSName="Linux";

if (OSName=="MacOS")
if(navigator.appName.indexOf("Microsoft") != -1)
document.location = "http://teachingcommons.cdl.edu/sec/error.html";

function MM_openBrWindow(theURL) { //v2.0
  var win=window.open(theURL,'merlot','toolbar=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes,width=900,height=600');
  
  win.focus();
}

function searchFixForm() {
       searchForm = document.forms["simpleSearchForm"];
       var url = '';
       if (searchForm["type"].value == "fedsearch") {
           // We are doing the federated search
           url = "http://fedsearch.merlot.org/fedsearch/fedsearch2.jsp?MERLOT=MERLOT&NSDL=NSDL&searchterms=" + escape(searchForm["keywords"].value);
           //window.location = url;
 	    //	 var fsWin = window.open(url, "fedSearch");
       } else {
           // The search the materials or the members search
           if (searchForm["type"].value == "members") {
               url = "http://www.merlot.org/merlot/members.htm?";
           } else {
               url = "http://www.merlot.org/merlot/materials.htm?";
           }
           url += "community=" + escape(searchForm["community"].value);
           url += "&keywords=" + escape(searchForm["keywords"].value);
        //   window.location = url;
       }
      var msWind = window.open(url, "MerlotSearch", 'height=600, width=900, toolbar=yes, menubar=yes, scrollbars=yes, resizable=yes, location=yes, directories=yes, status=yes');
 }


function MM_openBrWindowDrop(theURL) { //v2.0
  var win=window.open(theURL,'merlot','toolbar=yes,location=yes,menubar=yes,scrollbars=yes,resizable=yes');
  
  win.focus();
}


function dropdown(mySel)
{
var myWin, myVal;
myVal = mySel.options[mySel.selectedIndex].value;
if(myVal)
   {
   if(mySel.form.target)myWin = parent[mySel.form.target];
   else myWin = window;
   if (! myWin) return true;
   MM_openBrWindowDrop(myVal);
   }
return false;
}



function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

function MM_findObj(n, d) { //v4.01
  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 && d.getElementById) x=d.getElementById(n); return x;
}

function MM_jumpMenuGo(selName,targ,restore){ //v3.0
  var selObj = MM_findObj(selName); if (selObj) MM_jumpMenu(targ,selObj,restore);
}
//-->