// open windows
function studentopen(which) {
   window.name = "MDCCMAIN";
   ht= "550";
   wd ="750"
   msg=open(which+"&newwin=Y","MDCCSTUDENT","toolbar=no,location=no,directories=no,status=yes,menubar=no,scrollbars=yes,resizable=yes,alwaysRaised=yes,copyhistory=no,width="+wd+",height="+ht);
   msg.focus();
 }

function mmLoadMenus() {
  if (window.mm_menu_0823121455_0) return;
//Ingles.NivelBasico
    window.mm_menu_0908155951_0_1 = new Menu("Catálogo",140,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,true,true);
    mm_menu_0908155951_0_1.addMenuItem("Inglés"+"&nbsp;"+"Básico"+"&nbsp;"+"Nivel"+"&nbsp;"+"1","location='ingles_basico1.asp'");
    mm_menu_0908155951_0_1.addMenuItem("Inglés"+"&nbsp;"+"Básico"+"&nbsp;"+"Nivel"+"&nbsp;"+"2","location='ingles_basico2.asp'");
    mm_menu_0908155951_0_1.addMenuItem("Inglés"+"&nbsp;"+"Básico"+"&nbsp;"+"Nivel"+"&nbsp;"+"3","location='ingles_basico3.asp'");
    mm_menu_0908155951_0_1.addMenuItem("Inglés"+"&nbsp;"+"Básico"+"&nbsp;"+"Nivel"+"&nbsp;"+"4","location='ingles_basico4.asp'");
     mm_menu_0908155951_0_1.hideOnMouseOut=true;
     mm_menu_0908155951_0_1.bgColor='#FFFFFF';
     mm_menu_0908155951_0_1.menuBorder=0;
     mm_menu_0908155951_0_1.menuLiteBgColor='#006699';
     mm_menu_0908155951_0_1.menuBorderBgColor='#FFFFFF';
  window.mm_menu_0908155951_0 = new Menu("root",140,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,true,true);
  mm_menu_0908155951_0.addMenuItem(mm_menu_0908155951_0_1,"location='#'");
  mm_menu_0908155951_0.addMenuItem("Ejemplos"+"&nbsp;"+"de"+"&nbsp;"+"lecciones","window.open('ingles_basico_ejemplo_load.html','ejemplo','toolbar=no,status=no,scrollbars=no,width=640,height=480,resizable=no')");
  mm_menu_0908155951_0.addMenuItem("Gu&iacute;a"+"&nbsp;"+"de"+"&nbsp;"+"ubicaci&oacute;n","location='ingles_ubicacion.asp'");

   mm_menu_0908155951_0.hideOnMouseOut=true;
   mm_menu_0908155951_0.childMenuIcon="img/arrows.gif";
   mm_menu_0908155951_0.bgColor='#FFFFFF';
   mm_menu_0908155951_0.menuBorder=0;
   mm_menu_0908155951_0.menuLiteBgColor='#336699';
   mm_menu_0908155951_0.menuBorderBgColor='#FFFFFF';

//Ingles.Intermedio
   window.mm_menu_0908155159_0_1 = new Menu("Catálogo",155,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,true,true);
    mm_menu_0908155159_0_1.addMenuItem("Inglés"+"&nbsp;"+"Intermedio"+"&nbsp;"+"Nivel"+"&nbsp;"+"1","location='ingles_nivel1.asp'");
    mm_menu_0908155159_0_1.addMenuItem("Inglés"+"&nbsp;"+"Intermedio"+"&nbsp;"+"Nivel"+"&nbsp;"+"2","location='ingles_nivel2.asp'");
    mm_menu_0908155159_0_1.addMenuItem("Inglés"+"&nbsp;"+"Intermedio"+"&nbsp;"+"Nivel"+"&nbsp;"+"3","location='ingles_nivel3.asp'");
    mm_menu_0908155159_0_1.addMenuItem("Inglés"+"&nbsp;"+"Intermedio"+"&nbsp;"+"Nivel"+"&nbsp;"+"4","location='ingles_nivel4.asp'");
	mm_menu_0908155159_0_1.addMenuItem("Inglés"+"&nbsp;"+"Intermedio"+"&nbsp;"+"Nivel"+"&nbsp;"+"5","location='ingles_nivel5.asp'");
     mm_menu_0908155159_0_1.hideOnMouseOut=true;
     mm_menu_0908155159_0_1.bgColor='#FFFFFF';
     mm_menu_0908155159_0_1.menuBorder=0;
     mm_menu_0908155159_0_1.menuLiteBgColor='#336699';
     mm_menu_0908155159_0_1.menuBorderBgColor='#FFFFFF';
  window.mm_menu_0908155159_0 = new Menu("root",140,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,true,true);
  mm_menu_0908155159_0.addMenuItem(mm_menu_0908155159_0_1,"location='#'");
  mm_menu_0908155159_0.addMenuItem("Pruebe"+"&nbsp;"+"una"+"&nbsp;"+"lección","window.open('ingles_prueba.htm','newwin','toolbar=yes,status=no,scrollbars=yes,width=750,height=500,resizable=yes')");
  mm_menu_0908155159_0.addMenuItem("Examen"+"&nbsp;"+"de"+"&nbsp;"+"ubicación","location='ingles_examen.asp'");
   mm_menu_0908155159_0.hideOnMouseOut=true;
   mm_menu_0908155159_0.childMenuIcon="img/arrows.gif";
   mm_menu_0908155159_0.bgColor='#FFFFFF';
   mm_menu_0908155159_0.menuBorder=0;
   mm_menu_0908155159_0.menuLiteBgColor='#336699';
   mm_menu_0908155159_0.menuBorderBgColor='#FFFFFF';

//Tecnologia e Informatica 
  window.mm_menu_0823121455_0_1 = new Menu("Catálogo",165,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,false,true);
    mm_menu_0823121455_0_1.addMenuItem("Comercio Electr&oacute;nico","location='tech_comercio.asp'");
	mm_menu_0823121455_0_1.addMenuItem("Creaci&oacute;n de P&aacute;ginas Web","location='tech_web.asp'");
    mm_menu_0823121455_0_1.addMenuItem("Introducci&oacute;n a Excel","location='tech_excel.asp'");
    mm_menu_0823121455_0_1.addMenuItem("Introducci&oacute;n a Internet","location='tech_internet.asp'");
	mm_menu_0823121455_0_1.addMenuItem("Introducci&oacute;n a PowerPoint","location='tech_pp.asp'");
	mm_menu_0823121455_0_1.addMenuItem("Introducci&oacute;n a Word","location='tech_word.asp'");
	mm_menu_0823121455_0_1.addMenuItem("Programaci&oacute;n Java 2","location='tech_java.asp'");
	mm_menu_0823121455_0_1.addMenuItem("QuickBooks","location='comercio_quickbooks.asp'");
     mm_menu_0823121455_0_1.hideOnMouseOut=true;
     mm_menu_0823121455_0_1.bgColor='#FFFFFF';
     mm_menu_0823121455_0_1.menuBorder=0;
     mm_menu_0823121455_0_1.menuLiteBgColor='#336699';
     mm_menu_0823121455_0_1.menuBorderBgColor='#FFFFFF';
  window.mm_menu_0823121455_0 = new Menu("root",140,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,false,true);
  mm_menu_0823121455_0.addMenuItem(mm_menu_0823121455_0_1,"location='#'");
  mm_menu_0823121455_0.addMenuItem("Orientación","window.open('http://www.ed2go.com/cgi-bin/spanoic/orient.cgi?name=cuv', '_blank');");
  mm_menu_0823121455_0.addMenuItem("Pruebe una lección","window.open('http://www.ed2go.com/spandemo/','newwin','toolbar=yes,status=no,scrollbars=yes,width=750,height=500,resizable=yes')");
   mm_menu_0823121455_0.hideOnMouseOut=true;
   mm_menu_0823121455_0.childMenuIcon="img/arrows.gif";
   mm_menu_0823121455_0.bgColor='#FFFFFF';
   mm_menu_0823121455_0.menuBorder=0;
   mm_menu_0823121455_0.menuLiteBgColor='#336699';
   mm_menu_0823121455_0.menuBorderBgColor='#FFFFFF';
   
       //seminarios
      window.mm_menu_0428092238_0 = new Menu("root",120,18,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",3,0,200,-5,7,true,true,true,0,true,true);
//  mm_menu_0428092238_0.addMenuItem("Internet&nbsp;Explorer&nbsp;5.0","location='semi_ie5.asp'");
//  mm_menu_0428092238_0.addMenuItem("Microsoft&nbsp;Office","location='semi_office.asp'");
  mm_menu_0428092238_0.addMenuItem("MS&nbsp;Access","location='semi_access.asp'");
  mm_menu_0428092238_0.addMenuItem("MS&nbsp;Excel","location='semi_excel.asp'");
//  mm_menu_0428092238_0.addMenuItem("MS&nbsp;FrontPage","location='semi_frontpage.asp'");
  
  mm_menu_0428092238_0.addMenuItem("MS&nbsp;Outlook","location='semi_outlook.asp'");
  mm_menu_0428092238_0.addMenuItem("MS&nbsp;PowerPoint","location='semi_powerpoint.asp'");
//  mm_menu_0428092238_0.addMenuItem("MS&nbsp;Windows","location='semi_windows.asp'");
  mm_menu_0428092238_0.addMenuItem("MS&nbsp;Word","location='semi_word.asp'");
  
//  mm_menu_0428092238_0.addMenuItem("Netscape&nbsp;Communicator&nbsp;4.5","location='semi_netscape.asp'");
//  mm_menu_0428092238_0.addMenuItem("Notes 5.0","location='semi_notes.asp'");
   mm_menu_0428092238_0.hideOnMouseOut=true;
   mm_menu_0428092238_0.bgColor='#FFFFFF';
   mm_menu_0428092238_0.menuBorder=0;
   mm_menu_0428092238_0.menuLiteBgColor='#FFFFFF';
   mm_menu_0428092238_0.menuBorderBgColor='#000000';

//Comercio y empresas   
   window.mm_menu_0907134122_0 = new Menu("root",160,20,"",12,"#006699","#006699","#D4E2EB","#C7E3D7","left","middle",4,0,200,-5,7,true,true,true,0,true,true);
  mm_menu_0907134122_0.addMenuItem("Atención&nbsp;al&nbsp;Cliente","location='comercio_servicio.asp'");
//  mm_menu_0907134122_0.addMenuItem("Contabilidad","location='comercio_count.asp'");
  mm_menu_0907134122_0.addMenuItem("Equipos&nbsp;Exitosos","location='comercio_equipos.asp'");
  mm_menu_0907134122_0.addMenuItem("Entrevistas&nbsp;Laborales","location='comercio_inter.asp'");
//  mm_menu_0907134122_0.addMenuItem("Introducción&nbsp;a&nbsp;Quickbooks","location='comercio_quickbooks.asp'");
//  mm_menu_0907134122_0.addMenuItem("Liderazgo,&nbsp;Comunicación...","location='comercio_lider.asp'");
//  mm_menu_0907134122_0.addMenuItem("Negociación&nbsp;Profesional","location='comercio_negociacion.asp'");
//  mm_menu_0907134122_0.addMenuItem("Oratoria&nbsp;Profesional","location='comercio_oratoria.asp'");
//  mm_menu_0907134122_0.addMenuItem("Organización&nbsp;de&nbsp;Eventos","location='comercio_events.asp'");
   mm_menu_0907134122_0.hideOnMouseOut=true;
   mm_menu_0907134122_0.bgColor='#FFFFFF';
   mm_menu_0907134122_0.menuBorder=0;
   mm_menu_0907134122_0.menuLiteBgColor='#336699';
   mm_menu_0907134122_0.menuBorderBgColor='#FFFFFF';

mm_menu_0823121455_0.writeMenus();
} // mmLoadMenus()


// BUTTON URL ACTION
function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}

// ********************************************************

// FIX LAYER COMPARTIBILITY ISSUE 
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);

// ********************************************************

// CHANGE TEXT OF LAYER
function MM_setTextOfLayer(objName,x,newText) { //v4.01
  if ((obj=MM_findObj(objName))!=null) with (obj)
    if (document.layers) {document.write(unescape(newText)); document.close();}
    else innerHTML = unescape(newText);
}

// ********************************************************

// SHOW AND HIDE LAYERS
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 view() { //v6.0
  var i,p,v,obj,args=view.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}

// ********************************************************

// SWAP IMAGE
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.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_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];}
}

// ********************************************************

// FADE IMAGE
function high(which2){theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){clearInterval(highlighting)
if (which2.style.MozOpacity)which2.style.MozOpacity=0.5
else if (which2.filters)which2.filters.alpha.opacity=50
}
function highlightit(cur2){
if (cur2.style.MozOpacity<1)cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)cur2.filters.alpha.opacity+=10
else if (window.highlighting)clearInterval(highlighting)}

<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
//-->
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

// ********************************************************

// EXPANDABLE CONTENT!!!

/***********************************************
* Switch Content script- © Dynamic Drive (www.dynamicdrive.com)
* This notice must stay intact for legal use. Last updated Mar 23rd, 2004.
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/

var enablepersist="off" //Enable saving state of content structure using session cookies? (on/off)
var collapseprevious="yes" //Collapse previously open content when opening present? (yes/no)

var contractsymbol='- ' //HTML for contract symbol. For image, use: <img src="whatever.gif">
var expandsymbol='+ ' //HTML for expand symbol.


if (document.getElementById){
document.write('<style type="text/css">')
document.write('.switchcontent{display:none;}')
document.write('</style>')
}

function getElementbyClass(rootobj, classname){
var temparray=new Array()
var inc=0
for (i=0; i<rootobj.length; i++){
if (rootobj[i].className==classname)
temparray[inc++]=rootobj[i]
}
return temparray
}


function contractcontent(omit){
var inc=0
while (ccollect[inc]){
if (ccollect[inc].id!=omit)
ccollect[inc].style.display="none"
inc++
}
}

function expandcontent(curobj, cid){
var spantags=curobj.getElementsByTagName("SPAN")
var showstateobj=getElementbyClass(spantags, "showstate")
if (ccollect.length>0){
if (collapseprevious=="yes")
contractcontent(cid)
document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "none"
if (showstateobj.length>0){ //if "showstate" span exists in header
if (collapseprevious=="no")
showstateobj[0].innerHTML=(document.getElementById(cid).style.display=="block")? contractsymbol : expandsymbol
else
revivestatus()
}
}
}

function revivecontent(){
contractcontent("omitnothing")
selectedItem=getselectedItem()
selectedComponents=selectedItem.split("|")
for (i=0; i<selectedComponents.length-1; i++)
document.getElementById(selectedComponents[i]).style.display="block"
}

function revivestatus(){
var inc=0
while (statecollect[inc]){
if (ccollect[inc].style.display=="block")
statecollect[inc].innerHTML=contractsymbol
else
statecollect[inc].innerHTML=expandsymbol
inc++
}
}

function get_cookie(Name) { 
var search = Name + "="
var returnvalue = "";
if (document.cookie.length > 0) {
offset = document.cookie.indexOf(search)
if (offset != -1) { 
offset += search.length
end = document.cookie.indexOf(";", offset);
if (end == -1) end = document.cookie.length;
returnvalue=unescape(document.cookie.substring(offset, end))
}
}
return returnvalue;
}

function getselectedItem(){
if (get_cookie(window.location.pathname) != ""){
selectedItem=get_cookie(window.location.pathname)
return selectedItem
}
else
return ""
}

function saveswitchstate(){
var inc=0, selectedItem=""
while (ccollect[inc]){
if (ccollect[inc].style.display=="block")
selectedItem+=ccollect[inc].id+"|"
inc++
}

document.cookie=window.location.pathname+"="+selectedItem
}

function do_onload(){
uniqueidn=window.location.pathname+"firsttimeload"
var alltags=document.all? document.all : document.getElementsByTagName("*")
ccollect=getElementbyClass(alltags, "switchcontent")
statecollect=getElementbyClass(alltags, "showstate")
if (enablepersist=="on" && ccollect.length>0){
document.cookie=(get_cookie(uniqueidn)=="")? uniqueidn+"=1" : uniqueidn+"=0" 
firsttimeload=(get_cookie(uniqueidn)==1)? 1 : 0 //check if this is 1st page load
if (!firsttimeload)
revivecontent()
}
if (ccollect.length>0 && statecollect.length>0)
revivestatus()
}

if (window.addEventListener)
window.addEventListener("load", do_onload, false)
else if (window.attachEvent)
window.attachEvent("onload", do_onload)
else if (document.getElementById)
window.onload=do_onload

if (enablepersist=="on" && document.getElementById)
window.onunload=saveswitchstate

// ------------------------------- END 

var http = AJAX();

// XMLHttpRequest function to initiate request object
function AJAX(){ 
	var http = false;
	/*@cc_on @*/
	/*@if (@_jscript_version >= 5)
	try {
		http = new ActiveXObject("Msxml2.XMLHTTP");
	} catch (e) {
		try {
			http = new ActiveXObject("Microsoft.XMLHTTP");
		} catch (E) {
			http = false;
		}
	}
	@end @*/
	if (!http && typeof XMLHttpRequest!='undefined') {
		http = new XMLHttpRequest();
	}
	return http;
}


/* Get Content */
function getContent(subc, cid){
		http.open('get', 'courseMenu.asp?sub=' + subc + '&cid=' + cid);
		http.onreadystatechange = handleContent;
		http.send(null);
}

/* Function called to handle the list that was returned from the internal_request.php file.. */
function handleContent(){
	if(http.readyState == 4){
		var response = http.responseText;
		document.getElementById('courseMenu').innerHTML = response;
	}
}