<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% 'set Server.ScriptTimeout =900%> <% ' *** Edit Operations: declare variables Dim MM_editAction Dim MM_abortEdit Dim MM_editQuery Dim MM_editCmd Dim MM_editConnection Dim MM_editTable Dim MM_editRedirectUrl Dim MM_editColumn Dim MM_recordId Dim MM_fieldsStr Dim MM_columnsStr Dim MM_fields Dim MM_columns Dim MM_typeArray Dim MM_formVal Dim MM_delim Dim MM_altVal Dim MM_emptyVal Dim MM_i MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME")) If (Request.QueryString <> "") Then MM_editAction = MM_editAction & "?" & Request.QueryString End If ' boolean to abort record edit MM_abortEdit = false ' query string to execute MM_editQuery = "" %> <% ' *** Update Record: set variables If (CStr(Request("MM_update")) = "form1" And CStr(Request("MM_recordId")) <> "") Then MM_editConnection = MM_maq_STRING MM_editTable = "VALCOTS" MM_editColumn = "IDVAL" MM_recordId = "" + Request.Form("MM_recordId") + "" MM_editRedirectUrl = "" MM_fieldsStr = "DOLAR|value|TASAP|value|STDLEG|value|STDFIN|value|LIBOR|value" MM_columnsStr = "DOLAR|none,none,NULL|TASAP|none,none,NULL|STDLEG|none,none,NULL|STDFIN|none,none,NULL|LIBOR|none,none,NULL" ' create the MM_fields and MM_columns arrays MM_fields = Split(MM_fieldsStr, "|") MM_columns = Split(MM_columnsStr, "|") ' set the form values For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_fields(MM_i+1) = CStr(Request.Form(MM_fields(MM_i))) Next ' append the query string to the redirect URL If (MM_editRedirectUrl <> "" And Request.QueryString <> "") Then If (InStr(1, MM_editRedirectUrl, "?", vbTextCompare) = 0 And Request.QueryString <> "") Then MM_editRedirectUrl = MM_editRedirectUrl & "?" & Request.QueryString Else MM_editRedirectUrl = MM_editRedirectUrl & "&" & Request.QueryString End If End If End If %> <% ' *** Update Record: construct a sql update statement and execute it If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then ' create the sql update statement MM_editQuery = "update " & MM_editTable & " set " For MM_i = LBound(MM_fields) To UBound(MM_fields) Step 2 MM_formVal = MM_fields(MM_i+1) MM_typeArray = Split(MM_columns(MM_i+1),",") MM_delim = MM_typeArray(0) If (MM_delim = "none") Then MM_delim = "" MM_altVal = MM_typeArray(1) If (MM_altVal = "none") Then MM_altVal = "" MM_emptyVal = MM_typeArray(2) If (MM_emptyVal = "none") Then MM_emptyVal = "" If (MM_formVal = "") Then MM_formVal = MM_emptyVal Else If (MM_altVal <> "") Then MM_formVal = MM_altVal ElseIf (MM_delim = "'") Then ' escape quotes MM_formVal = "'" & strreplace(MM_formVal,"'","''") & "'" Else MM_formVal = MM_delim + MM_formVal + MM_delim End If End If If (MM_i <> LBound(MM_fields)) Then MM_editQuery = MM_editQuery & "," End If MM_editQuery = MM_editQuery & MM_columns(MM_i) & " = " & MM_formVal Next MM_editQuery = MM_editQuery & " where " & MM_editColumn & " = " & MM_recordId If (Not MM_abortEdit) Then ' execute the update Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_editConnection MM_editCmd.CommandText = MM_editQuery MM_editCmd.Execute MM_editCmd.ActiveConnection.Close If (MM_editRedirectUrl <> "") Then Response.Redirect(MM_editRedirectUrl) End If End If End If %> <% Dim valcots Dim valcots_numRows Set valcots = Server.CreateObject("ADODB.Recordset") valcots.ActiveConnection = MM_maq_STRING valcots.Source = "SELECT * FROM VALCOTS" valcots.CursorType = 0 valcots.CursorLocation = 2 valcots.LockType = 1 valcots.Open() valcots_numRows = 0 %> <% Dim vemds Dim vemds_numRows Set vemds = Server.CreateObject("ADODB.Recordset") vemds.ActiveConnection = MM_maq_STRING vemds.Source = "SELECT USERNAM, NOMBRE, APELLIDO, ZONA, IDCLIENTE FROM USUARIOSCRM WHERE CARTCONTRA<>1 ORDER BY NOMBRE,ZONA" vemds.CursorType = 0 vemds.CursorLocation = 2 vemds.LockType = 1 vemds.Open() vemds_numRows = 0 %> <% Dim sucs Dim sucs_numRows Set sucs = Server.CreateObject("ADODB.Recordset") sucs.ActiveConnection = MM_maq_STRING sucs.Source = "SELECT ZONA, NUM_SUCURSAL FROM RESP_CREDITO where INACTIVO=0" sucs.CursorType = 0 sucs.CursorLocation = 2 sucs.LockType = 1 sucs.Open() sucs_numRows = 0 %> <% Dim ttl__MES ttl__MES = "6" If (datepart("m",date) <> "") Then ttl__MES = datepart("m",date) End If %> <% Dim ttl__ANIO ttl__ANIO = CSTR(datepart("YYYY",date)) If (request("ANIO") <> "") Then ttl__ANIO = REPLACE(request("ANIO"),"'","''") End If %> <% Dim ttl__QUIEN ttl__QUIEN = "'xnet'" If (session("MM_Username") <> "") Then ttl__QUIEN = session("MM_Username") End If %> <% Dim grpu grpu = "%" If (request("grpu") <> "" and request("grpu") <> "*" ) Then grpu = strreplace(request("grpu"),"'","''") End If %> <% Dim sucu sucu = "%" If (request("sucu") <> "" and request("sucu") <> "*") Then sucu = strreplace(request("sucu"),"'","''") End If %> <% idven="" if request("IDVENDEDOR")<>"-1" AND request("IDVENDEDOR")<>"" THEN IDVEN=STRREPLACE(request("IDVENDEDOR"),"'","''") END IF %> <% qrydsh=" CALL DASHBOARD2 (6,"+ttl__ANIO+",'"+idven+"','"+grpu+"','"+sucu+"')" Set MM_editCmd = Server.CreateObject("ADODB.Command") MM_editCmd.ActiveConnection = MM_maq_STRING MM_editCmd.CommandText = qrydsh 'response.Redirect("es.asp?cmd="+MM_editQuery) MM_editCmd.Execute MM_editCmd.ActiveConnection.Close %> <% Dim mktttl Dim mktttl_numRows Set mktttl = Server.CreateObject("ADODB.Recordset") mktttl.ActiveConnection = MM_maq_STRING mktttl.Source = "SELECT count(TBL_OPPORTUNITY.idop) as TAL FROM TBL_OPPORTUNITY WHERE vendedor=0 " mktttl.CursorType = 0 mktttl.CursorLocation = 2 mktttl.LockType = 1 mktttl.Open() mktttl_numRows = 0 %> <% Dim mas Dim mas_numRows Set mas = Server.CreateObject("ADODB.Recordset") mas.ActiveConnection = MM_maq_STRING mas.Source = "SELECT * FROM TBL_DASH WHERE ORIGEN=0" mas.CursorType = 0 mas.CursorLocation = 2 mas.LockType = 1 mas.Open() mas_numRows = 0 %> <% Dim mask Dim mask_numRows Set mask = Server.CreateObject("ADODB.Recordset") mask.ActiveConnection = MM_maq_STRING mask.Source = "SELECT * FROM TBL_DASH WHERE ORIGEN=1" mask.CursorType = 0 mask.CursorLocation = 2 mask.LockType = 1 mask.Open() mask_numRows = 0 %> <% Dim grps Dim grps_numRows Set grps = Server.CreateObject("ADODB.Recordset") grps.ActiveConnection = MM_maq_STRING grps.Source = "SELECT distinct(SHORT2),DIV2 FROM DIVISIONES WHERE SHORT2<>'-1' ORDER BY DIV2" grps.CursorType = 0 grps.CursorLocation = 2 grps.LockType = 1 grps.Open() grps_numRows = 0 %> <% Dim zonas Dim zonas_numRows Set zonas = Server.CreateObject("ADODB.Recordset") zonas.ActiveConnection = MM_maq_STRING zonas.Source = "SELECT distinct(ZONA) FROM USUARIOSCRM where ZONA<>''" zonas.CursorType = 0 zonas.CursorLocation = 2 zonas.LockType = 1 zonas.Open() zonas_numRows = 0 %> <% Dim mask1 Dim mask1_numRows Set mask1 = Server.CreateObject("ADODB.Recordset") mask1.ActiveConnection = MM_maq_STRING mask1.Source = "SELECT * FROM TBL_DASH WHERE ORIGEN=3" mask1.CursorType = 0 mask1.CursorLocation = 2 mask1.LockType = 1 mask1.Open() mask1_numRows = 0 %> <% Dim divs__ELSHO divs__ELSHO = "0" If (request("GRPU") <> "") Then divs__ELSHO = request("GRPU") End If %> <% Dim divs Dim divs_numRows Set divs = Server.CreateObject("ADODB.Recordset") divs.ActiveConnection = MM_maq_STRING divs.Source = "SELECT distinct(SHORT2),DIV2 FROM DIVISIONES WHERE SHORT2='" + strreplace(divs__ELSHO, "'", "''") + "' ORDER BY DIV2" divs.CursorType = 0 divs.CursorLocation = 2 divs.LockType = 1 divs.Open() divs_numRows = 0 %> <% Dim vend__IDCV vend__IDCV = "-1" If (request("IDVENDEDOR") <> "") Then vend__IDCV = request("IDVENDEDOR") End If %> <% Dim vend Dim vend_numRows Set vend = Server.CreateObject("ADODB.Recordset") vend.ActiveConnection = MM_maq_STRING vend.Source = "SELECT NOMBRE FROM USUARIOSCRM WHERE IDCLIENTE=" + strreplace(vend__IDCV, "'", "''") + "" vend.CursorType = 0 vend.CursorLocation = 2 vend.LockType = 1 vend.Open() vend_numRows = 0 %> <% Dim Repeat1__numRows Dim Repeat1__index Repeat1__numRows = -1 Repeat1__index = 0 RESM_numRows = RESM_numRows + Repeat1__numRows %> <% Dim Repeat2__numRows Dim Repeat2__index Repeat2__numRows = -1 Repeat2__index = 0 mas_numRows = mas_numRows + Repeat2__numRows %> www.promad.com.mx
 
Resumen de Cotizaciones: ?ANIO=<%=CINT(ttl__ANIO)-1 %>');return document.MM_returnValue" > ?ANIO=<%=CINT(ttl__ANIO)+1 %>');return document.MM_returnValue" value="Proximo Año >">
">
Division   Sucursal:<%=request("SUCU") %>
Division: <% IF NOT DIVS.EOF THEN %> <%=(divs.Fields.Item("DIV2").Value)%> <% END IF 'NOT DIVS.EOF %>
Vendedor: <% IF NOT VEND.EOF THEN %> <%=(vend.Fields.Item("NOMBRE").Value)%> <% END IF 'NOT VEND.EOF %>
Sucursal
Vendedor  
<% IF request("ANIO")<>"" THEN %> "> <% END IF 'request("ANIO")<>"" %>  
 

 Resumen de Cierre <% While ((Repeat2__numRows <> 0) AND (NOT mas.EOF)) %> <%IF mas("ETAPA")=8 THEN RESPONSE.WRITE("bgcolor=""#CC3300""")%><%IF mas("ETAPA")=6 THEN RESPONSE.WRITE("bgcolor=""#F9FEB8""")%> bgcolor=""> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 mas.MoveNext() Wend %> <%'marketing%> <% While ( (NOT mask.EOF)) %> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 mask.MoveNext() Wend %> <%'ps embudos%> <% While ( (NOT mask1.EOF)) %> <% Repeat2__index=Repeat2__index+1 Repeat2__numRows=Repeat2__numRows-1 mask1.MoveNext() Wend %>
<% GANT=0 GAN=0 pert=0%>  AÑO:<%=ttl__ANIO %> Global: ENE FEB MAR ABR MAY JUN JUL AGO SEP OCT NOV DIC  
                             
Etapa <%=(mas.Fields.Item("ETAPA").Value)%>
<%IF mas("ETAPA")=6 THEN RESPONSE.WRITE("SIN NEGOCIO")%> <%IF mas("ETAPA")=7 THEN RESPONSE.WRITE("GANADAS")%> <%IF mas("ETAPA")=8 THEN RESPONSE.WRITE("PERDIDAS")%>
<%=(mas.Fields.Item("TOTALU").Value)%> <%IF mas("ETAPA")>5 THEN gan=gan+mas("TOTALU")%> <%IF mas("ETAPA")=7 THEN ganT=mas("TOTALU")%> <%IF mas("ETAPA")=8 THEN perT=mas("TOTALU")%>
<%= FormatCurrency((mas.Fields.Item("TOTALV").Value), 2, -2, -2, -2) %>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("ENEU").Value)%>
<%= FormatCurrency((mas.Fields.Item("ENEV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan1=gan1+mas("ENEU")%> <%IF mas("ETAPA")=7 THEN gant1=mas("ENEU") %> <%IF mas("ETAPA")=8 THEN perT1=mas("ENEU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("FEBU").Value)%>
<%= FormatCurrency((mas.Fields.Item("FEBV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan2=gan2+mas("FEBU")%> <%IF mas("ETAPA")=7 THEN ganT2=mas("FEBU")%> <%IF mas("ETAPA")=8 THEN perT2=mas("FEBU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("MARU").Value)%>
<%= FormatCurrency((mas.Fields.Item("MARV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan3=gan3+mas("MARU")%> <%IF mas("ETAPA")=7 THEN ganT3=mas("MARU")%> <%IF mas("ETAPA")=8 THEN perT3=mas("MARU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("ABRU").Value)%>
<%= FormatCurrency((mas.Fields.Item("ABRV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan4=gan4+mas("ABRU")%> <%IF mas("ETAPA")=7 THEN ganT4=mas("ABRU")%> <%IF mas("ETAPA")=8 THEN perT4=mas("ABRU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("MAYU").Value)%>
<%= FormatCurrency((mas.Fields.Item("MAYV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan5=gan5+mas("MAYU")%> <%IF mas("ETAPA")=7 THEN ganT5=mas("MAYU")%> <%IF mas("ETAPA")=8 THEN perT5=mas("MAYU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("JUNU").Value)%>
<%= FormatCurrency((mas.Fields.Item("JUNV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan6=gan6+mas("JUNU")%> <%IF mas("ETAPA")=7 THEN ganT6=mas("JUNU")%> <%IF mas("ETAPA")=8 THEN perT6=mas("JUNU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("JULU").Value)%>
<%= FormatCurrency((mas.Fields.Item("JULV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan7=gan7+mas("JULU")%> <%IF mas("ETAPA")=7 THEN ganT7=mas("JULU")%> <%IF mas("ETAPA")=8 THEN perT7=mas("JULU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("AGOU").Value)%>
<%= FormatCurrency((mas.Fields.Item("AGOV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan8=gan8+mas("AGOU")%> <%IF mas("ETAPA")=7 THEN ganT8=mas("AGOU")%> <%IF mas("ETAPA")=8 THEN perT8=mas("AGOU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("SEPU").Value)%>
<%= FormatCurrency((mas.Fields.Item("SEPV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan9=gan9+mas("SEPU")%> <%IF mas("ETAPA")=7 THEN ganT9=mas("SEPU")%> <%IF mas("ETAPA")=8 THEN perT9=mas("SEPU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("OCTU").Value)%>
<%= FormatCurrency((mas.Fields.Item("OCTV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan10=gan10+mas("OCTU")%> <%IF mas("ETAPA")=7 THEN ganT10=mas("OCTU")%> <%IF mas("ETAPA")=8 THEN perT10=mas("OCTU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("NOVU").Value)%>
<%= FormatCurrency((mas.Fields.Item("NOVV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan11=gan11+mas("NOVU")%> <%IF mas("ETAPA")=7 THEN ganT11=mas("NOVU")%> <%IF mas("ETAPA")=8 THEN perT11=mas("NOVU")%>
&ANIO=<%=(mas.Fields.Item("ANIO").Value)%>&GRP=<%= Request("GRPU") %>&ZONA=<%= Request("SUCU") %>&IDVENDEDOR=<%= Request("IDVENDEDOR") %>" target="_blank"><%=(mas.Fields.Item("DICU").Value)%>
<%= FormatCurrency((mas.Fields.Item("DICV").Value), 2, -2, -2, -2) %> <%IF mas("ETAPA")>5 THEN gan12=gan12+mas("DICU")%> <%IF mas("ETAPA")=7 THEN ganT12=mas("DICU")%> <%IF mas("ETAPA")=8 THEN perT12=mas("DICU")%>
 
Funnel Ratio <%if gant>0 then response.Write(round(1*(gan/gant),2)) %> <%if gant1>0 then response.Write(round(1*(gan1/gant1),2)) %> <%if gant2>0 then response.Write(round(1*(gan2/gant2),2)) %> <%if gant3>0 then response.Write(round(1*(gan3/gant3),2)) %> <%if gant4>0 then response.Write(round(1*(gan4/gant4),2)) %> <%if gant5>0 then response.Write(round(1*(gan5/gant5),2)) %> <%if gant6>0 then response.Write(round(1*(gan6/gant6),2)) %> <%if gant7>0 then response.Write(round(1*(gan7/gant7),2)) %> <%if gant8>0 then response.Write(round(1*(gan8/gant8),2)) %> <%if gant9>0 then response.Write(round(1*(gan9/gant9),2)) %> <%if gant10>0 then response.Write(round(1*(gan10/gant10),2)) %> <%if gant11>0 then response.Write(round(1*(gan11/gant11),2)) %> <%if gant12>0 then response.Write(round(1*(gan12/gant12),2)) %>  
Close Rate <%if (gant+pert)>0 then response.Write(round(100*((gant)/(gant+pert)))) %> % <%if gant1+pert1>0 then response.Write(round(100*(gant1/(gant1+pert1)))) %> % <%if gant2+pert2>0 then response.Write(round(100*(gant2/(gant2+pert2)))) %> % <%if gant3+pert3>0 then response.Write(round(100*(gant3/(gant3+pert3)))) %> % <%if gant4+pert4>0 then response.Write(round(100*(gant4/(gant4+pert4)))) %> % <%if gant5+pert5>0 then response.Write(round(100*(gant5/(gant5+pert5)))) %> % <%if pert5+gant6>0 then response.Write(round(100*(gant6/(pert5+gant6)))) %> % <%if gant7+pert7>0 then response.Write(round(100*(gant7/(gant7+pert7)))) %> % <%if gant8+pert8>0 then response.Write(round(100*(gant8/(gant8+pert8)))) %> % <%if gant9+pert9>0 then response.Write(round(100*(gant9/(gant9+pert9)))) %> % <%if gant10+pert10>0 then response.Write(round(100*(gant10/(gant10+pert10)))) %> % <%if gant11+pert11>0 then response.Write(round(100*(gant11/(gant11+pert11)))) %> % <%if gant12+pert12>0 then response.Write(round(100*(gant12/(gant12+pert12)))) %> %  
<% GANT=0 GAN=0 gant1=0 gan1=0 gant2=0 gan2=0 gant3=0 gan3=0 gant4=0 gan4=0 gant5=0 gan5=0 gant6=0 gan6=0 gant7=0 gan7=0 gant8=0 gan8=0 gant9=0 gan9=0 gant10=0 gan10=0 gant11=0 gan11=0 gant12=0 gan12=0 %>                            
                             

 

<%=qrydsh %>
 



 
 
<% vemds.Close() Set vemds = Nothing %> <% valcots.Close() Set valcots = Nothing %> <% sucs.Close() Set sucs = Nothing %> <% mktttl.Close() Set mktttl = Nothing %> <% mas.Close() Set mas = Nothing %> <% mask.Close() Set mask = Nothing %> <% grps.Close() Set grps = Nothing %> <% zonas.Close() Set zonas = Nothing %> <% mask1.Close() Set mask1 = Nothing %> <% divs.Close() Set divs = Nothing %> <% vend.Close() Set vend = Nothing %>