var CurrentDB='/sf/sfgr_bd001.nsf/'; function mail(){ var notesdbname = "/sf/sfgr_bd001.nsf/"; // window.location.href=notesdbname +"fBuscarSeccion?OpenForm&dn=4"; window.location.href="mailto:graduado@ulima.edu.pe"; } function GaleriaFotos(){ var features = 'toolbar=no,status=no,resizable=no,location=no,menubar=no,personalbar=no,scrollbars=no,titlebar=no,directories=no'; window.open( CurrentDB + 'vGaleriaFotosWeb?Openview', 'galeriafotos','width=488,height=382,'+ features); } function changeLevel(){ var vista = window.document.forms[0].vista.value; if ( vista == "vConvocatoriaWebEspecialidad" ) { var opt_array = changeLevel.arguments[0].split('.'); var doclevel = opt_array.length; var newopt = ''; for ( var j=0; j<=doclevel-1; j++ ) { newopt = newopt + opt_array[j] + '.'; } newopt = newopt.substring(0, newopt.lastIndexOf('.') ); // elimina ultimo punto newopt = newopt.substring( newopt.indexOf('.')+1 ); // elimina primer rubro } return newopt; } function rtrParent(){ var aux = rtrParent.arguments[0].lastIndexOf('.'); var b = rtrParent.arguments[0]; b = b.substring(0,aux); return b; } function changeExpColl( opt , currentSel ) { var fg =false ; // true: expand , false : collapse var opt1 = opt.split('.'); var cs1 = currentSel.split('.'); var urltxt = window.location.href; if ( currentSel == "" || currentSel == null ) { if ( urltxt.indexOf( 'ExpandView' ) >=0 ) { return false; } else { return true; } } else { if ( opt1.length > cs1.length ) { if ( opt.indexOf( currentSel ) == 0 ) { fg = true; } } if ( opt1.length == cs1.length ) { if ( opt == currentSel ) { if ( urltxt.indexOf( '&Expand=' ) >=0 ) { fg = false; } else { fg = true; } } else { fg = true; } } if ( opt1.length < cs1.length ) { if ( currentSel.indexOf( opt ) == 0 ) { fg = false; } else { fg = true; } } } return fg; } function ExpColl(){ var vista = window.document.forms[0].vista.value; var opt = changeLevel( ExpColl.arguments[0] ); var currentSel = window.document.forms[0].currentSel.value; var urlstr = window.document.location.href; var sw_exp = changeExpColl( opt , currentSel ) ? "&Expand=" : "&Collapse="; var db = ExpColl.arguments[1] == null || ExpColl.arguments[1] == "" ? CurrentDB : ExpColl.arguments[1]; var pathinfo1 = ""; var rtc = ""; if ( vista == "vConvocatoriaWebEspecialidad") { pathinfo1 = ''; db = CurrentDB; } var bookmark = "#bm_" + ExpColl.arguments[0]; window.document.location.href = db + vista + "?OpenView" + sw_exp + ExpColl.arguments[0] + bookmark; //alert(db + vista + "?OpenView" + sw_exp +bookmark); } function replaceBullets(){ var opt = window.document.forms[0].currentSel.value; var currentSel = window.document.forms[0].currentSel.value; var currentSelp2 = currentSel.substring(0, currentSel.lastIndexOf('.')); var hs = window.document.location.hash.substr(4); var urlstr = window.document.location.href; var level = currentSel.split('.').length; var vista = window.document.forms[0].vista.value var r_tmp_txt = urlstr.indexOf('&Expand=') >=0 ? hs : hs != '' ? hs + '.' + currentSelp2 : ''; var i = 0; var r_image = urlstr.indexOf('&Expand=') >=0 ? 'expand.gif' : 'collapse.gif'; if ( urlstr.indexOf( 'ExpandView' ) >= 0 ) { while ( document.images.length -1>= i ) { if ( document.images[i].name.indexOf( 'bt_' ) >=0 ) { // encuentra las viñetas document.images[i].src = CurrentDB + "imagenes/" + "expand.gif" + "?OpenImageResource"; } i++ }} else { while ( document.images.length -1 >= i && currentSel != "" ) { if ( document.images[i].name.indexOf( 'bt_' ) >=0 ) { // encuentra las viñetas tmp_txt = ( vista == "vConvocatoriaWebEspecialidad" ) ? 'bt_' + r_tmp_txt : 'bt_' + opt; if ( document.images[i].name == tmp_txt ) { if ( level == 1 ) { document.images[i].src = CurrentDB + "imagenes/" + r_image + "?OpenImageResource"; } } if ( tmp_txt.indexOf( document.images[i].name ) == 0 ) { if ( tmp_txt.length > document.images[i].name.length ) { if ( compara( document.images[i].name.substr(3) , tmp_txt.substr(3) ) ) { document.images[i].src = CurrentDB + "imagenes/" + 'expand.gif' + "?OpenImageResource"; } } else { document.images[i].src = CurrentDB + "imagenes/" + r_image + "?OpenImageResource"; } } } i++; }} } function AbrirFichaB(){ var url = AbrirFichaB.arguments[0]; window.document.location.href = url; } function SeleccionaMes(){ obj = SeleccionaMes.arguments[0]; window.document.location.href = obj.value; } function MsgBox(){ switch ( MsgBox.arguments[0] ) { case "0" : alert('Esta opción está deshabilitada debido a que Usted\nno ha ingreso aún al sistema.\nPara hacerlo, digite su usuario y contraseña\nen los recuadros ubicados en la sección de\nLOGIN.'); break; } } function MuestraCalendario(){ var firstDoc = ''; var vista = 'CalendarioTuristico'; if ( firstDoc != "0" ) { window.document.location.href = CurrentDB + vista + '/' + firstDoc + '?OpenDocument'; } } function SeleccionaMes(){ var obj = SeleccionaMes.arguments[0]; var idx = obj.selectedIndex; var valmes = obj.options[idx].value; if ( eval( valmes ) > 0 ) { window.document.location.href= CurrentDB + SeleccionaMes.arguments[1] + '/' + valmes + '?OpenDocument'; } } function setValue(){ var optsel = setValue.arguments[0]; // valor seleccionado var obj = setValue.arguments[1]; // formulario var objSelect = setValue.arguments[2]; // objeto combo mes var setval = false; var i = 0; while ( !setval && objSelect.length >= i ) { if ( objSelect.options[i].value == optsel ) { setval = true; } i = i +1; } objSelect.selectedIndex = i-1; } function CustomLogin(){ var usr = CustomLogin.arguments[0]; var pwd = CustomLogin.arguments[1]; var obj = CustomLogin.arguments[2]; if ( usr == null || usr == "" || pwd == null || pwd == "" ) { alert('Usted debe ingresar su usuario y contraseña'); } else { obj.submit(); } } function SeleccionaPais(){ var obj = SeleccionaPais.arguments[0]; var idx = obj.selectedIndex; var valmes = obj.options[idx].value; window.document.location.href= CurrentDB + SeleccionaPais.arguments[1] + '?OpenView&RestrictToCategory=' + valmes; } function BecaDocente(){ var urlobj = BecaDocente.arguments[0]; var dn = window.document.forms[0].dn.value; window.document.location.href= urlobj + '&dn=' + dn; } function PromocionesxRubro(){ window.document.location.href=window.document.forms[0].rubroUrl.value + '?OpenNavigator&RestrictToCategory=' + PromocionesxRubro.arguments[0]; }; function detallePromocion(){ window.document.location.href=window.document.forms[0].rubroUrl.value + "/" + detallePromocion.arguments[0] + "?Opendocument"; };