	var a = 0;	
	$(document).ready(function(){
		//$.ajaxSetup({cache:false});
		//$('#triqui_ad').wrap('<div id="triqui_container"></div>');
		//$('#triqui_ad').load('ajax.php',function(){
			$('#triqui_ad').css('display','block');
			$('#triqui_container').hide().slideDown('slow');
			$('#triqui_ad_up').hide();
			
			$('#triqui_ad_close').click(function(){ 
				 
				 $('#bottomdiv').animate({    
       						 height: '35px'
  						},  function() {
						$('#bottom').hide();
						if(a==0)
						{
							$('#triqui_ad').append('<div id="bt" style="color:#434343; font-size:12px; margin-left:140px; width:800px; margin-top: -20px; float:left;">Powered By <a href="http://www.nextcrawl.com" target="_blank" style="color:#434343; font-size:12px;">NextCrawl Technologies</a></div>');
							a++;
						}
						else
						{
							$('#bt').show();
						}
						$('#triqui_ad_up').show();
    
  					});					
					$('#triqui_ad_up').click(function(){ 
									  
					$('#bottom').show();
					$('#bottomdiv').animate({    
       						 height: '78px'
  						},  function() {
							
							$('#triqui_ad_up').hide();
				
    
  					});
				
					$('#bt').hide();
					
				}); 
	  		
			});
			 
			
		//});
	
	});

//-----------New Tree------//
/**************************************************************************
	Copyright (c) 2001-2003 Geir Landrö (drop@destroydrop.com)
	JavaScript Tree - www.destroydrop.com/hjavascripts/tree/
	Version 0.96	

	This script can be used freely as long as all copyright messages are
	intact.
**************************************************************************/

// Arrays for nodes and icons
var nodes			= new Array();;
var openNodes	= new Array();
var icons			= new Array(6);

function addNodes(parentNode, recursedNodes, arrName) {
	for (var i = 0; i < nodes.length; i++) {

		var nodeValues = nodes[i].split("|");
		if (nodeValues[1] == parentNode) {
			
			var ls	= lastSibling(nodeValues[0], nodeValues[1]);
			var hcn	= hasChildNode(nodeValues[0]);
			var ino = isNodeOpen(nodeValues[0]);

			// Write out line & empty icons
			for (g=0; g<recursedNodes.length; g++) {
				if (recursedNodes[g] == 1) document.write("<img src=\"img/line.gif\" align=\"absbottom\" alt=\"\" />");
				else  document.write("<img src=\"img/empty.gif\" align=\"absbottom\" alt=\"\" />");
			}

			// put in array line & empty icons
			if (ls) recursedNodes.push(0);
			else recursedNodes.push(1);

			// Write out join icons
			if (hcn) {
				if (ls) {
					document.write("<a href=\"javascript: oc(" + nodeValues[0] + ", 10);\"><img id=\"join" + nodeValues[0] + "\" src=\"images/");
					 	if (ino) 
						{
							document.write("minusbottom");
						}
						else
						{
							document.write("plusdown");
						}
					document.write(".gif\" align=\"absbottom\" alt=\"Open/Close node\" /></a>");
				} else {
					document.write("<a href=\"javascript: oc(" + nodeValues[0] + ", 0);\"><img id=\"join" + nodeValues[0] + "\" src=\"images/");
						if (ino) 
						{
							document.write("minus");
						}
						else 
						{
							if(i != 0)
							{
								document.write("plus");
							}
							else
							{
								document.write("plusdown");
							}
							
						}
					document.write(".gif\" align=\"absbottom\" alt=\"Open/Close node\" /></a>");
				}
			} else {
				if (ls) 
				{
					if(nodes.length-1 == i)
					{
						document.write("<img src=\"img/joinbottom.gif\" align=\"absbottom\" alt=\"\" />");
					}
					else
					{
						document.write("<img src=\"img/join.gif\" align=\"absbottom\" alt=\"\" />");
					}
					
				}
				else document.write("<img src=\"img/join.gif\" align=\"absbottom\" alt=\"\" />");
			}

			// Start link
			document.write("<a   id='manf"+nodeValues[3].substr(nodeValues[3].length-1,1)+"'  class='category-heading'  href=\"" + nodeValues[3] + "\" onmouseover=\"window.status='" + nodeValues[2] + "';return true;\" onmouseout=\"window.status=' ';return true;\">");
			
			// Write out folder & page icons
			if (hcn) {
				document.write("<span id=\"icon" + nodeValues[0] + "\" ")
					if (ino) document.write("");
				document.write(" ></span>");
			} else document.write("");
			
			// Write out node name
			if(parentNode==0)
			{
				document.write('<strong>'+nodeValues[2]+'</strong>');
			}
			else
			document.write(nodeValues[2]);

			// End link
			document.write("</a><br />");
			
			// If node has children write out divs and go deeper
			if (hcn) {
				document.write("<div id=\"div" + nodeValues[0] + "\"");
					if (!ino) document.write(" style=\"display: none;\"");
				document.write(">");
				addNodes(nodeValues[0], recursedNodes, arrName);
				document.write("</div>");
			}
			
			// remove last line or empty icon 
			recursedNodes.pop();
		}
	}
}
// Loads all icons that are used in the tree
function preloadIcons() {
	icons[0] = new Image();
	icons[0].src = "img/plus.gif";
	icons[1] = new Image();
	icons[1].src = "img/plusbottom.gif";
	icons[2] = new Image();
	icons[2].src = "img/minus.gif";
	icons[3] = new Image();
	icons[3].src = "img/minusbottom.gif";
	icons[4] = new Image();
	icons[4].src = "";
	icons[5] = new Image();
	icons[5].src = "";
}

// Create the tree
function createTree(arrName, startNode, openNode) {
	nodes = arrName;
	if (nodes.length > 0) {
		preloadIcons();
		if (startNode == null) startNode = 0;
		if (openNode != 0 || openNode != null) setOpenNodes(openNode);
	
		if (startNode !=0) {
			var nodeValues = nodes[getArrayId(startNode)].split("|");
			document.write("<a href=\"" + nodeValues[3] + "\" onmouseover=\"window.status='" + nodeValues[2] + "';return true;\" onmouseout=\"window.status=' ';return true;\">" + nodeValues[2] + "</a><br />");
		} else document.write("");
	
		var recursedNodes = new Array();
		
		if(arrName[0]=="1000|0|Brands|#")
		{
			addNodes(startNode, recursedNodes, arrName);
		}
		else
		{
			addNode(startNode, recursedNodes, arrName);
		}
	}
}
// Returns the position of a node in the array
function getArrayId(node) {
	for (i=0; i<nodes.length; i++) {
		var nodeValues = nodes[i].split("|");
		if (nodeValues[0]==node) return i;
	}
}
// Puts in array nodes that will be open
function setOpenNodes(openNode) {
	for (i=0; i<nodes.length; i++) {
		var nodeValues = nodes[i].split("|");
		if (nodeValues[0]==openNode) {
			openNodes.push(nodeValues[0]);
			setOpenNodes(nodeValues[1]);
		}
	} 
}
// Checks if a node is open
function isNodeOpen(node) {
	for (i=0; i<openNodes.length; i++)
		if (openNodes[i]==node) return true;
	return false;
}
// Checks if a node has any children
function hasChildNode(parentNode) {
	for (i=0; i< nodes.length; i++) {
		var nodeValues = nodes[i].split("|");
		if (nodeValues[1] == parentNode) return true;
	}
	return false;
}
// Checks if a node is the last sibling
function lastSibling (node, parentNode) {
	var lastChild = 0;
	for (i=0; i< nodes.length; i++) {
		var nodeValues = nodes[i].split("|");
		
		if (nodeValues[1] == parentNode)
			lastChild = nodeValues[0];
	}
	if (lastChild==node) 
	{
		return true;
	}
	
	return false;
}
// Adds a new node to the tree
function addNode(parentNode, recursedNodes, arrName) {
	for (var i = 0; i < nodes.length; i++) {

		var nodeValues = nodes[i].split("|");
		if (nodeValues[1] == parentNode) {
			
			var ls	= lastSibling(nodeValues[0], nodeValues[1]);
			var hcn	= hasChildNode(nodeValues[0]);
			var ino = isNodeOpen(nodeValues[0]);

			// Write out line & empty icons
			for (g=0; g<recursedNodes.length; g++) {
				if (recursedNodes[g] == 1) document.write("<img src=\"img/line.gif\" align=\"absbottom\" alt=\"\" />");
				else  document.write("<img src=\"img/empty.gif\" align=\"absbottom\" alt=\"\" />");
			}

			// put in array line & empty icons
			if (ls) recursedNodes.push(0);
			else recursedNodes.push(1);

			// Write out join icons
			if (hcn) {
				if (ls) {
					document.write("<a href=\"javascript: oc(" + nodeValues[0] + ", 1);\"><img id=\"join" + nodeValues[0] + "\" src=\"img/");
					 	if (ino) 
						{
							document.write("minusbottom");
						}
						else
						{
							document.write("plusbottom");
						}
					document.write(".gif\" align=\"absbottom\" alt=\"Open/Close node\" /></a>");
				} else {
					document.write("<a href=\"javascript: oc(" + nodeValues[0] + ", 0);\"><img id=\"join" + nodeValues[0] + "\" src=\"images/");
						if (ino) 
						{
							document.write("minus");
						}
						else 
						{
							if(i != 0)
							{
								document.write("plus");
							}
							else
							document.write("plusdown");
							
						}
					document.write(".gif\" align=\"absbottom\" alt=\"Open/Close node\" /></a>");
				}
			} else {
				if (ls) 
				{
					document.write("<img src=\"img/joinbottom.gif\" align=\"absbottom\" alt=\"\" />");
					
				}
				else document.write("<img src=\"img/join.gif\" align=\"absbottom\" alt=\"\" />");
			}

			// Start link
			
			document.write("<a id='cat"+nodeValues[3].substr(nodeValues[3].length-1,1)+"' class='category-heading'  href=\"" + nodeValues[3] + "\" onmouseover=\"window.status='" + nodeValues[2] + "';return true;\" onmouseout=\"window.status=' ';return true;\">");
			
			// Write out folder & page icons
			if (hcn) {
				document.write("<span id=\"icon" + nodeValues[0] + "\" ")
					if (ino) document.write("");
				document.write(" ></span>");
			} else document.write("");
			
			// Write out node name
			if(parentNode==0)
			{
				document.write('<strong>'+nodeValues[2]+'</strong>');
			}
			else
			document.write(nodeValues[2]);

			// End link
			document.write("</a><br />");
			
			// If node has children write out divs and go deeper
			if (hcn) {
				document.write("<div id=\"div" + nodeValues[0] + "\"");
					if (!ino) document.write(" style=\"display: none;\"");
				document.write(">");
				addNode(nodeValues[0], recursedNodes, arrName);
				document.write("</div>");
			}
			
			// remove last line or empty icon 
			recursedNodes.pop();
		}
	}
}
// Opens or closes a node
function oc(node, bottom) {
	var theDiv = document.getElementById("div" + node);
	var theJoin	= document.getElementById("join" + node);
	var theIcon = document.getElementById("icon" + node);
	
	if (theDiv.style.display == 'none') {
		if (bottom==1) 
		theJoin.src = icons[3].src;
		else if (bottom==10)
		theJoin.src = "images/nolines_minus.gif";
		else 
		{	
			theJoin.src = "img/minus_down.gif";
		}
			
		theIcon.src = icons[5].src;
		theDiv.style.display = '';
	} else {
		if (bottom==1) 
		{
			theJoin.src = icons[1].src;
		}
		else 
		{
			theJoin.src = "images/plusdown.gif";
		}
		theIcon.src = icons[4].src;
		theDiv.style.display = 'none';
	}
}
// Push and pop not implemented in IE
if(!Array.prototype.push) {
	function array_push() {
		for(var i=0;i<arguments.length;i++)
			this[this.length]=arguments[i];
		return this.length;
	}
	Array.prototype.push = array_push;
}
if(!Array.prototype.pop) {
	function array_pop(){
		lastElement = this[this.length-1];
		this.length = Math.max(this.length-1,0);
		return lastElement;
	}
	Array.prototype.pop = array_pop;
}


