function Browser() {

  var ua, s, i;

  this.isIE    = false;  // Internet Explorer
  this.isOP    = false;  // Opera
  this.isNS    = false;  // Netscape
  this.version = null;

  ua = navigator.userAgent;

  s = "Opera";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isOP = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  s = "Netscape6/";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }

  // Treat any other "Gecko" browser as Netscape 6.1.

  s = "Gecko";
  if ((i = ua.indexOf(s)) >= 0) {
    this.isNS = true;
    this.version = 6.1;
    return;
  }

  s = "MSIE";
  if ((i = ua.indexOf(s))) {
    this.isIE = true;
    this.version = parseFloat(ua.substr(i + s.length));
    return;
  }
}

var browser = new Browser();
function setNav(){
				 				objParent = document.getElementsByTagName("UL");
								//arrChildren = objParent.childNodes;
								for(i=0;i<objParent.length;i++){
																									//alert(objParent[i].parentNode.nodeName);
																									if(objParent[i].parentNode.nodeName=="LI"){
																																														 objParent[i].style.display="none";
																																														}
																									}
}
var eleList=new Array(5);
var lastEle="";
 function showChild(ele){
 //alert(ele.parentNode.lastChild.nodeName);
 																					pointer=ele;var depth=0;
																					while(pointer.parentNode.nodeName!="DIV"){
																																								if(pointer.parentNode.nodeName=="UL"){
																																																											depth++;
																																																											}
																																								pointer=pointer.parentNode;
																																								}
 if((ele.parentNode.childNodes).length>1){

																					//alert(depth)
																					//alert(ele.parentNode.lastChild.nodeName);
																					ele.parentNode.lastChild.style.display="block";
 																					ele.parentNode.lastChild.style.position="absolute";
																					// I hate IE here comes some browser sniffing
																					if(browser.isIE){
																													 if(browser.version=="5.01"){
																													 														 if(depth>1){ele.parentNode.lastChild.style.left=(ele.offsetWidth*1.05)+"px";}
																																											 																																						 else{
																																																																																	 			ele.parentNode.lastChild.style.left=(ele.offsetWidth*.88)+"px";
																																																																																				}
																																											 }
																																											 
																													 if(browser.version=="5.5"){
																													 														 if(depth>1){ele.parentNode.lastChild.style.left=(ele.offsetWidth*.8)+"px";}
																																											 																																						 else{
																																																																																	 			ele.parentNode.lastChild.style.left=(ele.offsetWidth*.87)+"px";
																																																																																				}
																																											 }
																													 if(browser.version=="6"){
																													 														 if(depth>1){ele.parentNode.lastChild.style.left=(ele.offsetWidth*.92)+"px";}
																																											 																																						 else{
																																																																																	 			ele.parentNode.lastChild.style.left=(ele.offsetWidth*.97)+"px";
																																																																																				}
																																											 }
																													 //alert(browser.version)
																													 }else{
																													 			 if(depth>1){ele.parentNode.lastChild.style.left=(ele.offsetWidth*.9)+"px";}
																																 																																						else{
																																																																								 ele.parentNode.lastChild.style.left=(ele.offsetWidth*.96)+"px";
																																																																								 }
																																 }
																					//alert(ele.offsetHeight)
																					ele.parentNode.lastChild.style.top="0";
																					ele.parentNode.lastChild.style.width="9em";
																					//alert(ele.parentNode.lastChild.nodeName);
																					//ele.parentNode.lastChild.style.zIndex="1000";
																					//ele.style.zIndex="1000";
																					ele.className="active";
																					for(i=eleList.length;i>=(depth);i--){
																					//alert("Value"+i+" = "+eleList[i]);
																																						if(typeof(eleList[i])!="undefined" && eleList[i]!="" && eleList[i]!=ele){
																																																		 										eleList[i].parentNode.lastChild.style.display="none";
																																																												eleList[i].className="";
																																																												eleList[i]="";
																																																												}
																																						}

 																						eleList[depth]=ele;
																						lastEle=ele;	
																						//alert(eleList[depth]);					 
 																						}
																						else{
																						  	for(i=eleList.length;i>=depth;i--){
																																							//alert("Value"+i+" = "+eleList[i]);
																																							
																																							if(typeof(eleList[i])!="undefined" && eleList[i]!=""){
																																															 										 ///alert(eleList[i].nodeName);
																																																									 eleList[i].parentNode.lastChild.style.display="none";
																																																									 eleList[i].className="";
																																																									 eleList[i]="";
																																																									 }
																																							}
															
																									}
}
function checkOpen(target){
				 						 for(i=0;i<eleList.length;i++){
										 															 if(eleList[i]==target){
																									 												return false;
																																					}
																									 }
																									 
										 }
if (browser.isIE){
  document.onmousedown = pageMousedown;}
else{
  document.addEventListener("mousedown", pageMousedown, true);}
function pageMousedown(event){
				 							 				//alert(lastEle);
															if(lastEle==""){return;}
											 		
				 							 				if (browser.isIE){
																 								el = window.event.srcElement;
  																							}
															else{
																	 el = (event.target.tagName ? event.target : event.target.parentNode);
																	 }
    													if(el.nodeName!="A"){
																						  	for(i=eleList.length;i>=0;i--){
																																							//alert("Value"+i+" = "+eleList[i]);
																																							
																																							if(typeof(eleList[i])!="undefined" && eleList[i]!=""){
																																															 										 ///alert(eleList[i].nodeName);
																																																									 eleList[i].parentNode.lastChild.style.display="none";
																																																									 eleList[i].className="";
																																																									 eleList[i]="";
																																																									 }
																																							}
											 															}
											 }