/*
 * @Revision $Revision: 1363 $
 * @Author $Author: shikha $
 * @Date $Date: 2009-07-23 10:04:17 +0530 (Thu, 23 Jul 2009) $
*/


function showhide(st){
if(st==1){
//document.getElementById("newmahicon").style.display='block';
//document.getElementById("newmahi2con").style.display='block';
$('#newmahicon').fadeIn("slow");
$('#newmahi2con').fadeIn("slow");
}
else{
//document.getElementById("newmahicon").style.display='none';
//document.getElementById("newmahi2con").style.display='none';
$('#newmahicon').fadeOut("slow");
$('#newmahi2con').fadeOut("slow");
document.getElementById("dvtoscroll1").style.display='none';
}
}


function showhide1(st){
if(st==0){
$('#newmahicontact').fadeOut("slow");
$('#newmahi2contact').fadeOut("slow");
}


}

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="processing";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/mca/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/mentorhome.php"}else{if(b=="8"){document.searchfrm.action="http://communities.siliconindia.com/searchresult"}else{if(b=="9"){document.searchfrm.action="/education/mca/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 bloglink_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/mca/addsuccessstory.php?cid="+h}else{if(d=="morestories"){url="/education/mca/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/mca/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="processing"}}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/mca/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="processing"}}function textCheck(){xmlHttp4=GetXmlHttpObject();if(xmlHttp4==null){alert("Your browser does not support AJAX!");return}var a="/education/mca/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/mca/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 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 chkallf(frmname){

	var user_name = trim(frmname.name1.value);
	var user_email = trim(frmname.email.value);
	var user_ph = trim(frmname.mobno.value);
	var user_loc = frmname.locations1.value;
	var course = trim(frmname.course.value);
	var user_query = trim(frmname.message.value);
	var cid = frmname.companyid.value;
	var compnyemail = trim(frmname.companyemail.value);
   
if(trim(frmname.name1.value)=='')
		{
			alert("Please enter your name");
			frmname.name1.focus();
			return false;
		}
	if(frmname.name1.value!=""){
		var alphaExp = /^[a-z A-Z]+$/;
		if(!frmname.name1.value.match(alphaExp)){
			alert("Name should not contain any numbers or special character.");
	  		frmname.name1.focus();
	  		return false;
  		}
  	}
	if(trim(frmname.email.value)=='')
		{
			alert("Please enter your email-id");
			frmname.email.focus();
			return false;
		}
	if(trim(frmname.email.value)!="")
		 {
		     str=frmname.email.value;
			 var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i ;
			 //var filter= /(([a-zA-Z0-9\-?\.?]+)@(([a-zA-Z0-9\-_]+\.)+)([a-z]{2,3})(\W?[,;]\W?(?!$))?)+$/i;
			 if (!filter.test(str))
				{
					alert("Please enter a valid email address!");
					frmname.email.focus();
					return false;
				}
		 }

	if(trim(frmname.mobno.value)=='')
		{
			alert("Please enter your phone/mobile number");
			frmname.mobno.focus();
			return false;
		}

	if (isNaN(frmname.mobno.value)==true)
		{
	   		alert("Please enter only numbers.");
	   		frmname.mobno.focus();
	   		return false;
		}
    if(frmname.mobno.value.length < 10)
  	{
  		alert("Invalid phone number.");
   		frmname.mobno.focus();
   		return false;
  	}
	if(trim(frmname.locations1.value)==0)
		{
			alert("Please select location");
			frmname.locations1.focus();
			return false;
		}
      	if(trim(frmname.course.value)==0)
		{
			alert("Please enter course");
			frmname.course.focus();
			return false;
		}

	if((trim(frmname.message.value)=='') || (trim(frmname.message.value)=='Please write details about an Institute you are looking for.'))
		{
			alert("Please enter your message");
			frmname.message.focus();
			return false;
		}
	var captchacode = trim($("#captchacode").val());
  	if(captchacode==""){
		  alert("Please type the characters you see in the picture.");
		  $("#captchacode").focus();
		  return false;
	  	}


var params = "un="+user_name+"&ue="+user_email+"&up="+user_ph+"&ul="+user_loc+"&uq="+user_query+"&cid="+cid+"&course="+course+"&cmail="+compnyemail+"&capct="+captchacode;
xmlHttp7 = GetXmlHttpObject();
 url="/training_institute/requestsubmit.php";
xmlHttp7.open("POST",url,true);
xmlHttp7.onreadystatechange = function(){
if (xmlHttp7.readyState==4 && xmlHttp7.status == 200){
                //alert(xmlHttp7.responseText);
		 		if(xmlHttp7.responseText=="RES|1"){
		 			frmname.name1.value = '';frmname.email.value='';frmname.mobno.value='';frmname.course.value='';frmname.locations1.value=0;frmname.message.value='Please write details about an Institute you are looking for.';
                    
		 			document.getElementById('dvtoscroll1').style.display='none' ;
		 			document.getElementById('responsemsg').innerHTML = '<img src="/images/sendsuccess.jpg">&nbsp;<b>Your request has been sent successfully.</b>';
                    
                    //document.getElementById("newmahicon").style.display='none';
                    //document.getElementById("newmahi2con").style.display='none';
                    
                    var iscontact = document.getElementById('iscontact').value;
                   
                    
                    if(iscontact==1)
                    {
                    setTimeout( showContact234, 2000);
                    }
                    else
                    {
                     setTimeout( showContact1, 2000);
                    }
			 	}
		 		else if(xmlHttp7.responseText=="RES|2"){
		 			//frmname.submit.disabled=false;
		 			document.getElementById('responsemsg').innerHTML = '<img src="/images/icon_err.gif">&nbsp;<b>Your request is not sended, please try again.</b>';


		 		}
				
				else if(xmlHttp7.responseText=="RES|3"){
		 			//frmname.submit.disabled=false;
 					document.images['capchange_req_report'].src='/news/captcha/CaptchaSecurityImages.php?' + Date.parse(new Date().toString());
					$("#captchacode").val("");
					$("#captchacode").focus();
					//$(".Verdana10Black").css("color", "red");
                    document.getElementById('responsemsg').innerHTML = '<img src="/images/icon_err.gif">&nbsp;<b><font color=red>The picture code you have given is wrong.</font></b>';


		 		}
		 	}
		 	
            
           
            
		 }
		 xmlHttp7.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
		 xmlHttp7.setRequestHeader("Content-length", params.length);
		 xmlHttp7.setRequestHeader("Connection", "close");
		 xmlHttp7.send(params);
		 return false;
}



function showContact234(id)
{   

    
    $('#newmahicon').fadeOut("slow");
    $('#newmahi2con').fadeOut("slow");
    $('#newmahicontact').fadeIn("slow");
    $('#newmahi2contact').fadeIn("slow");
    var divhght = document.getElementById('bisht').offsetHeight;
document.getElementById('newmahicontact').style.height = divhght+75+'px';
document.getElementById('newmahi2contact').style.height = divhght+25+'px';

}
function showContact1()
{
    $('#newmahicon').fadeOut("slow");
    $('#newmahi2con').fadeOut("slow");
    $("#captchacode").val("");
    document.getElementById('responsemsg').innerHTML = '';
   	document.images['capchange_req_report'].src='/news/captcha/CaptchaSecurityImages.php?' + Date.parse(new Date().toString());
}
