Function IsCollectionWindow(element) if varType(self.opener.document.form.elements(element)) = 9 then IsCollectionWindow = true else IsCollectionWindow = false end if End function Function IsCollection(element) if varType(document.form.elements(element)) = 9 then IsCollection = true else IsCollection = false end if End function Function ChangeAction() document.form.action= document.form.object.value+".asp?" document.form.submit End Function Function BotonOver(id,color1,color2) dim botonid botonid = document.getElementsByName(id) botonid.style.backgroundColor="" botonid.style.borderleft="1 solid "&color1 botonid.style.bordertop="1 solid "&color1 botonid.style.borderright="1 solid "&color2 botonid.style.borderbottom="1 solid "&color2 botonid.style.paddingLeft="0 px" botonid.style.paddingTop="0 px" botonid.style.paddingRight="1 px" botonid.style.paddingBottom="1 px" End function Function BotonOut(id,color1,color2) dim botonid botonid = document.getElementsByName(id) botonid.style.backgroundColor="" botonid.style.borderleft="0 solid" botonid.style.bordertop="0 solid " botonid.style.borderright="0 solid " botonid.style.borderbottom="0 solid " botonid.style.paddingLeft="1 px" botonid.style.paddingTop="1 px" botonid.style.paddingRight="2 px" botonid.style.paddingBottom="2 px" End Function Function BotonDown(id,color1,color2,fondo) dim botonid botonid = document.getElementsByName(id) botonid.style.backgroundColor=fondo botonid.style.borderleft="1 solid "&color2 botonid.style.bordertop="1 solid "&color2 botonid.style.borderright="1 solid "&color1 botonid.style.borderbottom="1 solid "&color1 botonid.style.paddingLeft="1 px" botonid.style.paddingTop="1 px" botonid.style.paddingRight="0 px" botonid.style.paddingBottom="0 px" End function Function AddFavorite() vWinCal = window.open("/srmed/Enviroments/AddFavorite.asp", "AddFavorite", "width=400,height=200,status=yes,resizable=yes,top=200,left=200") End Function Function Change_Oldfile() DIM fin fin=InStrRev(Document.all.NEWFILE.Value,"\") Document.all.FILE.value=Mid(Document.all.NEWFILE.Value,fin+1) Document.form.senal.value=1 End Function Function changeFilter(pagina) Document.form.pagina.value=pagina Document.form.submit End function Function promoDate(campo) promo = document.getElementsByName("itemPromote") obj1 = document.getElementsByName("itemPublicationDate") if promo.checked or cdias<>0 then if IsDate(campo.value) then x1 = CDate(campo.value) x2 = CDate(obj1.value) if x1>x2 then ret = true else msgbox "Fecha inválida",vbCritical campo.focus() ret = false end if else if trim(campo.value)<>"" then msgbox "Fecha inválida",vbCritical campo.focus() ret = false else if cdias<>0 then campo.value = DateAdd("d", cdias, obj1.value) else campo.value = "" end if ret = true end if end if else campo.value="" ret = true end if promoDate = ret End Function