function logout(url)
{
	if(confirm("Are you sure you want to logout?"))
		window.location.href = url;
}


function showToolbar(logged)
{
// AddItem(id, text, hint, location, alternativeLocation);
// AddSubItem(idParent, text, hint, location);
	var query = location.href.indexOf("?");
	var length = 0
	if(query > -1){
		if(location.href.indexOf("sid") > -1)
			length = location.href.indexOf("&")
		else
			length = query
		if(length < 0)
			length = location.href.length
	}
	menu = new Menu();
	menu.addItem("home", "", "Return to Home Page", "/index.html", "/index.html", 40);
	if(logged == false || logged == undefined){
		logged = checkCookie("logged")
		if(logged == false || logged == undefined){
			menu.addItem("login", "Log In", "Log Into Your Account", "https://www.autohausaz.com/membersonly/login.aspx" + location.href.substring(query, length), "https://www.autohausaz.com/membersonly/login.aspx" + location.href.substring(query, length), 95);
		}
		else{
			menu.addItem("login", "Log Out", "Log Out of Your Account", "Javascript: logout('http://www.autohausaz.com/membersonly/logout.aspx" + location.href.substring(query, length) + "')", "Javascript: logout('http://www.autohausaz.com/membersonly/logout.aspx" + location.href.substring(query, length) + "')", 95);
		}
	}
	else
		menu.addItem("login", "Log Out", "Log Out of Your Account", "Javascript: logout('http://www.autohausaz.com/membersonly/logout.aspx" + location.href.substring(query, length) + "')", "Javascript: logout('http://www.autohausaz.com/membersonly/logout.aspx" + location.href.substring(query, length) + "')", 95);
	menu.addItem("shop", "Shopping", "Shopping Area & Info", null, "/search/category.aspx" + location.href.substring(query, length), 95);
	menu.addItem("faqs", "FAQs", "Answers to Frequently Asked Questions",  null, "/html/auto-parts-orders.html", 95);
	menu.addItem("autohaus", "My Autohaus", "Submit Parts Requests, View Quotes & Request RAs",  null, "/membersonly/account.aspx" + location.href.substring(query, length), 95);
	menu.addItem("carcare", "Car Care", "Technical & Car Care Tips",  null, "/html/tech_tips.html" + location.href.substring(query, length), 95);
	menu.addItem("links", "Links", "Additional Auto Resource Links",  null, "/html/hotlinks.html" + location.href.substring(query, length), 95);
	menu.addItem("cart", "MY CART", "View My Shopping Cart",  "/search/cart.aspx" + location.href.substring(query, length), "/search/cart.aspx" + location.href.substring(query, length), 95);
	
	menu.addSubItem("shop", "How to Shop for Parts", "Find the OE Parts You Need for Your Import Car", "/html/freequote.html");
	menu.addSubItem("shop", "Search by Car Systems", "Search Online Catalog by Category", "/search/category.aspx" + location.href.substring(query, length));
	menu.addSubItem("shop", "Search by Repair Job", "Search Online Catalog by Repair Job", "/search/repairjob.aspx" + location.href.substring(query, length));
	menu.addSubItem("shop", "Search by Part Grouping", "Search Online Catalog by Part Grouping", "/search/partgroup.aspx" + location.href.substring(query, length));
	menu.addSubItem("shop", "Special Offers", "Check Out Our Latest Special Offers Here", "/html/specials.html");
	menu.addSubItem("shop", "Products & Brands", "Check Out the OE Brands & Types of Parts We Offer You", "/html/brandnames.html");
	menu.addSubItem("shop", "OEM/OES vs. Aftermarket", "Do You Know the Differences Between Brands?", "/html/auto_parts_shopping.html");
	
	menu.addSubItem("faqs", "Contact Us", "How to Contact Autohaus", "/html/contact.html");
	menu.addSubItem("faqs", "Shopping Cart/Order How To\'s", "Answers to Your Questions on How To Place, Change or Cancel an Order", "/html/auto-parts-orders.html");
	menu.addSubItem("faqs", "Freight Policy", "Freight Policy & Your Shipping Options", "/html/freight.html");
	menu.addSubItem("faqs", "About AutohausAZ", "Everything You Always Wanted to Know About Autohaus", "/html/autohaus.html");
	menu.addSubItem("faqs", "News & Media", "AutohausAZ News, Awards & Press Coverage", "/html/autohausaz-press.html");
	menu.addSubItem("faqs", "Customer Reviews", "Read What Our Customers Have to Say About Us", "/html/customercomments.aspx");
	menu.addSubItem("faqs", "Privacy Policy", "We Protect Your Privacy & Security Rights", "/html/privacystatement.html");
	menu.addSubItem("faqs", "Returns & Warranties", "How to Return a Part to Autohaus", "/html/autohausterms.html");
	menu.addSubItem("faqs", "Site Map", "Site Map", "/html/sitemap.html");
	
	menu.addSubItem("autohaus", "View Shopping Cart", "View Shopping Cart", "/search/cart.aspx" + location.href.substring(query, length));
	menu.addSubItem("autohaus", "View/Track Order", "View Status/Track Order", "/membersonly/orders.aspx" + location.href.substring(query, length));
	menu.addSubItem("autohaus", "Change Unshipped Order", "Change/Cancel Unshipped Order",  "/membersonly/orders.aspx?" + location.href.substring(query, length) + "&action=Change");
	menu.addSubItem("autohaus", "Cancel Unshipped Order", "Change/Cancel Unshipped Order",  "/membersonly/orders.aspx?" + location.href.substring(query, length) + "&action=Cancel");
	menu.addSubItem("autohaus", "Request Return Authorization", "Request a Return Authorization", "/membersonly/orders.aspx?" + location.href.substring(query, length) + "&action=Return");
	menu.addSubItem("autohaus", "Update Personal Profile", "Update Info in Your Personal Profile", "/membersonly/updateprofile.aspx" + location.href.substring(query, length));
	menu.addSubItem("autohaus", "Change Password", "Change Password", "/membersonly/chpassword.aspx" + location.href.substring(query, length));
	menu.addSubItem("autohaus", "Change Security Question", "Change Security Questions", "/membersonly/chquestion.aspx" + location.href.substring(query, length));
	menu.addSubItem("autohaus", "Retrieve Saved Quote", "Retrieve Saved Quote", "/membersonly/quotes.aspx" + location.href.substring(query, length));
	
	menu.addSubItem("carcare", "Edit Saved Vehicles", "Edit Saved Vehicles", "/membersonly/vehicles.aspx" + location.href.substring(query, length));
	menu.addSubItem("carcare", "View Service Schedule", "View Scheduled Services", "/membersonly/service.aspx" + location.href.substring(query, length));
	menu.addSubItem("carcare", "View Service Log", "View Service Logs", "/membersonly/service.aspx" + location.href.substring(query, length));
	menu.addSubItem("carcare", "View Service Profile", "View Profiles", "/membersonly/service.aspx" + location.href.substring(query, length));
	menu.addSubItem("carcare", "Gasoline Alley - Tech Tips", "Check Out the Latest Tech Tips", "/html/tech_tips.html");
	menu.addSubItem("carcare", "Import Auto News - Car Care Tips", "Read Technical & Car Care Tips from Other DIYers", "/html/import-auto-news.html");
	menu.addSubItem("carcare", "Share YOUR Tech Tip", "Share Your Car Care Tip with Other DIYers", "/html/submittips.aspx");
	
	menu.addSubItem("links", "Hot Auto Links", "THE Most Complete Automotive Resource Guide",  "/html/hotlinks.html");
	menu.addSubItem("links", "Add YOUR Site Link", "Have an Automotive Website? Add Your Site Here", "/html/requestlinks.aspx" + location.href.substring(query, length));
	menu.addSubItem("links", "Link Code Options", "Here is How to Link to Autohaus", "/html/linkoptions.html");

	menu.showMenu();
	
	// write Google Analytics js library
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
	document.write('<script type="text/javascript" src="../assets/jquery-latest.js" ></script>');
	document.write('<script type="text/javascript" src="../assets/thickbox.js" ></script>');
	document.write('<link rel="stylesheet" href="../assets/thickbox.css" type="text/css" media="screen" />');
	// script to call ga.js file for tracking script in footer
	if(typeof(_gat)!='object')document.write('<sc'+'ript src="http'+
	(document.location.protocol=='https:'?'s://ssl':'://www')+
	'.google-analytics.com/ga.js"></sc'+'ript>')
}

// website optimizer code - control script
_udn = "autohausaz.com"
function utmx_section(){}function utmx(){}
(function(){var k='1748111119',d=document,l=d.location,c=d.cookie;function f(n){
if(c){var i=c.indexOf(n+'=');if(i>-1){var j=c.indexOf(';',i);return c.substring(i+n.
length+1,j<0?c.length:j)}}}var x=f('__utmx'),xx=f('__utmxx'),h=l.hash;
d.write('<sc'+'ript src="'+
'http'+(l.protocol=='https:'?'s://ssl':'://www')+'.google-analytics.com'
+'/siteopt.js?v=1&utmxkey='+k+'&utmx='+(x?x:'')+'&utmxx='+(xx?xx:'')+'&utmxtime='
+new Date().valueOf()+(h?'&utmxhash='+escape(h.substr(1)):'')+
'" type="text/javascript" charset="utf-8"></sc'+'ript>')})();
