	//create menuitem
	var imgdir = "images/";
	var b= document.getElementById("Hmenu_bar");
	var anchors = b.getElementsByTagName('a');
	if(type==6){
        image1="images/CR_point_line.jpg";
        image2="images/CR_point.jpg";
        image3="images/CR_point_arrow.jpg";
    }
    if(type==1){
        image1="images/submenuBt.jpg";
        image2="images/CP_menuPoint.jpg";
        image3="images/menu_Point.jpg";
    }
     if(type==8){
        image1="images/submenuBt.jpg";
        image2="images/CON_POINT.jpg";
        image3="images/menu_Point.jpg";
    }
     if(type==5){
        image1="images/submenuBt.jpg";
        image2="images/CORP_POINT.jpg";
        image3="images/menu_Point.jpg";
    }
      if(type==3){
        image1="images/IN_submenuBt.jpg";
        image2="images/IN_POINT.jpg";
        image3="images/menu_Point.jpg";
    }
     if(type==7){
        image1="images/HNW_menu_Point.jpg";
        image2="images/HNW_POINT.jpg";
        image3="images/HNW_menu_Point.jpg";
    }
    if(type==2){
        image1="images/submenuBt.jpg";
        image2="images/PR_POINT.jpg";
        image3="images/menu_Point.jpg";
    }
    if(type==4){
        image1="images/submenuBt.jpg";
        image2="images/IN_POINT.jpg";
        image3="images/in_menu_Point.jpg";
    }
	function setMenuSrc(menuanchor)
	{
		//var firstChild = menuanchor.firstChild;
	//var firstChild = menuanchor.firstChild;

	    for (var i = 0 ; i < menuanchor.childNodes.length ; i ++){
        var firstChild = menuanchor.childNodes[i];		 
		    try{
		        var myRegExp = /menu_1_sub/;
                var matchPos1 = firstChild.parentNode.className.search(myRegExp);
		        if(matchPos1 != -1){		   
		            firstChild.parentNode.className="menu_1_sub_over";
		            var img = firstChild.parentNode.parentNode.parentNode.getElementsByTagName('img');
		            if(img.length==1){
		                myRegExp = /submenuBt_gray/;
		                matchPos1 =  img[0].src.search(myRegExp);
		                if(matchPos1 != -1){
		                    img[0].src=image1;		            
		                    firstChild.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.style.display="";
		                }
		            }
		       }else{
						myRegExp = /menu_1/;
						matchPos1 = firstChild.parentNode.className.search(myRegExp);              
						if(matchPos1 != -1){		 
							firstChild.parentNode.className="menu_1_over";
							var img = firstChild.parentNode.parentNode.parentNode.getElementsByTagName('img');
							if(img.length==1){
								myRegExp = /CP_menuPoint_dark/;
								matchPos1 =  img[0].src.search(myRegExp);
								if(matchPos1 != -1){
									img[0].src=image2;
									img[0].height=9;
									if(firstChild.parentNode.id!=""){
									    var TbRow = b.getElementsByTagName('tr');
									    for (var z = 0 ; z < TbRow.length ; z ++){
									        myRegExp = new RegExp(firstChild.parentNode.id);
						                    matchPos1 =  TbRow[z].id.search(myRegExp);              
						                    if(matchPos1 != -1)
						                        TbRow[z].style.display="";
									     }
									 }
							    }
								else{
									myRegExp = /menu_Point_gray/;
									matchPos1 =  img[0].src.search(myRegExp);
									if(matchPos1 != -1){
										img[0].src=image3;   
									}
								}
							}
					    }
				}
		  } catch(x){alert('abc');}
	    
		}
	}
	function checkMenu(menuanchor){
	 for (var i = 0 ; i < menuanchor.childNodes.length ; i ++){
var firstChild = menuanchor.childNodes[i];
		  //  if (firstChild==undefined) return;
		    /*if (firstChild.src==undefined) return;
		    */
		  try{
		    if(firstChild.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id=="leftmenu1"||firstChild.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id=="leftmenu2a"||firstChild.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id=="leftmenu"||firstChild.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id=="leftmenu2"||firstChild.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.id=="leftmenu3")
		            return true;
			else
			        return false;
		  }catch(x){}
	      /*  try{
		        var i = firstChild.src.split(".gif");
		        if (i[0]!=undefined)
		        {		    
		            if( firstChild.src.match("gif") !=null && firstChild.src.match("x.gif") ==null && firstChild.src.match("top-")==null)
			            return true;
			        else
			            return false;
		        }
            }catch(ex){}*/
       }
       return false;
	}
	var showoncestr = "";
	
	current_page.replace(" ", "");
	var cp = current_page.split(",");
	if(pageID!=""){
	    var cpageID = pageID.split(",");
	    for (var j=0; j<cpageID.length; j++)
	    {
	        for(var i=0; i<anchors.length; i++)
		    {
    	
			    if (anchors[i].id.match(cpageID[j]))
			    {		
					    setMenuSrc(anchors[i]);				
			    }
		    }
	    }
	}
	var showcnt = 0;	
	for (var j=0; j<cp.length; j++)
	{
		for(var i=0; i<anchors.length; i++)
		{
	
			if (anchors[i].href.match(cp[j]) && !anchors[i].href.match("#") )
			{
				

				
				if (showonce)
				{				
					if (showoncestr=="" || !showoncestr.match(anchors[i].href))
					{				
					    if (checkMenu(anchors[i]))
						    showoncestr += anchors[i].href;
						setMenuSrc(anchors[i]);
						break;
					}
				} else if (shownum!="") {
			
					if (shownum>=showcnt)
					{
						setMenuSrc(anchors[i]);
						showcnt++;
					}
				} else {				
					setMenuSrc(anchors[i]);
				}
			}
		}
}
