<!--
//<![CDATA[

$(document).ready(function() {
	
	// SITEMAP				   
	$("#sitemap_base_button").click(function() {
			
			if($("#sitemap").is(":hidden")) {
				
				// Get sitemap data
				$.ajax({
				  url: "/ajax/sitemap.asp",
				  cache: false,
				  success: function(html){
					
						$("#sitemap").html(html).show('slow');
						
						$("#sitemap_base_button a").addClass("on");
						$("#sitemap_base_button").find("span").html("Close Sitemap");  
						
						
					  }
				  });
				
			}
			else {
				
				// Hide Sitemap
				$("#sitemap").hide('slow');
				
				$("#sitemap_base_button a").removeClass("on");
				$("#sitemap_base_button").find("span").html("Open Sitemap");
			}			
			
			return false;
	});
	
	$("a.size1").click( function() { 	$("body").removeClass().addClass("size1"); $.ajax({ url: "/default.asp", data: "action=textsize&size=1" }); return false; });
	$("a.size2").click( function() { 	$("body").removeClass().addClass("size2"); $.ajax({ url: "/default.asp", data: "action=textsize&size=2" }); return false; }); 
	$("a.size3").click( function() { 	$("body").removeClass().addClass("size3"); $.ajax({ url: "/default.asp", data: "action=textsize&size=3" }); return false; });
	
	$("#requirementslist_help_button").click(function() { $("#requirementslist_help").toggle(); return false; });
	$("#requirementslist_supplier_link").click(function() { $("#requirementlist_supplier").toggle(); return false; });
	
	$("#txtSearchSupplier").focus(function() { $(this).val(""); });
	
	
});

function RemoveItem(code) {
	
	$.ajax({
	   type: "POST",
	   url: "/ajax/requirements.asp",
	   cache: false,		 
	   data: "product_code=" + escape(code) + "&action=remove",
	   success: function(msg) {
		 // alert("Product added to list [" + msg + "]");
		$("#requirementslist").show();
		$("#requirementslist_items").html(msg);
	   }
	 });

	return false;
	
}

function IncrementItem(code) {
	
	$.ajax({
	   type: "POST",
	   url: "/ajax/requirements.asp",
	   cache: false,		 
	   data: "product_code=" + escape(code) + "&action=increment",
	   success: function(msg) {
		 // alert("Product added to list [" + msg + "]");
		$("#requirementslist").show();
		$("#requirementslist_items").html(msg);
	   }
	 });

	return false;
	
}

function DecrementItem(code) {
	
	$.ajax({
	   type: "POST",
	   url: "/ajax/requirements.asp",
	   cache: false,		 
	   data: "product_code=" + escape(code) + "&action=decrement",
	   success: function(msg) {
		 // alert("Product added to list [" + msg + "]");
		$("#requirementslist").show();
		$("#requirementslist_items").html(msg);
	   }
	 });

	return false;
	
}

//]]>
-->	