//global variables used to store object;
var req;
var setobj;
var falgchk=0;
var file;

//Create xmlhttp object.

//Request file to get output.
function sendRequest(file) { 
	var str = "";  
	req.open('GET', file); 
	req.setRequestHeader("Cache-Control", "no-cache");    
	req.onreadystatechange = handleResponse;    
	req.send(null);   
	return false;  
}   

// REQUEST FILE WITH METHOD POST
function sendRequest_POST(file,params) { 
//alert('ajax'+file);
	var str = "";    

	req.open('POST', file, true);    

	//Send the proper header information along with the request
	req.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
	req.setRequestHeader("Content-length", params.length);
	req.setRequestHeader("Connection", "close");

	req.onreadystatechange = handleResponse;    
	req.send(params);   
	return false;  
}

//Get response for div poppulation.
function handleResponse() {   
	if(req.readyState == 4){    
		var response = req.responseText;
		
		setobj.innerHTML = response;

		if(prev_html!="") {
	        //opacity('news_lett',100,0,5000);
			setTimeout("restore_html();",5000);
		//	opacity('news_lett',0,100,1000);
		}
			

		
		
	}  
}

function restore_html() {
	
	//opacity('news_lett',0,100,500);
	document.getElementById("news_lett").className ="footer_white";

	document.getElementById("news_lett").innerHTML=prev_html;

}

//function to show a div.
function showdiv(divobj)
{
	//if(window.parent.sel_search != "undefined")
	//	window.parent.sel_search.style.visibility = "hidden";
	divobj.style.visibility="visible";
}

//function to hide a div.
function hidediv(divobj)
{
	//if(window.parent.sel_search != "undefined")
	//	window.parent.sel_search.style.visibility = "visible";
	divobj.style.visibility="hidden";
}

function stateChanged() 
 { 

	var vals =  document.getElementById("test").value;
	
	var corvals =  document.getElementById("cortest").value;
	//var footerval =  document.getElementById("footertest").value;
	
		//alert(vals);
    	  
 		//    for random images
		/*var im_0 = "<img src='images/hydro_power_vertical_banner.jpg'>";
		var im_1 = "<img src='images/banner_mission.jpg'>";
		var im_2 = "<img src='images/banner_our_company.jpg'>";
		var im_3 = "<img src='images/banner_our_founder.jpg'>";
		var im_4 = "<img src='images/banner_milestones.jpg'>";
		var im_5 = "<img src='images/banner_awards.jpg'>";
		var im_6 = "<img src='images/banner_spiritofhcc.jpg'>";
		var im_7 = "<img src='images/banner_management.jpg'>";
		var im_8 = "<img src='images/banner_company_india.jpg'>";
		var im_9 = "<img src='images/banner_the_brand.jpg'>";*/


        var im_0 = "<img src='images/hydro_power_vertical_banner.jpg'>";
		var im_1 = "<img src='images/water_solution_banner.jpg'>";
		var im_2 = "<img src='images/nuclear_power_banner.jpg'>";
		var im_3 = "<img src='images/transportation_vertical_banner.jpg'>";
		var im_4 = "<img src='images/banner_milestones.jpg'>";
		var im_5 = "<img src='images/banner_awards.jpg'>";
		var im_6 = "<img src='images/banner_spiritofhcc.jpg'>";
		var im_7 = "<img src='images/banner_management.jpg'>";
		var im_8 = "<img src='images/banner_company_india.jpg'>";
		var im_9 = "<img src='images/banner_the_brand.jpg'>";


		
		 
		if(vals=='0')		
		 document.getElementById("banner").innerHTML = im_0 ;
		else if(vals==1)		
		 document.getElementById("banner").innerHTML = im_1 ;
		else if(vals==2)
         document.getElementById("banner").innerHTML = im_2 ;
		else if(vals==3)
         document.getElementById("banner").innerHTML = im_3 ;
		else if(vals==4)
         document.getElementById("banner").innerHTML = im_4 ; 
		else if(vals==5)
         document.getElementById("banner").innerHTML = im_5 ; 
		
		

		// Corporate stewareds images
		
		var corim_1 = "<img src='images/gulabchand_banner.jpg'>";		
		var corim_2 = "<img src='images/comunity_banner.jpg'>";
		var corim_3 = "<img src='images/beyond_bannner.jpg'>";
		var corim_21 = "<img src='images/four_pillars_banner.jpg'>";		

		if(corvals==1 || corvals==4 || corvals==5)		
		 document.getElementById("banner").innerHTML = corim_1;		
		else if(corvals==2)
         document.getElementById("banner").innerHTML = corim_2;
		else if(corvals==3)
         document.getElementById("banner").innerHTML = corim_3;
		else if(corvals==21 || corvals==22 || corvals==11 || corvals==12 || corvals==13 || corvals==14 || corvals==0 || corvals==31)
         document.getElementById("banner").innerHTML = corim_21;
		/*
		var footer_content1="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='732'  border='0' cellpadding='0' cellspacing='0'><tr><td colspan='2'>&nbsp;</td></tr><tr><td colspan='2'><span class='txt_blue'>Support to burn patients at two BMC run hospitals-Sion Hospital and Kasturba Hospital in Mumbai</span></td></tr><tr><td colspan='2'>The Gulabchand Foundation undertook two short term projects for two months in 2007 for providing medicines to the burn patients, and one year support from a physiotherapist to the patient.</td></tr><tr><td width='391' align='left' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/sion_hos_snap.jpg' width='200' height='100' /></td></tr><tr><td height='10'></td></tr><tr><td height='15' align='left' valign='top'><img src='images/sion_hos.png' width='110' height='14' /></td></tr><tr><td height='15' align='left' valign='top'>This hospital is well-equipped with an occupational therapy department, and a burn ward with a capacity of 16 Patients. The therapy for burn patients starts from...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&id=5' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td><td width='407' align='right' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/sion_hos_snap.jpg' width='200' height='100' /></td></tr><tr><td height='10'></td></tr><tr><td height='15' align='left' valign='top'><img src='images/kasturba_hos.png' width='151' height='13' /></td></tr><tr><td height='15' align='left' valign='top'>The burn cases in the hospital are not admitted directly, <br />but are referred from other Municipal Hospitals for patients with more than 35 percent burns and require... </td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&id=4' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td></tr></table></div></div>";
		var footer_content4="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/sion_hos_snap.jpg' width='200' height='100' /></td></tr><tr><td height='10'></td></tr><tr><td height='15' align='left' valign='top'><img src='images/sion_hos.png' width='110' height='14' /></td></tr><tr><td height='15' align='left' valign='top'>This hospital is well-equipped with an occupational therapy department, and a burn ward with a capacity of 16 Patients. The therapy for burn patients starts from...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&amp;id=5' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></div></div>";
		var footer_content5="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/sion_hos_snap.jpg' width='200' height='100' /></td></tr><tr><td height='10'></td></tr><tr><td height='15' align='left' valign='top'><img src='images/kasturba_hos.png' width='151' height='13' /></td></tr><tr><td height='15' align='left' valign='top'>The burn cases in the hospital are not admitted directly, <br />but are referred from other Municipal Hospitals for patients with more than 35 percent burns and require... </td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&amp;id=4' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></div></div>";
	    var footer_content12="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='732'  border='0' cellpadding='0' cellspacing='0'><tr><td width='391' align='left' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img  src='images/nicmar_img.jpg' width='200' height='100' alt='NICMAR' title='NICMAR' /></td></tr><tr><td height='15' align='left' valign='top'><img style='margin-top:10px;' src='images/nicmar_bottom_txt.png' width='58' height='14' alt='NICMAR' title='NICMAR' /></td></tr><tr><td height='15' align='left' valign='top'>National Institute of Construction Management and Research (NICMAR), founded in 1983, is a pioneering management institute...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&id=21' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td><td width='407' align='right' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/walchand_college_img.jpg' width='200' height='100' alt='Walchand College of Engineering' title='Walchand College of Engineering' /></td></tr><tr><td height='15' align='left' valign='top'><img style='margin-top:10px;' src='images/walchand_fotter_txt.png' width='286' height='13' alt='Walchand College of Engineering' title='Walchand College of Engineering' /></td></tr><tr><td height='15' align='left' valign='top'>Walchand College of Engineering (WCE) was set up in 1947 at Sangli. Presently, it offers 6 undergraduate, <br />  9 post-graduate and 4 diploma programmes...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&id=22' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td></tr></table></div></div>";
		var footer_content21="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/walchand_college_img.jpg' width='200' height='100' alt='Walchand College of Engineering' title='Walchand College of Engineering' /></td></tr><tr><td height='10'></td></tr><tr><td height='15' align='left' valign='top'><img src='images/walchand_fotter_txt.png' width='285' height='13' alt='Walchand College of Engineering' title='Walchand College of Engineering' /></td></tr><tr><td height='15' align='left' valign='top'>Walchand College of Engineering (WCE) was set up in 1947 at Sangli. Presently, it offers 6 undergraduate, 9 post-graduate and 4 diploma programmes...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&amp;id=22' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></div></div>";
		var footer_content22="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/nicmar_img.jpg' width='200' height='100' alt='Nicmar' title='Nicmar' /></td></tr><tr><td height='10'></td></tr><tr><td height='15' align='left' valign='top'><img src='images/nicmar_footer_txt.png' width='58' height='13' alt='Nicmar' title='Nicmar' /></td></tr><tr><td height='15' align='left' valign='top'>National Institute of Construction Management and Research (NICMAR), founded in 1983, is a pioneering management institute...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&amp;id=21' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></div></div>";
		var footer_content14="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='732'  border='0' cellpadding='0' cellspacing='0'><tr><td width='391' align='left' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/water_harvesting_img.jpg' width='200' height='100' /></td></tr><tr><td height='15' align='left' valign='top'><img style='margin-top:10px;' src='images/water_harvesting_footer_txt.png' width='148' height='13' alt='Water Harvesting' title='Water Harvesting' /></td></tr><tr><td height='15' align='left' valign='top'>The water harvesting project involves the construction of a masonry weir across the Kalisind river near Haripura village in Kota district of Rajasthan...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&amp;id=31' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td><td width='407' align='right' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/sanitation_img.jpg' width='200' height='100' /></td></tr><tr><td height='15' align='left' valign='top'><img style='margin-top:10px;' src='images/sanitation_solid_waste_management_txt.jpg' width='312' height='12' /></td></tr><tr><td height='15' align='left' valign='top'>Walchand College of Engineering (WCE) was set up in 1947 at Sangli. Presently, it offers 6 undergraduate, 9 post-graduate and 4 diploma programmes...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&id=32' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td></tr></table></div></div>";
		var footer_content31="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='732'  border='0' cellpadding='0' cellspacing='0'><tr><td width='391' align='left' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/sanitation_img.jpg' width='200' height='100' /></td></tr><tr><td height='15' align='left' valign='top'><img style='margin-top:10px;' src='images/sanitation_solid_waste_management_txt.jpg' width='312' height='12' /></td></tr><tr><td height='15' align='left' valign='top'>Walchand College of Engineering (WCE) was set up in 1947 at Sangli. Presently, it offers 6 undergraduate, 9 post-graduate and 4 diploma programmes...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&id=32' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td><td width='407' align='right' valign='top'></td></tr></table></div></div>";
		var footer_content32="<div style='clear:both'></div><div id='csrbottom'><div id='csrbottom_text'><table width='732'  border='0' cellpadding='0' cellspacing='0'><tr><td width='391' align='left' valign='top'><table width='330' border='0' cellspacing='0' cellpadding='0'><tr><td height='15' align='left' valign='top'>&nbsp;</td></tr><tr><td height='15' align='left' valign='top'><img src='images/water_harvesting_img.jpg' width='200' height='100' /></td></tr><tr><td height='15' align='left' valign='top'><img style='margin-top:10px;' src='images/water_harvesting_footer_txt.png' width='148' height='13' alt='Water Harvesting' title='Water Harvesting' /></td></tr><tr><td height='15' align='left' valign='top'>The water harvesting project involves the construction of a masonry weir across the Kalisind river near Haripura village in Kota district of Rajasthan...</td></tr><tr><td height='15' align='left' valign='top'><a href='four_pillars.php?page=corporate_stewardship&amp;id=31' class='bradc_page'>Read more...</a></td></tr><tr><td width='608' height='15' align='left' valign='top'></td></tr></table></td><td width='407' align='right' valign='top'></td></tr></table></div></div>";
		*/
		/*if(corvals==0 || corvals==3)		
		 document.getElementById("contentfooter").innerHTML = "";	
		else if(corvals==1)		
		document.getElementById("contentfooter").innerHTML = "";	
		else if(corvals==2)		
		 document.getElementById("contentfooter").innerHTML = "";	
		else if(corvals==4)		
		 document.getElementById("contentfooter").innerHTML = footer_content4;	
		else if(corvals==5)		
		 document.getElementById("contentfooter").innerHTML = footer_content5;	
		else if(corvals==12)		
		 document.getElementById("contentfooter").innerHTML = footer_content12;	
		else if(corvals==21)		
		 document.getElementById("contentfooter").innerHTML = footer_content21;
		else if(corvals==22)		
		 document.getElementById("contentfooter").innerHTML = footer_content22;
		else if(corvals==14)		
		 document.getElementById("contentfooter").innerHTML = footer_content14;
		else if(corvals==31)		
		 document.getElementById("contentfooter").innerHTML = footer_content31;
		else if(corvals==32)		
		 document.getElementById("contentfooter").innerHTML = footer_content32;*/

//	 alert("showRSS")
 if (req.readyState==4 || req.readyState=="complete")
  {  
  
	if(req.responseText !='')
  		document.getElementById("page_mission_contant_left").innerHTML=req.responseText ;
	  	 
  } 
 }

