﻿// JScript File
// set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. 
// but you can experiment with effect on loadtime.
if (TransMenu.isSupported()) {

	//==================================================================================================
	// create a set of dropdowns
	//==================================================================================================
	// the first param should always be down, as it is here
	//
	// The second and third param are the top and left offset positions of the menus from their actuators
	// respectively. To make a menu appear a little to the left and bottom of an actuator, you could use
	// something like -5, 5
	//
	// The last parameter can be .topLeft, .bottomLeft, .topRight, or .bottomRight to inidicate the corner
	// of the actuator from which to measure the offset positions above. Here we are saying we want the 
	// menu to appear directly below the bottom left corner of the actuator
	//==================================================================================================
	var ms = new TransMenuSet(TransMenu.direction.down, 1, 0, TransMenu.reference.bottomLeft);

	//==================================================================================================
	// create a dropdown menu
	//==================================================================================================
	// the first parameter should be the HTML element which will act actuator for the menu
	//==================================================================================================
	var menu1 = ms.addMenu(document.getElementById("aAboutUs"));
	menu1.addItem("Nippon Paint In Malaysia", "about_us.htm"); 
	menu1.addItem("Nippon Paint Technologies", "nippon_paint_technologies.htm"); 
	menu1.addItem("Research & Development", "research_development.htm"); 
	menu1.addItem("Worldwide Network", "worldwide_network.htm"); 

	//==================================================================================================

	//==================================================================================================
	var menu2 = ms.addMenu(document.getElementById("aColourCreations"));
	menu2.addItem("How It Works", "how_it_works.htm");
	menu2.addItem("The Role Of Colours", "the_role_of_colours.htm");
	menu2.addItem("Colour Schemes", "colour_schemes.htm");
	menu2.addItem("Visual Effects With Colours", "visual_effects_with_colours.htm");
	menu2.addItem("Colour Inspiration", "colour_inspiration.htm");
	menu2.addItem("Creative Wall Painting", "colour-wallart.htm");
	menu2.addItem("Great Home Makeovers that Cost So Little", "colour-makeover.htm");

	//==================================================================================================

	//==================================================================================================
	var menu3 = ms.addMenu(document.getElementById("aFindProducts"));
	menu3.addItem("Wall Sealer","wall_sealer.htm");
	menu3.addItem("Interior Walls","interior_walls.htm");
	menu3.addItem("Exterior Walls and Roof","exterior_walls_and_roof.htm");
	menu3.addItem("Metal And Wood","metal_and_wood.htm");
	menu3.addItem("Auto Refinish Paint","nax_premila2K.htm");

	//==================================================================================================

	//==================================================================================================
	var menu4 = ms.addMenu(document.getElementById("aPaintingGuide"));
	menu4.addItem("Getting Started", "getting_started.htm");
	menu4.addItem("Painting Tips", "painting_tips.htm");
	menu4.addItem("Safety And Cleaning Tips", "safety_cleaning_tips.htm");
	menu4.addItem("Paint Estimator", "paint_estimator.htm");
	menu4.addItem("Common Painting Problems", "common_painting_problems.htm");

	//==================================================================================================

	//==================================================================================================
	var menu5 = ms.addMenu(document.getElementById("aNewsUpdates"));
	menu5.addItem("Colour Trends 2010", "colour-trends.htm");
	menu5.addItem("Deko Idaman TV3", "deko_idaman.htm");
	menu5.addItem("Get Inspired To Paint", "get_inspired_to_paint.htm");
	menu5.addItem("Your World, Your Colour", "javascript:popUp('http://www.nipponpaint.com.my/your-world-your-colour/','window','toolbar=yes,location=yes,directories=yes,status=no,menubar=yes,scrollbars=no,resizable=yes,width=1000,height=600')");
	menu5.addItem("Young Designer Award 2008", "youngdesigner_award.htm");
	menu5.addItem("Young Designer Award 2009", "youngdesigner_award2009.htm");

	//==================================================================================================

    //==================================================================================================
	var menu6 = ms.addMenu(document.getElementById("aColourSchemeServices"));
	menu6.addItem("How It Works", "http://www.nipponpaint.com.my/colourschemeservice/howitworks.htm");
	menu6.addItem("The Packages", "http://www.nipponpaint.com.my/colourschemeservice/thepackages.htm");
	menu6.addItem("What You Get", "http://www.nipponpaint.com.my/colourschemeservice/whatyouget.htm");
	menu6.addItem("Subscribe Now", "http://www.nipponpaint.com.my/colourschemeservice/subscribe.php");
	menu6.addItem("Member Login", "http://www.nipponpaint.com.my/colourschemeservice/login.php");

	//==================================================================================================
	
	//==================================================================================================
	// write drop downs into page
	//==================================================================================================
	// this method writes all the HTML for the menus into the page with document.write(). It must be
	// called within the body of the HTML page.
	//==================================================================================================
	TransMenu.renderAll();
}

function popUp (url,name,widgets)
{
popupWin = window.open (url,name,widgets);
popupWin.opener.top.name="opener";
popupWin.focus();
}