
function LeftMenu(inMenu1,inMenu2,inMenu3)
{
	var xmlDoc = new ActiveXObject("MSXML.DOMDocument");
	xmlDoc.async = false;
	xmlDoc.load("http://sunday.joins.com/_include/menu/menu.xml");
//	xmlDoc.load("http://sunday.joins.com/_ui/test/menu.xml");

	if(xmlDoc.parseError != 0){}
	else
	{
		// ·çÆ® ¿ä¼ÒÃ£±â
		var xroot = xmlDoc.documentElement;
		var node1 = xroot.getElementsByTagName("menu1");		
		navLnk="";
		navLnk="<table width='135px' cellspacing='0' cellpadding='0' border='0'>";
	
		// ============= 1Â÷ ¸Þ´º =============		
		if (inMenu1!="")
		{
			for (var i=0;i<node1.length;i++)
			{
				if (node1(i).attributes(0).nodeValue == inMenu1 && node1(i).nodeName=="menu1")
				{
					// ============= 2Â÷ ¸Þ´º =============
					for (var j=0;j<node1(i).childNodes.length;j++)
					{

						if(node1(i).childNodes(j).attributes(0).nodeValue >= 100){
						//if(node1(i).childNodes(j).attributes(0).nodeValue == "10" || node1(i).childNodes(j).attributes(0).nodeValue == "11" || node1(i).childNodes(j).attributes(0).nodeValue == "12" || node1(i).childNodes(j).attributes(0).nodeValue == "13" || node1(i).childNodes(j).attributes(0).nodeValue == "14" || node1(i).childNodes(j).attributes(0).nodeValue == "27" || node1(i).childNodes(j).attributes(0).nodeValue == "28"){
						
									if(node1(i).childNodes(j).attributes(0).nodeValue == "100")
									{
										navLnk+="<tr>";
										navLnk+="<td height='10px'></td>";
										navLnk+="</tr>";
									}

									navLnk+="<tr>";
									navLnk+="<td>";
	
									var bgcolor = node1(i).childNodes(j).attributes(3).nodeValue;				

									if (inMenu2 == node1(i).childNodes(j).attributes(0).nodeValue)
									{
										if(0 < node1(i).childNodes(j).childNodes.length){
											navLnk+="<div id='left_dot' class='left_line5'><dl><dt><a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'><span style='color:"+ bgcolor +";'>"+ node1(i).childNodes(j).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</span></a></dt></dl></div>";											
										}else
										{
											navLnk+="<div id='left_dot' class='left_line4'><dl><dt><a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'><span style='color:"+ bgcolor +";'>"+ node1(i).childNodes(j).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</span></a></dt></dl></div>";											
										}
									}
									else
									{
										navLnk+="<div id='left_dot' class='left_line4'><dl><dt><a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'>"+ node1(i).childNodes(j).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</a></dt></dl></div>";	
									}

									// ============= 3Â÷ ¸Þ´º =============
									if (inMenu2 == node1(i).childNodes(j).attributes(0).nodeValue)
									{
										if(0 < node1(i).childNodes(j).childNodes.length)
										{
											navLnk+="<div class='left_line1' id='left_line4' style='padding:5 0 5 0px;'>";

											for (var k=0;k<node1(i).childNodes(j).childNodes.length;k++)
											{
												if (inMenu3 == node1(i).childNodes(j).childNodes(k).attributes(0).nodeValue)
												{
													if(node1(i).childNodes(j).attributes(0).nodeValue=="140" && node1(i).childNodes(j).childNodes(k).attributes(0).nodeValue=="03"){
														navLnk+="<dl><dt><a href='https://jjlogin.joins.com/unitemembership/membership.asp' target='_blank'><span style='color:"+ bgcolor +";'>"+ node1(i).childNodes(j).childNodes(k).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</span></a></dt></dl>";													
													}else{
														navLnk+="<dl><dt><a href='"+ node1(i).childNodes(j).childNodes(k).attributes(2).nodeValue +"'><span style='color:"+ bgcolor +";'>"+ node1(i).childNodes(j).childNodes(k).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</span></a></dt></dl>";
													}
												}
												else
												{
													if(node1(i).childNodes(j).attributes(0).nodeValue=="140" && node1(i).childNodes(j).childNodes(k).attributes(0).nodeValue=="03"){
														navLnk+="<dl><dt><a href='https://jjlogin.joins.com/unitemembership/membership.asp' target='_blank'>"+ node1(i).childNodes(j).childNodes(k).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</a></dt></dl>";	
													}else{
														navLnk+="<dl><dt><a href='"+ node1(i).childNodes(j).childNodes(k).attributes(2).nodeValue +"'>"+ node1(i).childNodes(j).childNodes(k).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</a></dt></dl>";	
													}
												}
											}
											
											navLnk+="</div>";

										}

									}// 3Â÷ ¸Þ´º	


									navLnk+="</td>";
									navLnk+="</tr>";

						}else{

									var bgcolor = node1(i).childNodes(j).attributes(3).nodeValue;

									if (inMenu2 == node1(i).childNodes(j).attributes(0).nodeValue)
									{
											navLnk+="<tr>";
											navLnk+="<td>";
											if(node1(i).childNodes(j).attributes(0).nodeValue == "60" || node1(i).childNodes(j).attributes(0).nodeValue == "70"  || node1(i).childNodes(j).attributes(0).nodeValue == "11")
											{
												navLnk+="<a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'><img src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(4).nodeValue +"_on.gif' width='133' height='26' alt='"+ node1(i).childNodes(j).attributes(1).nodeValue +"'></a>";
											}
											else
											{
												navLnk+="<a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'><img src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(4).nodeValue +"_on.gif' width='133' height='23' alt='"+ node1(i).childNodes(j).attributes(1).nodeValue +"'></a>";
											}
											navLnk+="</td>";
											navLnk+="</tr>";
									}
									else
									{
											navLnk+="<tr>";

										if(node1(i).childNodes(j).attributes(0).nodeValue !="60" && node1(i).childNodes(j).attributes(0).nodeValue !="70" && node1(i).childNodes(j).attributes(0).nodeValue !="11" ){
										
												if(node1(i).childNodes(j).attributes(0).nodeValue !="30")
												{
													navLnk+="<td class='left_line1'>";
												}
												else
												{
													navLnk+="<td>";
												}

											//	alert(node1(i).childNodes(j).attributes(4).nodeValue);
												navLnk+="<a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'><img src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(4).nodeValue +"_off.gif' width='133' height='23' alt='"+ node1(i).childNodes(j).attributes(1).nodeValue +"' name='sr"+ node1(i).childNodes(j).attributes(0).nodeValue +"' onMouseOver=document.sr"+ node1(i).childNodes(j).attributes(0).nodeValue +".src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(0).nodeValue +"_on.gif' onMouseOut=document.sr"+ node1(i).childNodes(j).attributes(0).nodeValue +".src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(0).nodeValue +"_off.gif'></a>";
												navLnk+="</td>";
												navLnk+="</tr>";

										}
										else
										{
												navLnk+="<tr><td>";
												navLnk+="<a href='"+ node1(i).childNodes(j).attributes(2).nodeValue +"'><img src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(4).nodeValue +"_off.gif' width='133' height='26' alt='"+ node1(i).childNodes(j).attributes(1).nodeValue +"' name='sr"+ node1(i).childNodes(j).attributes(0).nodeValue +"' onMouseOver=document.sr"+ node1(i).childNodes(j).attributes(0).nodeValue +".src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(0).nodeValue +"_on.gif' onMouseOut=document.sr"+ node1(i).childNodes(j).attributes(0).nodeValue +".src='http://images.joins.com/ui_jmn/jsunday07/images/leftmenu_"+ node1(i).childNodes(j).attributes(0).nodeValue +"_off.gif'></a>";
												navLnk+="</td>";
												navLnk+="</tr>";

										}
									}

									//if(inMenu3!=""){
									
											// ============= 3Â÷ ¸Þ´º =============
											if (inMenu2 == node1(i).childNodes(j).attributes(0).nodeValue)
											{
												if(0 < node1(i).childNodes(j).childNodes.length)
												{
													navLnk+="<tr>";

													var strid
													strid = "4"
													if(node1(i).childNodes(j).attributes(0).nodeValue=="01"){strid="5";}
													if(node1(i).childNodes(j).attributes(0).nodeValue=="04"){strid="5";}
													if(node1(i).childNodes(j).attributes(0).nodeValue=="05"){strid="7";}
													if(node1(i).childNodes(j).attributes(0).nodeValue=="06"){strid="8";}

													if(node1(i).childNodes(j).attributes(0).nodeValue == "30"){
															navLnk+="<td id='left_line"+ strid +"' style='padding:5 0 5 0px;'>";
													}else{
															navLnk+="<td class='left_line1' id='left_line"+ strid +"' style='padding:5 0 5 0px;'>";
													}

													for (var k=0;k<node1(i).childNodes(j).childNodes.length;k++)
													{
														if (inMenu3 == node1(i).childNodes(j).childNodes(k).attributes(0).nodeValue)
														{												
															navLnk+="<dl><dt><a href='"+ node1(i).childNodes(j).childNodes(k).attributes(2).nodeValue +"'><span style='color:"+ bgcolor +";'>"+ node1(i).childNodes(j).childNodes(k).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</span></a></dt></dl>";	
														}
														else
														{
															navLnk+="<dl><dt><a href='"+ node1(i).childNodes(j).childNodes(k).attributes(2).nodeValue +"'>"+ node1(i).childNodes(j).childNodes(k).attributes(1).nodeValue.replace(/[_]/g,'<br>') +"</a></dt></dl>";	
														}
													}			

													navLnk+="</td>";
													navLnk+="</tr>";
															
												}

											}// 3Â÷ ¸Þ´º	
									//}


						}
					} // 2Â÷ ¸Þ´º		
				}
			}
		
		} // 1Â÷ ¸Þ´º

		navLnk+="</table>"
		LeftSetInnnerHTML("LeftMenu",navLnk);	
//document.write ("<textarea>" + navLnk+"</textarea>");
	}
}

function LeftSetInnnerHTML(SpanID, Message)
{
	document.all[SpanID].innerHTML = Message;
}
