function tree(tm0,tm1)
{
	this.tm2=tm1;
	this.tm3=tm0;
	this.tm4=this;
	this.tm5=[];
	this.tm6=null;
	this.tm7=-1;
	var tm8=new Image(),tm9=new Image();
	tm8.src=tm1['icon_e'];
	tm9.src=tm1['icon_l'];
	tm1['im_e']=tm8;tm1['im_l']=tm9;
	for(var i=0;i<64;i++)
		if(tm1['icon_'+i])
		{
			var tmA=new Image();
			tm1['im_'+i]=tmA;tmA.src=tm1['icon_'+i]
		}
	this.tmB=function(tmC){var tmD=this.tm5[tmC];tmD.tmE(tmD.tmF)};
	this.tmG=function(tmC){return this.tm5[tmC].tmG()};
	this.tmH=function(tmC){this.tm5[tmC].tmI(true)};
	this.tmJ=function(tmC){this.tm5[tmC].tmI()};
	this.tmK=[];for(var i=0;i<tm0.length;i++)new tmL(this,i);
	this.tmC=trees.length;trees[this.tmC]=this;
	for(var i=0;i<this.tmK.length;i++)
	{
		document.write(this.tmK[i].tmM());
	this.tmK[i].tmE()
	}
}
function tmL(tmN,tmO)
{
	this.tm7=tmN.tm7+1;this.tm3=tmN.tm3[tmO+(this.tm7?2:0)];
	if(!this.tm3)
		return;this.tm4=tmN.tm4;this.tmN=tmN;this.tmO=tmO;this.tmF=!this.tm7;this.tmC=this.tm4.tm5.length;
	this.tm4.tm5[this.tmC]=this;
	tmN.tmK[tmO]=this;this.tmK=[];
	for(var i=0;i<this.tm3.length-2;i++)new tmL(this,i);
	this.tmP=tmQ;this.tmE=tmR;this.tmG=tmS;
	this.tmM=tmT;this.tmI=tmU;
	this.tmV=function(){return this.tmO==this.tmN.tmK.length-1}
}
function tmR(tmW)
{
	var tmX=tmY('i_div'+this.tm4.tmC+'_'+this.tmC);
	if(!tmX)return;if(!tmX.innerHTML)
	{
		var tmK=[];
		for(var i=0;i<this.tmK.length;i++)
			tmK[i]=this.tmK[i].tmM();tmX.innerHTML=tmK.join('')
	}
	tmX.style.display=(tmW?'none':'block');
	this.tmF=!tmW;var tmZ=document.images['j_img'+this.tm4.tmC+'_'+this.tmC],tma=document.images['i_img'+this.tm4.tmC+'_'+this.tmC];
	if(tmZ)tmZ.src=this.tmP(true);
	if(tma)tma.src=this.tmP();
	this.tmI()}function tmS(tmb){if(!tmb)
				{
					var tmc=this.tm4.tm6;
					this.tm4.tm6=this;
					if(tmc)tmc.tmG(true)
				}
	var tma=document.images['i_img'+this.tm4.tmC+'_'+this.tmC];
	if(tma)tma.src=this.tmP();
	tmY('i_txt'+this.tm4.tmC+'_'+this.tmC).style.fontWeight=tmb?'normal':'bold';this.tmI();
	return Boolean(this.tm3[1])
}

function tmU(tmd)
{
	window.setTimeout('window.status="'+(tmd?'':this.tm3[0]+(this.tm3[1]?' ('+this.tm3[1]+')':''))+'"',10)
}
function tmT()
{
	var tme=[],tmf=this.tmN;
	for(var i=this.tm7;i>1;i--)
	{
		tme[i]='<img src="'+this.tm4.tm2[tmf.tmV()?'icon_e':'icon_l']+'" border="0" align="absbottom">';
		tmf=tmf.tmN}return '<table cellpadding="0" cellspacing="0" border="0"><tr><td nowrap>'+(this.tm7?tme.join('')+(this.tmK.length?'<a href="javascript: trees['+this.tm4.tmC+'].tmB('+this.tmC+')" onmouseover="trees['+this.tm4.tmC+'].tmJ('+this.tmC+')" onmouseout="trees['+this.tm4.tmC+'].tmH('+this.tmC+')"><img src="'+this.tmP(true)+'" border="0" align="absbottom" name="j_img'+this.tm4.tmC+'_'+this.tmC+'"></a>':'<img src="'+this.tmP(true)+'" border="0" align="absbottom">'):'')+'<a href="'+this.tm3[1]+'" onclick="return trees['+this.tm4.tmC+'].tmG('+this.tmC+')" 				            ondblclick="trees['+this.tm4.tmC+'].tmB('+this.tmC+')" onmouseover="trees['+this.tm4.tmC+'].tmJ('+this.tmC+')" onmouseout="trees['+this.tm4.tmC+'].tmH('+this.tmC+')" class="t'+this.tm4.tmC+'i" id="i_txt'+this.tm4.tmC+'_'+this.tmC+'">'+this.tm3[0]+'</a></td></tr></table>'+(this.tmK.length?'<div id="i_div'+this.tm4.tmC+'_'+this.tmC+'" style="display:none"></div>':'')
}

function tmQ(tmg)
{
	return this.tm4.tm2['icon_'+((this.tm7?0:32)+(this.tmK.length?16:0)+(this.tmK.length&&this.tmF?8:0)+(!tmg&&this.tm4.tm6==this?4:0)+(tmg?2:0)+(tmg&&this.tmV()?1:0))]}var trees=[];
	tmY=document.all?function(tmh){return document.all[tmh]}:function(tmh){return document.getElementById(tmh)
};


/*------- tree.js -----------------------------------------------------------------------------------------------------------------*/

/*
	Feel free to use your custom icons for the tree. Make sure they are all of the same size.
	User icons collections are welcome, we'll publish them giving all regards.
*/

var tree_tpl = {
	'target'  : '_blank',	// name of the frame links will be opened in
							// other possible values are: _blank, _parent, _search, _self and _top

	'icon_e'  : 'icons/empty.gif', // empty image
	'icon_l'  : 'icons/line.gif',  // vertical line

    'icon_32' : 'icons/base.gif',   // root leaf icon normal
    'icon_36' : 'icons/base.gif',   // root leaf icon selected

	'icon_48' : 'icons/base.gif',   // root icon normal
	'icon_52' : 'icons/base.gif',   // root icon selected
	'icon_56' : 'icons/base.gif',   // root icon opened
	'icon_60' : 'icons/base.gif',   // root icon selected
	
	'icon_16' : 'icons/folder.gif', // node icon normal
	'icon_20' : 'icons/folderopen.gif', // node icon selected
	'icon_24' : 'icons/folderopen.gif', // node icon opened
	'icon_28' : 'icons/folderopen.gif', // node icon selected opened

	'icon_0'  : 'icons/page.gif', // leaf icon normal
	'icon_4'  : 'icons/page.gif', // leaf icon selected
	
	'icon_2'  : 'icons/joinbottom.gif', // junction for leaf
	'icon_3'  : 'icons/join.gif',       // junction for last leaf
	'icon_18' : 'icons/plusbottom.gif', // junction for closed node
	'icon_19' : 'icons/plus.gif',       // junctioin for last closed node
	'icon_26' : 'icons/minusbottom.gif',// junction for opened node
	'icon_27' : 'icons/minus.gif'       // junctioin for last opended node
};

/*----------------------TREE ITEMS--------------------------------------------------------------------------------------------------*/


var TREE_ITEMS = 
[
	['Accounts & Entitlement Offices',0,
		['AG(A&G)-I Mumbai',0,
			['About Us',0,
				['History','HistoryMum.htm']
			],
			['Organization Strecture','orgMum.htm'],
			['Accounts',0,
				['Introduction','AccntIntroMum.htm'],
				['Monthly Accounts','MonthlyaccntMum.htm'],
				['Annual Finance Accounts','AnnualAccountMum.htm'],
				['Appropration Accounts','ApproaccountMum.htm']				
			],
			['GPF',0,
				['Introduction','GPFintroMum.htm'],
				['Eligibility to join the Fund','GPFintromum.htm#ELIGIBILITY'],
				['Nominations','GPFintromum.htm#NOMINATION'],
				['GPF Subscription','GPFintromum.htm#MANNER'],
				['GPF Guidlines','gpfotherinfoMum.htm']				
			],
			['Pension',0,
				['Introduction','pensionMum.htm'],
				['Kind of Pension','pensionMum.htm#TYPES'],
				['Authority Responsible','pensionMum.htm#AUTHORITIES'],
				['Guidlines','pensionMum.htm#FINALISATION'],
				['Pension Adalat','pensionMum.htm#ADALAT'],
			],
                        ['MACP Office ORDER' , 'MACP.htm'],
			['Contact Us','ContactMum.htm']			
		],
		['AG(A&G)-II Nagpur',0,
			['About Us',0,
				['Introduction','aboutusNag.htm'],
				['History','historyNag.htm'],
				['Function','FunctionNag.htm']
				
			],
		//	['Organization Strecture','organizationNag.htm'],
			['Accounts',0,
				['Introduction','accountNag.htm'],
				['Sector & Head Accounts','headAccNag.htm'],
				['Strecture Of The Accounts','StructAccNag.htm'],
				['Monthly Civil Accounts','civilAccNag.htm'],
				['Monthly Appropriate Accounts','civilAccNag.htm#Monthly%20Appropriation%20Accounts'],
				['Annual Finance Accounts','annualAccountNag.htm'],
				['Appropriate Accounts','approaccountNag.htm']
			],
			['GPF',0,
				['Introduction','gpfintroNag.htm'],
				['Eligibility to join the Fund','gpfeligibilityNag.htm'],
				['Nomitation ','gpfeligibilityNag.htm#NOMINATION'],
				['GPF Subscription','gpfeligibilityNag.htm#RATES%20OF%20SUBSCRIPTION'],
				['Advance','AdvancesNag.htm'],
				['Withdrawal','withdrawNag.htm'],
				['Procedure on death','procdeathNag.htm'],
				['Final Closure','finalpayNag.htm'],
				['GPF Guidlines','gpfGuidelinesNag.htm'],
			//	['Grievance','grievanceNag.asp']
			],
			['Pension',0
				['Introduction','pensionNag.htm']			,
				['Pension Adalat','pensionadaNag.htm'],
				//['Grievance','grievanceNag.asp'],
				//['Press Release','PressReleaseNag.htm'],
				//['Grievance Redressal','GrievanceNag.asp'],
				['Contact Us','ContactNag.htm']
			]
		]				
	],
	['Audit Offices',0,
		['Pr AG(Audit)- I Mumbai',0,
			['About Us',0,
				['Introduction','PrAuditIntroMum.htm'],
				['Orgazitonal Strecture','PrAuditOrgStructMum.htm'],
				['Juridiction','PrAuditJurisdictionMum.htm'],
				['Audit Duties','PrAuditDutiesMum.htm'],
				['Contact Us','PrAuditContactMum.htm']				
			],
			['Audit Report','AuditReportMum.htm']
		],
		['AG(Audit)-II,Nagpur',0,
			['About Us',0,
				['Introduction','auditintroNag.htm'],
				['Oraganizational Strecture','auditorgstructNag.htm'],
				['Juridiction','auditJurisdictionNag.htm'],
				['Function Union','audituniNag.htm'],
				['function State','auditstateNag.htm'],
				['Our Achivement','achievementsNag.htm'],
				['Audit Report','auditreportstateNag.htm'],
				['Inspection Paras','auditInsparasNag.htm'],
				['Contact Us','auditContactNag.htm']
			],
			['Report','AuditReportCAGNag.htm']
		],
		['Pr DA(Central),Mumbai',0,
			['About Us',0,
				['Introduction','DAintroMum.htm'],
				['Organizational Strecture','DAorgStructMum.htm'],
				['Function','DafunctionMum.htm'],
				['Contact Us','DAContactMum.htm']
			]	
		],
		['AG (Commercial Audit,Mumbai)',0,
			['About Us',0,
				['Introduction','CommIntroMum.htm'],
				['Organizational Strecture','CommorgStructMum.htm'],
				['Juridication','CommJurisdictionMum.htm'],
				['Function','CommfuncMum.htm'],
				['Contact Us','CommcontactMum.htm']
			]	
		]	
	],
	
	['GPF',0,
		['GPF Mumbai','GPFMumv1.htm'],
		['GPF Nagpur','GPFNag.asp']
	],
	['Pension',0,
	       // ['Mumbai Office','DpensionMum.htm'],
		['Nagpur Office','DpensionNag.asp']
	],
	
	['Related Links',0,
		['O/o C&AG, Govt Of India','http://cag.gov.in/'],
		['O/o Accountant General UP','http://agup.nic.in/'],
		['O/o AG,Haryana','http://aghry.nic.in/'],
		['O/o Accountant General,TN','http://www.agae.tn.nic.in/home.asp'],
		['O/o Accountant General KA','http://ag.kar.nic.in/']
	]	
];



