	<%  	    Dim ubb As New functionubb
	   Dim ggao_dt As Data.DataTable
	    Dim ggpics As String = ""
	    Dim gglinks As String = ""
	    Dim ggtexts As String = ""
	    
	    %>
		var focus_width=<%=ubb.query_string("width")%>;
		var focus_height=<%=ubb.query_string("height")%>;
         var text_height;
         var swf_height;
         var pics;
         var links;
         var texts;
	<%
	    If ubb.query_string("class") = "class-1" Then
	    %>
        text_height=0;
		swf_height = focus_height+text_height;
        
		pics='<%=ubb.query_string("pics")%>';
		links='<%=ubb.query_string("links")%>';
		texts='';
		<%		    		    Else
		        If ubb.query_string("class") = "class-2" Then
				
		            Dim new_lei_id_sing, new_lei_id As String
		            Dim jsnew_select As String = "False"
		            
		            If ubb.query_string("jsno") <> "" Then
		                
		                If ubb.tables("select top 1 new_lei_id from wn_new_lei where new_lei_jsnumber='" & ubb.query_string("jsno") & "'").rows.count > 0 Then
		                    new_lei_id = ubb.tables("select top 1 new_lei_id from wn_new_lei where new_lei_jsnumber='" & ubb.query_string("jsno") & "'").rows(0).item("new_lei_id")
		                    jsnew_select = "True"
		                End If
		            End If
		            
		            If jsnew_select = "False" Then
		                If ubb.query_string("classid") <> "0" Then
		                
		                    new_lei_id = ubb.query_string("classid")
		                    jsnew_select = "True"
		                End If

		            End If
		            
		            If jsnew_select = "False" Then
		                If ubb.query_string("classid") = "0" And ubb.query_string("new_lei") <> "" Then
		                
		                    new_lei_id = ubb.query_string("new_lei")
		                    jsnew_select = "True"
		                End If
		                
		            End If
		            
		                If jsnew_select = "True" Then
		                
		                    Dim new_lei_tb As Data.DataTable = ubb.tables("select new_lei_id from wn_new_lei where new_lei_id=" & new_lei_id & " or new_lei_pag like '%/" & new_lei_id & "' or new_lei_pag like '%/" & new_lei_id & "/%'")
		                    For j = 0 To new_lei_tb.Rows.Count - 1
		                        new_lei_id_sing &= "or new_flei='" & new_lei_tb.Rows(j).Item("new_lei_id") & "' "
		                    Next
		                    If new_lei_id_sing.Length > 0 Then
		                        new_lei_id_sing = " and (" & new_lei_id_sing.Remove(0, 2) & ")"
		                    End If

		                End If
					
		            
		                ggao_dt = ubb.tables("select top 9 new_image,new_url,new_id,new_bt,new_catgory,new_url from wn_new where new_tw='True' and new_ghost='True' and new_verify='已审'" & new_lei_id_sing & " order by new_id desc")
		            
		                If ggao_dt.Rows.Count > 0 Then
		                    For i = 0 To ggao_dt.Rows.Count - 1
		                        ggpics += "|http://" & Request.Url.Authority & ubb.url & "file_newsimages/" & ggao_dt.Rows(i).Item("new_image")
		                        gglinks += "|" & ubb.a_control_href(ggao_dt.Rows(i).Item("new_url"), "http://" & Request.Url.Authority & ubb.url & "news_text.aspx?new_id=" & ggao_dt.Rows(i).Item("new_id"))
		                        ggtexts += "|" & ggao_dt.Rows(i).Item("new_catgory") & ggao_dt.Rows(i).Item("new_bt")
		                    Next
						
		                End If
		            
		            End If
		        
		            If ubb.query_string("class") = "class-3" Then
		            
		                ggao_dt = ubb.tables("select top 9 gg_page,gg_url,gg_sm from wn_gg where gg_wz='幻灯片九图轮显' and gg_look='显示' order by gg_px asc")
		            
		                If ggao_dt.Rows.Count > 0 Then
		                    For i = 0 To ggao_dt.Rows.Count - 1
		                    
		                        ggpics += "|" & ggao_dt.Rows(i).Item("gg_page")
		                        gglinks += "|" & ggao_dt.Rows(i).Item("gg_url")
		                        ggtexts += "|" & ggao_dt.Rows(i).Item("gg_sm")
		                    
		                    Next
						
		                End If
		            
		            End If
		        
		        
		        
		            If ggao_dt.Rows.Count > 0 Then
		                If ubb.query_string("class") = "class-2" Then
				%>	
		text_height=18;
        <%else%>
        text_height=0;
        <%end if %>
		swf_height = focus_height + text_height;
		pics='<%=ggpics.ToString.Remove(0, 1)%>';
        links='<%=gglinks.ToString.Remove(0, 1)%>';
        texts='<%=ggtexts.ToString.Remove(0, 1) %>';
		    <%
		    End If
        
        End If%>
		
		
		document.write('<div style="<%=ubb.query_string("style")%>"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="'+ focus_width +'" height="'+ swf_height +'">');
		document.write('<param name="allowScriptAccess" value="sameDomain"><param name="movie" value="<%="http://" & Request.Url.Authority & ubb.url %>web_flash/pixviewer.swf"><param name="quality" value="high"><param name="bgcolor" value="#ffffff">');
		document.write('<param name="menu" value="false"><param name=wmode value="opaque">');
		document.write('<param name="FlashVars" value="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'">');
		document.write('<embed src="web_flash/pixviewer.swf" wmode="opaque" FlashVars="pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu="false" bgcolor="#cccccc" quality="high" width="'+ focus_width +'" height="'+ swf_height +'" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />');		
		document.write('</object></div>');