if(document.images){
	var nav_on = new Image();
	nav_on.src = "/nav/images/roll_on.gif";
	var nav_off = new Image();
	nav_off.src = "/nav/images/roll_off.gif";
	
	var sub_on = new Image();
	sub_on.src = "/nav/images/sub_on.gif";
	var sub_off = new Image();
	sub_off.src = "/nav/images/sub_off.gif";
}
function navRoll(rollPoss,direction,keepOn){
	if(direction == "on" && rollPoss != keepOn){
		document.images[rollPoss].src = nav_on.src;
	}
	else if(direction == "off" && rollPoss != keepOn){
		document.images[rollPoss].src = nav_off.src;
	}
	else{
		return;
	}
}
function subRoll(rollPoss,direction,SkeepOn){
	if(direction == "on" && rollPoss != SkeepOn){
		document.images[rollPoss].src = sub_on.src;
	}
	else if(direction == "off" && rollPoss != SkeepOn){
		document.images[rollPoss].src = sub_off.src;
	}
	else{
		return;
	}
}

//##############################################################################
//#########                                                            #########
//#########      if you need to change the menu itmes all you          #########
//#########      need to do is add it to end of the list               #########
//#########                                                            #########
//#########      + if you need to remove an item just set the first    #########
//#########        item to "" (blank) and the function will not        #########
//#########        write anything for that item and you will not       #########
//#########        to change the number on every page.                 #########
//#########                                                            #########
//##############################################################################




var menuItems = new Array();
var urlLinks = new Array();
// SET ORDER HERE ie if you want #11 of your array after # 2 set it to this new Array(0,1,2,11,3,4,5,6,7,8,9,10)
var setToPlace = new Array(0,1,2,3,4,5,6,7,8,9);


// ##### nav posstion 0 ##########
menuItems[0] = new Array();
urlLinks[0] = new Array();
menuItems[0][0] = "Advil Home";								urlLinks[0][0] = "/index.asp";

// ##### nav posstion 1 ##########
menuItems[1] = new Array();
urlLinks[1] = new Array();
menuItems[1][0] = "Adult Products";								urlLinks[1][0] = "/products/index.asp";
menuItems[1][1] = "Advil";										urlLinks[1][1] = "/products/advil/index.asp";
menuItems[1][2] = "Advil Migraine";							urlLinks[1][2] = "/products/migraine/index.asp";
menuItems[1][3] = "Advil Cold & Sinus";						urlLinks[1][3] = "/products/cns/index.asp";
menuItems[1][4] = "Advil Allergy Sinus";						urlLinks[1][4] = "/products/aas/index.asp";
menuItems[1][5] = "Advil Flu & Body Ache";						urlLinks[1][5] = "/products/flu/index.asp";
menuItems[1][6] = "Advil Multi-Symptom Cold";						urlLinks[1][6] = "/products/msc/index.asp";

// ##### nav posstion 2 ##########
menuItems[2] = new Array();
urlLinks[2] = new Array();
menuItems[2][0] = "Children's Products";							urlLinks[2][0] = "/childrens/index.asp"
menuItems[2][1] = "Infant Drops";									urlLinks[2][1] = "/childrens/infant/index.asp";
menuItems[2][2] = "Pain & Fever";									urlLinks[2][2] = "/childrens/pain/index.asp";
menuItems[2][3] = "Cold";											urlLinks[2][3] = "/childrens/cold/index.asp";
menuItems[2][4] = "Allergy Sinus";									urlLinks[2][4] = "/childrens/allergysinus/index.asp";

// ##### nav posstion 3 ##########
menuItems[3] = new Array();
urlLinks[3] = new Array();
menuItems[3][0] = "Children's Advil Solutions" ; 					urlLinks[3][0] = "/childrensadvilsolutions/index.asp"; 
menuItems[3][1] = "Back To School";									urlLinks[3][2] = "javascript:openTip();";
menuItems[3][2] = "Relief for Summer Colds";						urlLinks[3][1] = "javascript:openTip();";
// ##### nav posstion 4 ##########
menuItems[4] = new Array();
urlLinks[4] = new Array();
menuItems[4][0] = "Pain Free Living";										urlLinks[4][0] = "/painfree/index.asp"
menuItems[4][1] = "Children's Care Tips";									urlLinks[4][1] = "/painfree/children.asp"
menuItems[4][2] = "Learning Center";										urlLinks[4][2] = "/painfree/learningcenter/index.asp"

// ##### nav posstion 5 ##########
menuItems[5] = new Array();
urlLinks[5] = new Array();
menuItems[5][0] = "FAQ";									urlLinks[5][0] = "/faq/index.asp"

// ##### nav posstion 6 ##########
menuItems[6] = new Array();
urlLinks[6] = new Array();
menuItems[6][0] = "Healthcare Professionals";						urlLinks[6][0] = "/healthcareprofessionals/index.asp"

// ##### nav posstion 7 ##########
menuItems[7] = new Array();
urlLinks[7] = new Array();
menuItems[7][0] = "Buy Online";						urlLinks[7][0] = "/buyonline/index.asp"

// ##### nav posstion 8 ##########
menuItems[8] = new Array();
urlLinks[8] = new Array();
menuItems[8][0] = "Find A Store Near You";						urlLinks[8][0] = "/findstore/index.asp"

// ##### nav posstion 9 ##########
menuItems[9] = new Array();
urlLinks[9] = new Array();
menuItems[9][0] = "Wyeth Special Offers";						urlLinks[9][0] = "http://www.wyethconsumerhealthcarespecialoffers.com/"

//function to write out the nav.
function Make2Nav(keepOn,subOn){
	stayOn = "n"+keepOn
	document.write('<table border="0" cellspacing="2" cellpadding="0" width="160" id="nav">');
	// loop through to make the main nav items
	for(var m=0; m<menuItems.length;m++){
		i = setToPlace[m]
		if(menuItems[i][0] != ""){
		// set up the rollover function and put in the image name for each of the main nav items
		navID = "n"+i;
		onFunck = "navRoll('"+navID+"','on',stayOn);";
		offFunck = "navRoll('"+navID+"','off',stayOn);";
		//check to see if one of the main nav items should be lite up
		if(keepOn == i){
			document.write('<tr>');
			document.write('	<td width="30" valign="top" align="right" class="img"><img src="/nav/images/roll_on.gif" alt="" name="'+navID+'" id="'+navID+'" width="9" height="9" hspace="3" vspace="5" border="0"></td>');
			document.write('	<td width="130"><a href="'+urlLinks[i][0]+'" class="gnavOn" onmouseover="'+onFunck+'" onmouseout="'+offFunck+'">'+menuItems[i][0]+'</a></td>');
			document.write('</tr>');
			//check to see if there is any sub nav items
			if(menuItems[keepOn].length >= 2){ // if yes there are sub nav items
			document.write('<tr>');
			document.write('	<td colspan="2">');
			SstayOn = "s"+subOn
			// loop through the sub nav items for the main nav item that is lite up
			for(var d=1;d<menuItems[keepOn].length;d++){
				navID = "s"+d;
				onFunck = "subRoll('"+navID+"','on',SstayOn);";
				offFunck = "subRoll('"+navID+"','off',SstayOn);";
				//check to see if the sub nav should be lite up as well
				if(subOn == d){
					document.write('	<table width="160" border="0" cellspacing="2" cellpadding="0">');
					document.write('	<tr>');
					document.write('		<td width="40" valign="top" align="right" class="img"><img src="/nav/images/sub_on.gif" width="5" height="5" border="0" alt="" hspace="3" vspace="5" name="'+navID+'"></td>');
					document.write('		<td width="120"><a href="'+urlLinks[keepOn][d]+'" class="snavOn" onmouseover="'+onFunck+'" onmouseout="'+offFunck+'">'+menuItems[keepOn][d]+'</a></td>');
					document.write('	</tr>');
					document.write('	</table>');
				}// end if
				//if none of the sub navs should be lite up
				else{
					document.write('	<table width="160" border="0" cellspacing="2" cellpadding="0">');
					document.write('	<tr>');
					document.write('		<td width="40" valign="top" align="right" class="img"><img src="/nav/images/sub_off.gif" width="5" height="5" border="0" alt="" hspace="3" vspace="5" name="'+navID+'"></td>');
					document.write('		<td width="120"><a href="'+urlLinks[keepOn][d]+'" class="snav" onmouseover="'+onFunck+'" onmouseout="'+offFunck+'">'+menuItems[keepOn][d]+'</a></td>');
					document.write('	</tr>');
					document.write('	</table>');				
				} // end else

			} // end sub nav lite up loop
			document.write('	</td>');
			document.write('</tr>');
			document.write('<tr>');
			document.write('	<td colspan="2"><img src="/images/dot.gif" width="1" height="3" border="0" alt=""></td>');
			document.write('</tr>');
			}//end sub nav loop
			else{// add white space if there is no subnav to on state
			document.write('<tr>');
			document.write('	<td colspan="2"><img src="/images/dot.gif" width="1" height="3" border="0" alt=""></td>');
			document.write('</tr>');
			}
		}// end check to see if main nav should be lite up
		// if main nav is not lite up
		else{
			
			document.write('<tr>');
			document.write('	<td width="30" valign="top" align="right" class="img"><img src="/nav/images/roll_off.gif" alt="" name="'+navID+'" id="'+navID+'" width="9" height="9" hspace="3" vspace="5" border="0"></td>');
			document.write('	<td width="130"><a href="'+urlLinks[i][0]+'" class="gnav" onmouseover="'+onFunck+'" onmouseout="'+offFunck+'">'+menuItems[i][0]+'</a></td>');
			document.write('</tr>');
			document.write('<tr>');
			document.write('	<td colspan="2"><img src="/images/dot.gif" width="1" height="3" border="0" alt=""></td>');
			document.write('</tr>');
		}// end else
		}
	}// end main nav lite up loop
	document.write('<tr><td><img src="/images/dot.gif" width="30" height="1" border="0" alt=""></td><td><img src="/images/dot.gif" width="130" height="1" border="0" alt=""></td></tr>')
	document.write('</table>');
}// end function