/*
 * @Revision $Revision: 2443 $
 * @Author $Author: shikha $
 * @Date $Date: 2009-09-08 15:03:59 +0530 (Tue, 08 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(a){return a.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 compname = trim(document.jobform.compname.value);
	var jobtitle = trim(document.jobform.jobtitle.value);
	var jobloc = trim(document.jobform.jobloc.value);
	var jobdesc = trim(document.jobform.jobdesc.value);
	var contactperson = trim(document.jobform.contactperson.value);
	var email = trim(document.jobform.email_job.value);
	var contactno = trim(document.jobform.contactno.value);
	var captchaval = trim(document.jobform.captcha.value);
	var login_check = document.jobform.login_check.value;


                 if(compname==""){
		                         alert("Please enter company name");
  		                         document.jobform.compname.focus();
  		                         return false;
  	                             }

  	            if(compname!=""){
		             var mycars=new Array("'","`");
		             for(var i = 0; i <mycars.length; i++ )
		               {
			             if(compname.match(mycars[i])!=null){
			             alert("Please do not enter '(single quote) in company name");
			              document.jobform.compname.focus();
			              return false;
			           }
		            }
               }
           if(compname.length<3){
		                         alert("Please enter atleast 3 characters");
  		                         document.jobform.compname.focus();
  		                         return false;
  	                             }
                 if(jobtitle=="")
                               {
                                alert("Please enter job title ");
  		                        document.jobform.jobtitle.focus();
  		                        return false;
                               }


                    if(jobtitle!=""){
		             var mycars=new Array("'","`");
		             for(var i = 0; i <mycars.length; i++ )
		               {
			             if(jobtitle.match(mycars[i])!=null){
			             alert("Please do not enter '(single quote) in jobtitle");
			              document.jobform.jobtitle.focus();
			              return false;
			           }
		            }
               }

                if(jobtitle.length<3)
                               {
                                alert("Please enter atleast 3 characters");
  		                        document.jobform.jobtitle.focus();
  		                        return false;
                               }
                  if(jobloc=="")
                               {
                                alert("Please enter job location ");
  		                        document.jobform.jobloc.focus();
  		                        return false;
                               }

                    if(jobloc!=""){
		           var mycars=new Array("'","`");
		             for(var i = 0; i <mycars.length; i++ )
		               {
			             if(jobloc.match(mycars[i])!=null){
			             alert("Please do not enter '(single quote) in job location");
			              document.jobform.jobloc.focus();
			              return false;
			           }
		            }
               }
                if(jobloc.length<3)
                               {
                                alert("Please enter atleast 3 characters");
  		                        document.jobform.jobloc.focus();
  		                        return false;
                               }
                  if(jobdesc=="")
                               {
                                alert("Please enter job description");
  		                        document.jobform.jobdesc.focus();
  		                        return false;
                               }
                           if(jobdesc!=""){
		            var mycars=new Array("'","`");
		             for(var i = 0; i <mycars.length; i++ )
		               {
			             if(jobdesc.match(mycars[i])!=null){
			             alert("Please do not enter '(single quote) in job description");
			              document.jobform.jobdesc.focus();
			              return false;
			           }
		            }
               }
                    if(jobdesc.length<3)
                               {
                                alert("Please enter atleast 3 characters");
  		                        document.jobform.jobdesc.focus();
  		                        return false;
                               }
                if(email=="" && contactno=="")
                {
                alert("Please enter either contact email or contact no.");
                document.jobform.email_job.focus();
			    return false;
                }
  	          if(email!=""){
 		              str=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 email-id!")
			          document.jobform.email_job.focus();
			           return false;
		                 }
	                  }
               if((contactno!="") && isNaN(contactno)==true){
  		              alert("Please enter only numbers.");
   		              document.jobform.contactno.focus();
   		               return false;
  	                 }
  	if(captchaval=="" && login_check!=1){
	  alert("Please type the characters you see in the picture.");
	  document.jobform.captcha.focus();
	  return false;
  	}
  	else{
		 var params = "cn="+compname+"&jt="+jobtitle+"&jl="+jobloc+"&jobdec="+jobdesc+"&cp="+contactperson+"&capid="+captchaval+"&email="+email+"&contactno="+contactno+"&login_check="+login_check;
	     xmlHttp6 = GetXmlHttpObject();
		 url="/freshers/freejobpost.php";

		 xmlHttp6.open("POST",url,true);

		 xmlHttp6.onreadystatechange = function(){
			if (xmlHttp6.readyState==4 && xmlHttp6.status == 200){
			//alert(xmlHttp6.responseText);
			if(xmlHttp6.responseText=="RES|1"){
			        document.getElementById('postfree').style.height='550px' ;
			        document.getElementById('postfree2').style.height='500px';
			        document.getElementById('my').style.height='25px';
					document.jobform.compname.value='';
	                document.jobform.jobtitle.value='';
	                document.jobform.jobloc.value='';
	                document.jobform.jobdesc.value='';
	                document.jobform.contactperson.value='';
	                document.jobform.email_job.value='';
	                document.jobform.contactno.value='';
	                document.jobform.captcha.value='';
	                document.getElementById('response').innerHTML='';
	                if(login_check!=1)
                    {
	                document.getElementById('wrongcap').style.color = "gray";
	                }
                    document.getElementById('message').innerHTML = 'Thank you! Job has been post successfully.It will be online within 24 hrs after review.In a meantime, you can post another job opening.';
				}
            else if(xmlHttp6.responseText=="RES|2"){
					document.getElementById('response').innerHTML = '<img src="/images/icon_err.gif">&nbsp;Could not submited please try again.';
				}
				else if(xmlHttp6.responseText=="RES|3"){
					//document.jobform.bcontrol.disabled=false;
					document.getElementById('response').innerHTML ='';
					document.jobform.captcha.value='';
					document.jobform.captcha.focus();
					document.getElementById('wrongcap').style.color = "red";
					document.images['capchange_req'].src='/news/captcha/CaptchaSecurityImages.php?' + Date.parse(new Date().toString());
				}
			}
			else{
				//document.jobform.bcontrol.disabled=true;
				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());
              }
		 }
		 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 hidediv(id1,id2){
if(id1 != ''){
document.getElementById(id1).style.display = 'none';}
if(id2 != ''){
document.getElementById(id2).style.display = 'block';}
}


function textCounter(field,cntfield,maxlimit)
 {
 // if too long...trim it!

   if (field.value.length > maxlimit)
   {

   field.value = field.value.substring(0, maxlimit);
   //alert(field.value.length);
   }
   else
   {
   cntfield.value = maxlimit - field.value.length;
   //alert(cntfield.value);
   }
 }