<div id="header_container">
<div id="header_content">
<table width="100%" height="160" cellpadding="0" cellspacing="0" border="0" bgcolor="#000000">
<%
On Error Resume Next
Response.Expires = 0
Dim AobjConn, AobjRS, AstrQuery
Dim AstrConnection

Set AobjConn = Server.CreateObject("ADODB.Connection")
AstrConnection = "DSN=pedersens;Database=WebDB;"

AobjConn.Open AstrConnection
%>
	<tr>
    	<td width="100%" align="center" valign="top" bgcolor="#000000">
        	<table width="100%" cellpadding="0" cellspacing="0" border="0">
                <tr>
                	<td width="232" align="left"><table cellpadding="0" cellspacing="0" border="0">
						<form name="fmSearch" method="post" action="search.asp">
                    	<tr>
                        	
                            <td class="tint"><img src="images/btm_search.gif" onClick="javascript:show('search')" /><div id="search" style="display: none;"><table width="100%" cellpadding="0" cellspacing="0" border="0">
                            	<tr>
                                	<td><input name="productSearch" type="text" class="searchtext" value="&nbsp;&nbsp;Search" onClick="clickclear(this, '&nbsp;&nbsp;Search')"></td>
                                    <td><input name="buttonSearch" type="submit" class="button" value="Go"></td>
                                </tr>
                            </table></div></td>
                            <td class="dark_button width"><a href="cartView.asp" class="dark_button_text">View Quote</a></td>
                        </tr>
                        </form>
                    </table></td>
                    <td align="center"><a href="index.asp"><img src="images/logo.png" border="0" /></a></td>
                    <td width="232" align="right"><a href="tel:08 9456 3000" class="phone">+61 8 9456 3000</a></td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
    	<td width="100%" align="center" valign="top" bgcolor="#333333">
        	<table width="960" cellpadding="0" cellspacing="0" border="0">
                <tr height="50">
                	<td height="48" align="center" valign="middle"><a href="index.asp" class="menu">Home</a></td>
                    <td height="48" align="center" valign="middle"><a href="company.asp" class="menu" onMouseOver="mopen('m1')" onMouseOut="mclosetime()">Company</a>
                    <div align="left" id="m1" onMouseOver="mcancelclosetime()" onMouseOut="mclosetime()" class="dropmenudiv1">
                   <!-- <a href="company.asp" class="menu">Who Are We</a>-->
                    <a href="/celebrating_20_years" class="menu">Celebrating 20 Years</a>
                    
                    
                    </div></td>
                    <td height="48" align="center" valign="middle"><a href="#" class="menu" onMouseOver="mopen('m4')" onMouseOut="mclosetime()">Products</a>
                    <div align="left" id="m4" onMouseOver="mcancelclosetime()" onMouseOut="mclosetime()" class="dropmenudiv2"><table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000">
                                    <tr>
<%
	AstrQuery = "SELECT * FROM Category ORDER BY Rank"
	Set AobjRS = AobjConn.Execute(AstrQuery)
	
	ACstrQuery = "SELECT COUNT(*) AS CNumber FROM Category"
	Set ACobjRS = AobjConn.Execute(ACstrQuery)
	
	tCNumber = ACobjRS("CNumber")
	
	if tCNumber < 9 then
		tColumn = 1
	elseif tCNumber < 17 then
		tColumn = 2
	else
		tColumn = 3
	
	end if
	
	if tCNumber mod tColumn = 0 then
		tRow = tCNumber/tColumn
	else
		tRow = Int(tCNumber/tColumn) + 1
	end if
	
	count = 1

	Do While not AobjRS.EOF
	
		tACategory = AobjRS("Name")
    
		if InStr(tACategory,"'") > 0 then
			tACategory = Replace(tACategory,"'","-")
		end if
    
		if InStr(tACategory," ") > 0 then
			tACategory = Replace(tACategory," ","-")
		end if

		if count mod tRow = 1 or tRow = 1 then
%>                
                                    	<td width="260" valign="top"><table border="0" cellpadding="0" cellspacing="0">
<%
        end if
%>                        
                                        	<tr>
                                            	<td><a href="/category/<%= tACategory %>/<%= AobjRS("ID") %>" class="menu"><%= AobjRS("Name") %></a></td>
                                            	<!--<td><a href="category.asp?id=<%= AobjRS("ID") %>" class="menu"><%= AobjRS("Name") %></a></td>-->
                                            </tr>
<%
        if count mod tRow = 0 then
%>                
                                    	</table></td>
<%
        end if
    
        count = count + 1
		AobjRS.MoveNext
	Loop

	if count mod tRow <> 1 and tRow <> 1 then
%>                
                                    	</table></td>
<%
	end if
%>                            
                                    </tr>
                        		</table></div>
                    </td>
                    <td height="48" align="center" valign="middle"><a href="marquees.asp" class="menu">Marquees</a></td>
                    <td height="48" align="center" valign="middle"><a href="corporate.asp" class="menu" onMouseOver="mopen('m2')" onMouseOut="mclosetime()">Services</a>
                    <div align="left" id="m2" onMouseOver="mcancelclosetime()" onMouseOut="mclosetime()" class="dropmenudiv1">
                    <a href="corporate.asp" class="menu">Corporate</a>
                    <a href="parties.asp" class="menu">Parties</a>
                    <a href="weddings.asp" class="menu">Weddings</a>
                    
                    <a href="events.asp" class="menu">Recent Events</a>
                    </div>
                    </td>
                    <td height="48" align="center" valign="middle"><a href="gevents.asp" class="menu" onMouseOver="mopen('m3')" onMouseOut="mclosetime()">Gallery</a>
                    <div align="left" id="m3" onMouseOver="mcancelclosetime()" onMouseOut="mclosetime()" class="dropmenudiv1">
                    <a href="gevents.asp" class="menu">Events</a>
                    <a href="gparties.asp" class="menu">Parties</a>
                    <a href="gweddings.asp" class="menu">Weddings</a>
                    <a href="gfurniture_and_decor.asp" class="menu">Furniture & Decor</a>
                    <a href="ginstafeed.asp" class="menu">InstaFeed</a>
                    </div>
                    </td>
                    <!--<td height="48" align="center" valign="middle"><a href="testimonials.asp" class="menu">Testimonials</a></td>-->
                    <td height="48" align="center" valign="middle"><a href="blog.asp" class="menu">Blog</a></td>
                    <td height="48" align="center" valign="middle"><a href="contact.asp" class="menu">Contact Us</a></td>
                </tr>
            </table>
        </td>
    </tr>
<%
AobjRS.close
AobjConn.close
Set AobjRS = Nothing
Set AobjConn = Nothing
%>
</table>
</div>
</div>
