// JavaScript Document




//tabs


function fun(dname){
	var vv=document.getElementById('tab_container').childNodes;

	for(var i=0;i<vv.length;i++){
		
		if(i>2){
		if(i==dname){
			document.getElementById('contentdispaly'+i).style.display='';
			
		}else{
				document.getElementById('contentdispaly'+i).style.display='none';
			}
			if(vv[i].id=='main'+dname){
				vv[i].className='btnon';
			}else if((vv[i].id)!=null) {
					if((vv[i].id).substring(0,4)=='main'){
						vv[i].className='btnoff';
				}
			}
		}	
if(i>2){
}else if(vv[i].id=='main'+dname){
vv[i].className='btnon';
}else{
vv[i].className='btnoff';
}
}
}



//nav

	function hidetab(divd,page){
	var listtabs=new Array();
	listtabs=['tb_one','tb_two','tb_three'];
    
	for(var i=0;i<listtabs.length;i++){
		var tab=document.getElementById(listtabs[i]);
			if(listtabs[i]==divd){
				if(document.getElementById(divd).style.display=='none'){

				var str=document.getElementById(divd+'1').src;	

				str=str.substring(str.lastIndexOf('/'),str.length);
				str=str.substring(str.lastIndexOf('/')+1,str.lastIndexOf('_'));
				document.getElementById(divd+'1').src='images/'+str+'_darrow.gif';
				//document.getElementById('exp').style="color:red";
				//alert(document.getElementById(divd+'1').src);
				tab.style.display="";
			}else{
				var str=document.getElementById(divd+'1').src;	

				str=str.substring(str.lastIndexOf('/'),str.length);
				str=str.substring(str.lastIndexOf('/')+1,str.lastIndexOf('_'));
				document.getElementById(divd+'1').src='images/'+str+'_arrow.gif';
				tab.style.display="none";
				k=1;
			}
		}else{    
			if(tab!=null)
			{
				var str=document.getElementById(listtabs[i]+'1').src;	

				str=str.substring(str.lastIndexOf('/'),str.length);
				str=str.substring(str.lastIndexOf('/')+1,str.lastIndexOf('_'));
				document.getElementById(listtabs[i]+'1').src='images/'+str+'_arrow.gif';
				 tab.style.display="none";
			 }
		}
	}
}
	
	
// nav include

var opdiv;
function leftNav123(divop,strURL)
 {
	 opdiv=divop;
   	//alert(document.getElementById('nav').id); 
//	    var strURL = "leftnav.htm";
		var xmlHttp;
		if(window.XMLHttpRequest){ // For Mozilla, Safari, ...
		
			 var xmlHttp = new XMLHttpRequest();
			//alert(strURL);
			 xmlHttp.open('GET', strURL, true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.onreadystatechange = function(){
			 if (xmlHttp.readyState == 4){
				 //alert(xmlHttp.responseText);
				  updatepage(xmlHttp.responseText);
				  
			 }
		}
		xmlHttp.send(null);
		}
		else if(window.ActiveXObject){ // For Internet Explorer
		
			
			 var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			 xmlHttp.open('GET', strURL, true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.onreadystatechange = function(){
			 if (xmlHttp.readyState == 4){
				  updatepage(xmlHttp.responseText);
				  
			 }
		}
		xmlHttp.send();
		}
                    
}
        
			   
//Added By Srinivas.A

function leftNav(divop,strURL,page)
 {
	 //alert("In Side left Nav123............")
	 opdiv=divop;
   	//alert(document.getElementById('nav').id); 
//	    var strURL = "leftnav.htm";
		var xmlHttp;
		if(window.XMLHttpRequest){ // For Mozilla, Safari, ...
		
			 var xmlHttp = new XMLHttpRequest();
			//alert(strURL);
			 xmlHttp.open('GET', strURL, true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.onreadystatechange = function(){
			 if (xmlHttp.readyState == 4){
				 //alert(xmlHttp.responseText);
				  updatepage(xmlHttp.responseText,page);
				  
			 }
		}
		xmlHttp.send(null);
		}
		else if(window.ActiveXObject){ // For Internet Explorer
		
			
			 var xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
			 xmlHttp.open('GET', strURL, true);
		xmlHttp.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
		xmlHttp.onreadystatechange = function(){
			 if (xmlHttp.readyState == 4){
				  updatepage(xmlHttp.responseText,page);
				  
			 }
		}
		xmlHttp.send();
		}
                    
}
//End of Code added By Srinivas. A

               function updatepage(leftMenuContent,page){
				   //alert("final Page.........."+page);
				   document.getElementById('nav').innerHTML = leftMenuContent;
				   if(page==1){
				   document.getElementById('1').style.color='#333333'; 
				   }
				   if(page==2){
				   document.getElementById('2').style.color='#333333'; 
				   }
				   if(page==3){
				   document.getElementById('3').style.color='#333333'; 
				   }
				   if(page==4){
				   document.getElementById('4').style.color='#333333'; 
				   }
				   if(page==5){
				   document.getElementById('5').style.color='#333333'; 
				   }
				   if(page==6){
				   document.getElementById('6').style.color='#333333'; 
				   }
				   if(page==7){
				   document.getElementById('7').style.color='#333333'; 
				   }
				   if(page==8){
				   document.getElementById('8').style.color='#333333'; 
				   }
				   if(page==9){
				   document.getElementById('9').style.color='#333333'; 
				   }
				   if(page==10){
				   document.getElementById('10').style.color='#333333'; 
				   }
				   if(page==11){
				   document.getElementById('11').style.color='#333333'; 
				   }
				   if(page==12){
				   document.getElementById('12').style.color='#333333'; 
				   }
				   if(page==13){
				   document.getElementById('13').style.color='#333333'; 
				   }
				   if(page==14){
				   document.getElementById('14').style.color='#333333'; 
				   }
				   if(page==15){
				   document.getElementById('15').style.color='#333333'; 
				   }
				   if(page==16){
				   document.getElementById('16').style.color='#333333'; 
				   }
				   if(page==17){
				   document.getElementById('17').style.color='#333333'; 
				   }
				   if(page==18){
				   document.getElementById('18').style.color='#333333'; 
				   }
				   if(page==19){
				   document.getElementById('19').style.color='#333333'; 
				   }
				   if(page==20){
				   document.getElementById('20').style.color='#333333'; 
				   }
				    if(page==21){
				   document.getElementById('21').style.color='#333333'; 
				   }
				   if(page==22){
				   document.getElementById('22').style.color='#333333'; 
				   }
				   if(page==23){
				   document.getElementById('23').style.color='#333333'; 
				   }
				   if(page==24){
				   document.getElementById('24').style.color='#333333'; 
				   }
				   hidetab(opdiv,page); 
               }


                     
               
                
	
               
                              
               
              