/*
 * @Revision $Revision: 2411 $
 * @Author $Author: shikha $
 * @Date $Date: 2009-09-04 18:11:00 +0530 (Fri, 04 Sep 2009) $
*/
function showme(a){var c=document.getElementById("addyour1");var b=document.getElementById("addyour2");if(a=="open"){c.style.display="block";b.style.display="block"}else{if(a=="close"){c.style.display="none";b.style.display="none"}}}function showlogin(b,a){if(b==1){b="open"}var d=document.getElementById("newmahi");var c=document.getElementById("newmahi2");if(b=="open"){d.style.display="block";c.style.display="block";toggle8("close")}else{if(b=="close"){d.style.display="none";c.style.display="none"}}}function instValidation(c){var a=document.mbainst.instname.value;var d=document.mbainst.instdesc.value;var b=document.mbainst.instweb.value;if(a==""){alert("Enter institute name");document.mbainst.instname.focus();return false}else{if(d==""){alert("Enter description");document.mbainst.instdesc.focus();return false}else{if(document.mbainst.captcha.value==""){alert("Please type the characters you see in the picture");document.mbainst.captcha.focus();return false}else{c.value="Proccessing";return true}}}}
function trim(stringToTrim) {
//alert(stringToTrim);

	return stringToTrim.replace(/^\s+|\s+$/g,"");
}


function loginvalidation(){if(document.login.email.value==""){alert("Please enter your e-mail id");document.login.email.focus();return false}else{if(document.login.email.value!=""){str=document.login.email.value;var a=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(!a.test(str)){alert("Please input a valid email address!");document.login.email.focus();return false}}}if(trim(document.login.password.value)==""){alert("Please enter your password");document.login.password.focus();return false}else{var b="e="+document.login.email.value+"&p="+document.login.password.value+"&cvalue="+document.login.checkbox.checked;xmlHttp=GetXmlHttpObject();url="/education/log.php";xmlHttp.open("POST",url,true);xmlHttp.onreadystatechange=stateChanged;xmlHttp.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp.setRequestHeader("Content-length",b.length);xmlHttp.setRequestHeader("Connection","close");xmlHttp.send(b);return false}}function stateChanged(){if(xmlHttp.readyState==4&&xmlHttp.status==200){var a=xmlHttp.responseText;if(a=="Your emailid or password not matched, please try again"){document.getElementById("abhijit").innerHTML=xmlHttp.responseText;document.login.password.value="";document.login.password.focus()}else{window.location=a}return false}}function submitForm(){var e=trim(document.forward.subject.value);var a=trim(document.forward.tomail.value);var f=trim(document.forward.name.value);var c=trim(document.forward.urmail.value);var b=trim(document.forward.message.value);var g=trim(document.forward.captcha.value);if(e==""){alert("Please enter subject");document.forward.subject.focus();return false}if(a==""){alert("Please enter recievers email");document.forward.tomail.focus();return false}if(a!=""){str=a;var d=/(([a-zA-Z0-9\-?\.?]+)@(([a-zA-Z0-9\-_]+\.)+)([a-z]{2,3})(\W?[,;]\W?(?!$))?)+$/i;if(!d.test(str)){alert("Please input a valid email address!");document.forward.tomail.focus();return false}}if(f==""){alert("Please enter your name");document.forward.name.focus();return false}if(c==""){alert("Please enter your email id");document.forward.urmail.focus();return false}if(c!=""){str=c;var d=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(!d.test(str)){alert("Please input a valid email address!");document.forward.urmail.focus();return false}}if(b==""){alert("Please enter your message");document.forward.message.focus();return false}if(g==""){alert("Please type the characters you see in the picture");document.forward.captcha.focus();return false}return true}function validate(){var b=document.getElementById("opt").value;var a=document.getElementById("search11").value;if(a==""||a=="Members (name, city, interest, company, college, title,..)"||a=="News (interest, title, category...)"||a=="Jobs (location, functional area, experience, industry,..)"||a=="Company Name"||a=="Videos (interest, title, category...)"||a=="Blogs (blogger name, title, category, interest...)"||a=="Mentors (mentor name, category, location, company...)"||a=="Communities (name, interest, category...)"||a=="Institutions Name"){alert("Please enter search string");document.searchfrm.search.focus();return false}if(b=="1"){document.searchfrm.action="/network/membersearch.php"}else{if(b=="2"){document.searchfrm.action="/news/searchnews.php"}else{if(b=="3"){document.searchfrm.keywords.value=document.searchfrm.search.value;document.searchfrm.action="/career/jobsearch.php"}else{if(b=="4"){document.searchfrm.searchstring.value=document.searchfrm.search.value;document.searchfrm.action="/career/companies_search.php"}else{if(b=="5"){document.searchfrm.action="/video/coursesearch.php"}else{if(b=="6"){document.searchfrm.action="/category/searchresult/"}else{if(b=="7"){document.searchfrm.action="/mentorship_new1/mentorship_search.php"}else{if(b=="8"){document.searchfrm.action="http://communities.siliconindia.com/searchresult"}else{if(b=="9"){document.searchfrm.action="/education/search.php"}}}}}}}}}document.searchfrm.submit()}function show_newspopup(b){var c=document.getElementById("addnewsmain");if(b=="open"){c.style.display="block";document.images.capchange.src="/news/captcha/CaptchaSecurityImages.php?"+Date.parse(new Date().toString());if(/MSIE (\d+\.\d+);/.test(navigator.userAgent)){var a=new Number(RegExp.$1);if(a<=6){alert("Please post your news")}}if(sho=="1"){hideregularly1(265,500)}}else{if(b=="close"){c.style.display="none"}}}var sho=0;var nid=0;var x=1;function sho_hide(){if(sho==0){if(document.getElementById("examples11")!=null){document.getElementById("examples11").style.display="none"}showregularly(30,0);sho=1}else{hideregularly1(285,500);sho=0}if(document.getElementById("addnewsmain")!=null&&document.getElementById("addnewsmain").style.display=="block"){show_newspopup("close")}}function hidediv(b,a){if(b!=""){document.getElementById(b).style.display="none"}if(a!=""){document.getElementById(a).style.display="block"}}function hideregularly1(a,b){sho=0;if(a>10){document.getElementById("cmntsouter").style.height=a+"px";document.getElementById("examples1").style.height=a+"px";document.getElementById("incomments").style.clip="rect(0px, "+b+"px,"+a+"px, 0px)";b-=15;a=a-10;setTimeout("hideregularly1("+a+","+b+")",20)}else{document.getElementById("incomments").style.clip="rect(0px 600px 0px 0px)"}}function showregularly(b,d){clearAll();document.getElementById("examples1").style.display="block";var c=document.getElementById("cmntsouter").style.height;var a=c.split("p");sho=1;c=Number(a[0]);if(c<265){if(b<335){document.getElementById("cmntsouter").style.height=b+"px";document.getElementById("examples1").style.height=b+"px";document.getElementById("incomments").style.clip="rect(0px, "+d+"px,"+b+"px, 0px)";b=b+10;d=d+45;setTimeout("showregularly("+b+","+d+")",20)}}}function clearAll(){document.successform.blogtext.value="";document.successform.email.value="";document.successform.password.value=""}function blog_validation(d,h,c){var f=document.successform.blogtext.value;var b=document.successform.email.value;var a=document.successform.password.value;if(f==""){alert("Enter your success story");document.successform.blogtext.focus();return false}else{if(b==""){alert("Enter your email id.");document.successform.email.focus();return false}else{var e=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i;if(!e.test(b)){alert("Please input a valid email address!");document.successform.email.focus();return false}}if(a==""){alert("Please enter your password.");document.successform.password.focus();return false}if(b!=""&&a!=""){var g="insid="+document.successform.insid.value+"&email="+b+"&pass="+a+"&content="+f;xmlHttp1=GetXmlHttpObject();if(d=="stories"){h=c;url="/education/addsuccessstory.php?cid="+h}else{if(d=="morestories"){url="/education/addmorestories.php?cid="+h+"&nopg="+c}}xmlHttp1.open("POST",url,true);if(d=="stories"){xmlHttp1.onreadystatechange=stateChanged1}else{if(d=="morestories"){xmlHttp1.onreadystatechange=addMoreStories}}xmlHttp1.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp1.setRequestHeader("Content-length",g.length);xmlHttp1.setRequestHeader("Connection","close");xmlHttp1.send(g);return false}}}function stateChanged1(){document.getElementById("submitcomm_proccessing").style.top=document.getElementById("company1").offsetHeight+"px";document.getElementById("loginerror").style.top=document.getElementById("company1").offsetHeight+"px";if(xmlHttp1.readyState==4&&xmlHttp1.status==200){if(xmlHttp1.responseText=="RES|1"){document.getElementById("submitcomm_proccessing").style.display="none";document.getElementById("successsubmit").value="Submit";document.getElementById("txt_fwd22").innerHTML="Either your emailid or password is incorrect. Please re-enter again.";document.getElementById("loginerror").style.display="block";setTimeout("document.getElementById('loginerror').style.display='none'",3000);setTimeout("document.successform.password.value = '';document.successform.password.focus();",3000)}else{if(xmlHttp1.responseText!="RES|1"){document.getElementById("submitcomm_proccessing").style.display="none";document.getElementById("successsubmit").value="Submit";document.getElementById("updated").innerHTML=xmlHttp1.responseText}}}else{document.getElementById("submitcomm_proccessing").style.display="block";document.getElementById("successsubmit").value="Proccessing"}}function addMoreStories(){if(xmlHttp1.readyState==4&&xmlHttp1.status==200){if(xmlHttp1.responseText=="RES|1"){document.getElementById("submitcomm_proccessing_viewall").style.display="none";document.getElementById("successsubmit").value="Submit";document.getElementById("txt_fwd22_viewall").innerHTML="Either your emailid or password is incorrect. Please re-enter again.";document.getElementById("loginerror_viewall").style.display="block";setTimeout("document.getElementById('loginerror_viewall').style.display='none'",3000);setTimeout("document.successform.password.value = '';document.successform.password.focus();",3000)}else{if(xmlHttp1.responseText!="RES|1"){document.getElementById("submitcomm_proccessing_viewall").style.display="none";document.getElementById("successsubmit").value="Submit";document.getElementById("morestoriesupdated").innerHTML=xmlHttp1.responseText}}}else{document.getElementById("submitcomm_proccessing_viewall").style.display="block";document.getElementById("successsubmit").value="Proccessing"}}function newSubmit1(a,e){var d=trim(document.institutenews.title.value);var f=document.institutenews.description.value;var h=document.institutenews.link.value;var g=document.institutenews.nav.value;var j=document.institutenews.captcha1.value;var c=/http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;var i=/([A-Z]|[a-z]|[0-9]|[$]|[@]|[#]|[!]|[^]|[+]|[-]|[_]|[~]|[&]|[*]|[<]|[>]|[=]|[(]|[)])(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)(\1)/;if(d==""){alert("Please enter title");document.institutenews.title.focus();return false}if(d!=""){var i=/([A-Z]|[a-z]|[0-9]|[$]|[@]|[#]|[!]|[^]|[+]|[-]|[_]|[~]|[&]|[*]|[<]|[>]|[?]|[=]|[(]|[)])(\1)(\1)(\1)(\1)/;if(i.test(d)==true){document.institutenews.title.focus();alert("Title has special characters, Please remove them and try again.");return false}}if(f==""){alert("Please enter description");document.institutenews.description.focus();return false}if(f!=""){var i=/([A-Z]|[a-z]|[0-9]|[$]|[@]|[#]|[!]|[^]|[+]|[-]|[_]|[~]|[&]|[*]|[<]|[>]|[?]|[=]|[(]|[)])(\1)(\1)(\1)(\1)/;if(i.test(f)==true){document.institutenews.description.focus();alert("Description has special characters, Please remove them and try again.");return false}}if((h.substring(0,7)=="http://")&&(h.substring(8)=="")){alert("Enter link to news");document.institutenews.link.focus();return false}if(!c.test(h)){alert("URL invalid.Try again.");document.institutenews.link.focus();return false}if(document.institutenews.captcha1.value==""){alert("Please type the characters you see in the picture");document.institutenews.captcha1.focus();return false}else{var b="title="+d+"&desc="+f+"&link="+h+"&insid="+g+"&cid1="+a+"&cap="+j;xmlHttp3=GetXmlHttpObject();url="/education/insnews_next.php?cid1="+e;xmlHttp3.open("POST",url,true);xmlHttp3.onreadystatechange=stateChanged3;xmlHttp3.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp3.setRequestHeader("Content-length",b.length);xmlHttp3.setRequestHeader("Connection","close");xmlHttp3.send(b);return false}}function stateChanged3(){if(xmlHttp3.readyState==4&&xmlHttp3.status==200){var a=document.getElementById("addnewsmain");a.style.display="none";document.getElementById("updated1").innerHTML=xmlHttp3.responseText}else{document.getElementById("newsloading").innerHTML="<b>Loading...please wait</b>";document.getElementById("newssubmit").value="Proccessing"}}function textCounter(c,a,b){if(c.value.length>b){alert("Characters limit Exceeded");c.value=c.value.substring(0,b)}else{a.value=b-c.value.length}}function newSubmit(e,a,b){var j=document.news.title.value;var h=document.news.description.value;var d=document.news.link.value;var c=document.news.captcha2.value;var g=/http:\/\/[A-Za-z0-9\.-]{3,}\.[A-Za-z]{3}/;if(j==""){alert("Please enter title");document.news.title.focus();return false}if(j!=""){var i=/([A-Z]|[a-z]|[0-9]|[$]|[@]|[#]|[!]|[^]|[+]|[-]|[_]|[~]|[&]|[*]|[<]|[>]|[?]|[=]|[(]|[)])(\1)(\1)(\1)(\1)/;if(i.test(j)==true){document.news.title.focus();alert("Title has special characters, Please remove them and try again.");return false}}if(h==""){alert("Please enter description");document.news.description.focus();return false}if(h!=""){var i=/([A-Z]|[a-z]|[0-9]|[$]|[@]|[#]|[!]|[^]|[+]|[-]|[_]|[~]|[&]|[*]|[<]|[>]|[?]|[=]|[(]|[)])(\1)(\1)(\1)(\1)/;if(i.test(h)==true){document.news.description.focus();alert("Description has special characters, Please remove them and try again.");return false}}if((d.substring(0,7)=="http://")&&(d.substring(8)=="")){alert("Enter link to news");document.news.link.focus();return false}if(!g.test(d)){alert("URL invalid.Try again.");document.news.link.focus();return false}if(document.news.captcha2.value==""){alert("Please type the characters you see in the picture");document.news.captcha2.focus();return false}else{var f="title="+j+"&desc="+h+"&link="+d+"&insid="+e+"&cid2="+a+"&nopg="+b+"&captchaid="+c;xmlHttp2=GetXmlHttpObject();url="/education/newsnext123.php";xmlHttp2.open("POST",url,true);xmlHttp2.onreadystatechange=stateChanged2;xmlHttp2.setRequestHeader("Content-type","application/x-www-form-urlencoded");xmlHttp2.setRequestHeader("Content-length",f.length);xmlHttp2.setRequestHeader("Connection","close");xmlHttp2.send(f);return false}}function stateChanged2(){if(xmlHttp2.readyState==4&&xmlHttp2.status==200){var a=document.getElementById("addnewsmain");a.style.display="none";document.getElementById("mithu").innerHTML=xmlHttp2.responseText}else{document.getElementById("load").innerHTML="<b>Loading...please wait</b>";document.getElementById("newssubmit").value="Proccessing"}}function textCheck(){xmlHttp4=GetXmlHttpObject();if(xmlHttp4==null){alert("Your browser does not support AJAX!");return}var a="/education/logincheck.php";xmlHttp4.onreadystatechange=stateChanged4;xmlHttp4.open("GET",a,true);xmlHttp4.send(null)}function stateChanged4(){if(xmlHttp4.readyState==4&&xmlHttp4.status==200){document.getElementById("signcheck").innerHTML=xmlHttp4.responseText}}function getQuestions(){xmlHttp5=GetXmlHttpObject();if(xmlHttp5==null){alert("Your browser does not support AJAX!");return}var a="/education/getquestions.php";xmlHttp5.onreadystatechange=stateChanged5;xmlHttp5.open("GET",a,true);xmlHttp5.send(null)}function stateChanged5(){if(xmlHttp5.readyState==4&&xmlHttp5.status==200){document.getElementById("relatedqa").innerHTML=xmlHttp5.responseText}else{document.getElementById("relatedqa").innerHTML="<img src='/images/ajax_loader.gif' style='margin-left:60px;'></img>"}}function GetXmlHttpObject(){var a=null;try{a=new XMLHttpRequest()}catch(b){try{a=new ActiveXObject("Msxml2.XMLHTTP")}catch(b){a=new ActiveXObject("Microsoft.XMLHTTP")}}return a}function toggle8(f){var d=navigator.userAgent;var e=d.indexOf("MSIE 6.0");var c=d.indexOf("Firefox");var b=document.getElementById("Layer1test");var a=document.getElementById("Layer4");if(f=="open"){b.style.display="block";a.style.display="block"}else{if(f=="close"){b.style.display="none";a.style.display="none"}}}function toggle_intern(g){var e=navigator.userAgent;var f=e.indexOf("MSIE 6.0");var d=e.indexOf("Firefox");var c=document.getElementById("newmahicon");var b=document.getElementById("newmahi2con");var a=document.getElementById("errmsg");scroll(0,0);if(g=="open"){c.style.display="block";b.style.display="block";a.style.display="none"}else{if(g=="close"){c.style.display="none";b.style.display="none"}}}function optionvalue(a){switch(a){case"1":document.getElementById("search11").value="Members (name, city, interest, company, college, title,..)";break;case"2":document.getElementById("search11").value="News (interest, title, category...)";break;case"3":document.getElementById("search11").value="Jobs (location, functional area, experience, industry,..)";break;case"4":document.getElementById("search11").value="Company Name";break;case"5":document.getElementById("search11").value="Videos (interest, title, category...)";break;case"6":document.getElementById("search11").value="Blogs (blogger name, title, category, interest...)";break;case"7":document.getElementById("search11").value="Mentors (mentor name, category, location, company...)";break;case"8":document.getElementById("search11").value="Communities (name, interest, category...)";break;case"9":document.getElementById("search11").value="Institutions Name";break}}function hide(){if(document.getElementById("opt").value=="1"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="2"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="3"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="4"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="5"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="6"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="7"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="8"){document.getElementById("search11").value=""}else{if(document.getElementById("opt").value=="9"){document.getElementById("search11").value=""}}}}}}}}}}function show(){if(document.getElementById("opt").value=="1"){document.getElementById("search11").value="Members (name, city, interest, company, college, title,..)"}else{if(document.getElementById("opt").value=="2"){document.getElementById("search11").value="News (interest, title, category...)"}else{if(document.getElementById("opt").value=="3"){document.getElementById("search11").value="Jobs (location, functional area, experience, industry,..)"}else{if(document.getElementById("opt").value=="4"){document.getElementById("search11").value="Company Name"}else{if(document.getElementById("opt").value=="5"){document.getElementById("search11").value="Videos (interest, title, category...)"}else{if(document.getElementById("opt").value=="6"){document.getElementById("search11").value="Blogs (blogger name, title, category, interest...)"}else{if(document.getElementById("opt").value=="7"){document.getElementById("search11").value="Mentors (mentor name, category, location, company...)"}else{if(document.getElementById("opt").value=="8"){document.getElementById("search11").value="Communities (name, interest, category...)"}else{if(document.getElementById("opt").value=="9"){document.getElementById("search11").value="Institutions Name"}}}}}}}}}};
function submit_query(){
	var user_name = trim(document.user_query_form123.user_name.value);
	var user_email = trim(document.user_query_form123.user_email.value);
	var user_ph = trim(document.user_query_form123.user_ph.value);
	var user_loc = document.user_query_form123.user_loc.value;
	var course = trim(document.user_query_form123.course.value);
	var user_query = trim(document.getElementById('comment').value);
	//var captchaval = trim(document.user_query_form123.captcha.value);
	var cid = document.user_query_form123.companyid.value;
	//var login_check = document.user_query_form123.login_check.value;



	if(user_name=="* Name" || user_name==""){
		alert("Please enter your name");
  		document.user_query_form123.user_name.focus();
  		return false;
  	}
  	if(user_name!=""){
		var alphaExp = /^[a-z A-Z]+$/;
		if(!document.user_query_form123.user_name.value.match(alphaExp)){
			alert("Name should not contain any numbers or special character.");
	  		document.user_query_form123.user_name.focus();
	  		return false;
  		}
  	}
  	if(user_name!='')
  	{
  		if(user_name.length < 3)
  		{
  			alert("name should be atleast 3 characters");
	  		document.user_query_form123.user_name.focus();
	  		return false;
  		}
  	}
  	if(user_email=="* Email" || user_email==""){
		alert("Please enter your e-mail id");
  		document.user_query_form123.user_email.focus();
  		return false;
  	}
  	if(user_email!=""){
 		str=user_email;
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i ;
		if (!filter.test(str)){
			alert("Please input a valid e-mail id!")
			document.user_query_form123.user_email.focus();
			return false;
		}
	 }
  	if(user_ph=="* Ph/Mob." || user_ph==""){
  		alert("Please enter your phone number");
  		document.user_query_form123.user_ph.focus();
  		return false;
  	}
  	if((user_ph!="") && isNaN(user_ph)==true){
  		alert("Please enter only numbers.");
   		document.user_query_form123.user_ph.focus();
   		return false;
  	}
  	if(user_ph.length < 10)
  	{
  		alert("Invalid phone number.");
   		document.user_query_form123.user_ph.focus();
   		return false;
  	}
  	if(user_loc=="0"){
  		alert("Please enter your study location");
  		document.user_query_form123.user_loc.focus();
  		return false;
  	}
  	if(course=='*Course' || course==""){
  		alert("Please enter course type");
  		document.user_query_form123.course.focus();
  		return false;
  	}
  	//alert(user_query);

	/*if (document.getElementById('comment').value!='') {

		var flag=false;
		var iChars = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
		for (var i = 0; i < document.getElementById('comment').value.length; i++)
		 {
			if (iChars.indexOf(document.getElementById('comment').value.charAt(i)) != -1)
			  {

					flag=true;
					break;
			  }
		 }

		if(flag==false)
		{
			alert ("Your query contains illegal characters!");
			document.getElementById('comment').value="";
			document.getElementById('comment').focus();
			return false;
	   }
}*/

if(trim(document.getElementById('comment').value) =="" || document.getElementById('comment').value == '*Your query here')
	  {
  		alert("Please enter your query");
  		document.getElementById('comment').value='';
  		document.getElementById('comment').focus();
  		return false;
  	}

	//return false;



  	/*if(captchaval=="" && login_check!=1){
	  alert("Please type the characters you see in the picture.");
	  document.user_query_form123.captcha.focus();
	  return false;
  	}*/
  	else{
		 var params = "un="+user_name+"&ue="+user_email+"&up="+user_ph+"&ul="+user_loc+"&uq="+user_query+"&cid="+cid+"&course="+course;
	     xmlHttp6 = GetXmlHttpObject();
		 url="/training_institute/requestsubmit.php";

		 xmlHttp6.open("POST",url,true);

		 xmlHttp6.onreadystatechange = function(){
			if (xmlHttp6.readyState==4 && xmlHttp6.status == 200){
			//alert(xmlHttp6.responseText);
			document.user_query_form123.bcontrol.disabled=false;
			
			if(xmlHttp6.responseText=="RES|1"){

					//window.location = "/career/institute.php?errorid=2";
				            document.user_query_form123.user_name.value="* Name" ;
	                        document.user_query_form123.user_email.value="* Email";
                            document.user_query_form123.user_ph.value="* Pho/Mob.";
                            document.user_query_form123.user_loc.value='0';
                            document.user_query_form123.course.value='';
	                        document.user_query_form123.user_query.value="*Your query here";
	                        document.getElementById('dvtoscroll23').style.display='none' ;
	                        //document.user_query_form123.captcha.value='';

                            /*if(login_check!=1)
                            {
                            //alert(document.getElementById('wrongcap').style.color);
                            document.getElementById('wrongcap').style.color ="#808080";
                            //alert("s");
                            }*/
                     document.getElementById('infodiv').style.display="block";
                     document.getElementById('response').innerHTML = 'Your request for more information <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;submitted successfully.';
					 setTimeout("reset_response_div()",1000);
					 document.getElementById('invocationcode').style.display='none';
					 

				}
            else if(xmlHttp6.responseText=="RES|2"){
            		document.getElementById('infodiv').style.display="block";
					document.getElementById('response').innerHTML = '<img src="/images/icon_err.gif">&nbsp;Could not submited please try again.';
					document.getElementById('invocationcode').style.display='none';
				}
				/*else if(xmlHttp6.responseText=="RES|3"){
					//document.user_query_form123.bcontrol.disabled=false;
					document.getElementById('response').innerHTML ='';
					//document.user_query_form123.captcha.value='';
					//document.user_query_form123.captcha.focus();
					//document.getElementById('wrongcap').style.color = "red";
					//document.images['capchange_req'].src='/news/captcha/CaptchaSecurityImages.php?' + Date.parse(new Date().toString());

				}*/
			}
			else{
				document.user_query_form123.bcontrol.disabled=true;
				
				document.getElementById('infodiv').style.display="block";
				document.getElementById('response').innerHTML = '<img src="/images/ajax_loader_edu.gif">&nbsp;Submiting...please wait.';
				//document.images['capchange_req'].src='/news/captcha/CaptchaSecurityImages.php?' + Date.parse(new Date().toString());
				document.getElementById('invocationcode').style.display='none';

			}
		 }
		 xmlHttp6.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		 xmlHttp6.setRequestHeader("Content-length", params.length);
		 xmlHttp6.setRequestHeader("Connection", "close");

		 xmlHttp6.send(params);
		 return false;
  	}
}

function reset_response_div(){
		
		document.getElementById('response').innerHTML='';
		document.getElementById('invocationcode').style.display='block';
		//alert(document.getElementById('invocationcode').style.display);img11
		document.getElementById('img11').style.display='none';
		
}


function close_msg(){

document.getElementById("infodiv").style.display="none";

}
