$.metadata.setType("attr", "validate");

$().ready(function() {

	// validate the search business in superadmin

	$("#surveyform").validate();

});

//for checking existing business email

$(document).ready(function()

{

	$("#business_email").blur(function()

	{

		//ert('minhaj');

		//remove all the class add the messagebox classes and start fading

		$("#msgbox").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");

		

		//check the username exists or not from ajax

		$.post("http://www.businessrater.com/business_signup/check_email",{business_email:$(this).val() } ,function(data)

        {

			if(data=='invemail') //if username not avaiable

		  {

		  	$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox

			{ 

			  //add message and change the class of the box and start fading

			  $(this).html('You Must Enter Your Email Address').addClass('messageboxerror').fadeTo(900,1);

			  

			});

			return false;

          }	

		  

		  if(data=='no') //if username not avaiable

		  {

			document.getElementById('chkEmail').value='';

			//document.getElementById('email').focus();

		  	$("#msgbox").fadeTo(200,0.1,function() //start fading the messagebox

			{ 

			  //add message and change the class of the box and start fading

			  //$(this).html('This Email Already exists').addClass('messageboxerror').fadeTo(900,1);

			 var x=document.getElementById('business_email').value;
			  var atpos=x.indexOf("@");
				var dotpos=x.lastIndexOf(".");
				if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
				  {
			      //document.getElementById('msgbox1').style.display='none'; 
				  document.getElementById('msgbox').style.display='none'; 
				  
			   }else{
			  	$(this).html('<img src="http://www.businessrater.com/images/icon-incomplete1.png">').addClass('messageboxerror').fadeTo(900,1);
			  }

			  });

			return false;

          }

		  else

		  {

		  	$("#msgbox").fadeTo(200,0.1,function()  //start fading the messagebox

			{ 

			document.getElementById('chkEmail').value='2';

			  //add message and change the class of the box and start fading
				var x=document.getElementById('business_email').value;
			  var atpos=x.indexOf("@");
				var dotpos=x.lastIndexOf(".");
				if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
				  {
			      //document.getElementById('msgbox1').style.display='none';
				  document.getElementById('msgbox').style.display='none';  
			   }else{
			  	 $(this).html('<img src="http://www.businessrater.com/images/publish.png">').addClass('messageboxok').fadeTo(900,1);
			  }
			  //$(this).html('Email Available To Register').addClass('messageboxok').fadeTo(900,1);

			  

			});

		  }

				

        });

 

	});

});





//for checking existing business email

$(document).ready(function()

{

	$("#email_address").blur(function()

	{

		//ert('minhaj');

		//remove all the class add the messagebox classes and start fading

		$("#msgbox1").removeClass().addClass('messagebox').text('Checking...').fadeIn("slow");

		

		//check the username exists or not from ajax

		$.post("http://www.businessrater.com/signup/check_email",{email_address:$(this).val() } ,function(data)

        {

			if(data=='invemail') //if username not avaiable

		  {

		  	$("#msgbox1").fadeTo(200,0.1,function() //start fading the messagebox

			{ 

			  //add message and change the class of the box and start fading

			  $(this).html('You Must Enter Your Email Address').addClass('messageboxerror').fadeTo(900,1);

			  

			});

			return false;

          }	

		  

		  if(data=='no') //if username not avaiable

		  {

			document.getElementById('chkEmail1').value='';

			//document.getElementById('email').focus();

		  	$("#msgbox1").fadeTo(200,0.1,function() //start fading the messagebox

			{ 

			  //add message and change the class of the box and start fading

			  //$(this).html('Email Already exists').addClass('messageboxerror').fadeTo(900,1);
           var x=document.getElementById('email_address').value;
			var atpos=x.indexOf("@");
				var dotpos=x.lastIndexOf(".");
				if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
				  {
			      document.getElementById('msgbox1').style.display='none'; 
				  document.getElementById('msgbox').style.display='none';
			   }else{
			  	$(this).html('<img src="http://www.businessrater.com/images/icon-incomplete1.png">').addClass('messageboxerror').fadeTo(900,1);
			  }
			 

			  });

			return false;

          }

		  else

		  {

		  	$("#msgbox1").fadeTo(200,0.1,function()  //start fading the messagebox

			{ 

			document.getElementById('chkEmail1').value='2';

			  //add message and change the class of the box and start fading

			  //$(this).html('Email Available').addClass('messageboxok').fadeTo(900,1);

			   var x=document.getElementById('email_address').value;
			  var atpos=x.indexOf("@");
				var dotpos=x.lastIndexOf(".");
				if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length)
				  {
			      document.getElementById('msgbox1').style.display='none';
				  document.getElementById('msgbox').style.display='none';
			   }else{
			  	$(this).html('<img src="http://www.businessrater.com/images/publish.png">').addClass('messageboxok').fadeTo(900,1);
			  }

			});

		  }

				

        });

 

	});

});





$().ready(function() {

   // validate signup form for business

	$("#businessForm").validate();

});

$().ready(function() {

	// validate the business login form

	$("#bsloginForm").validate();

});

$().ready(function() {

	// validate the business forgot password

	$("#bsForgotForm").validate();

});



$().ready(function() {

   // validate signup form for business

	$("#userForm").validate();

});

$().ready(function() {

   // validate the business login form

	$("#userlogForm").validate();

});



$().ready(function() {

	// validate the user forgot password

	$("#userForgotForm").validate();

});

$().ready(function() {

	// validate the user forgot password

	$("#profileUpForm").validate();

});

$().ready(function() {

	// validate the business user changepassword

	$("#changePwdForm").validate();

});

$().ready(function() {

	// validate the add employee form 

	$("#addEmpForm").validate();

});

$().ready(function() {

	// validate the business profile pics

	$("#profilePicsForm").validate();

});

$().ready(function() {

	// validate the Create review form

	$("#crtReviewForm").validate();

});



$().ready(function() {

	// validate the business user changepassword password

	$("#subcategoryFrm").validate();

});





$().ready(function() {

	// validate the business user changepassword password

	$("#category").validate();

});



//Edit Cunsumer Profile Form

$().ready(function() {

	// validate the business user changepassword password

	$("#editprofile").validate();

});



//Edit Cunsumer Profile Form

$().ready(function() {

	// validate the business user changepassword password

	$("#sendmessage").validate();

});





//Edit Cunsumer Profile Form

$().ready(function() {

	// validate the business user changepassword password

	$("#profilePicsForm").validate();

});









$().ready(function() {

	// validate the business user changepassword password

	$("#addmoreemails").validate();

});





//Edit Cunsumer Profile Form

$().ready(function() {

	// validate the business user changepassword password

	$("#sendnewmessages").validate();

});



//Edit Cunsumer Profile Form

$().ready(function() {

	// validate the edit members in superadmin

	$("#editmembers").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#membersearch").validate();

});

//Edit Cunsumer Profile Form

$().ready(function() {

	// validate the edit business in superadmin

	$("#editbusiness").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#businesssearch").validate();

});



$().ready(function() {

	// validate the search business in superadmin

	$("#reviewformEx").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#reviewformnew").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#addDeptForm").validate();

});



$().ready(function() {

	// validate the search business in superadmin

	$("#addemailForm").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#addProfileForm").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#creatSurvey").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#addfieldForm").validate();

});

$().ready(function() {

	// validate the search business in superadmin

	$("#addQestions").validate();

});

$().ready(function() {
	// validate the search business in superadmin
	$("#support_message").validate();
});
$().ready(function() {
	// validate the search business in superadmin
	$("#ubl_integration").validate();
});

$().ready(function() {
	// validate the search business in superadmin
	$("#claimform").validate();
});
//getting subcategories to business signup
$().ready(function() {
	// validate the search business in superadmin
	$("#payment_process").validate();
});
$().ready(function() {
	// validate the search business in superadmin
	$("#cropimage").validate();
});

$().ready(function() {
	// validate the search business in superadmin
	$("#invite_friend").validate();
});
//getting subcategories to business signup
$().ready(function() {
	// validate the search business in superadmin
	$("#contactform").validate();
});

function get_subcategory(catid)

{



var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = catid ;

var url = "http://www.businessrater.com/business_signup/subcategories/" + queryString

   

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('getsubcat').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}



//getting subcategories to business signup

function get_emp_reviews(empid)

{

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = empid ;

var url = "http://www.businessrater.com/business_profile/emp_reviews_ajax/" + queryString



    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('empReviews').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}



//getting subcategories to business signup

function get_dept_reviews(deptid)

{



var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = deptid;

var url = "http://www.businessrater.com/business_profile/dept_reviews_ajax/" + queryString



    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('deptReviews').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}





//////////// check current password exist or not



function checkExistPword(val)

{

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = val;

var url = "http://www.businessrater.com/business/account_settings/check_existing_password/"+encodeURIComponent(queryString);

  

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			//document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('busiexpwd').innerHTML= ajaxRequest.responseText;

			if(ajaxRequest.responseText==''){

				document.getElementById('hiderspwd').value=1;	

			}else{

				document.getElementById('hiderspwd').value='';

			}

			//alert(ajaxRequest.responseText);

			

        }

    }

}



this.vtip = function() {    

    this.xOffset = -10; // x distance from mouse

    this.yOffset = 10; // y distance from mouse       

    

    $(".vtip").unbind().hover(    

        function(e) {

            this.t = this.title;

            this.title = ''; 

            this.top = (e.pageY + yOffset); this.left = (e.pageX + xOffset);

            

            $('body').append( '<p id="vtip"><img id="vtipArrow" />' + this.t + '</p>' );

                        

            $('p#vtip #vtipArrow').attr("src", 'http://www.businessrater.com/images/vtip_arrow.png');

            $('p#vtip').css("top", this.top+"px").css("left", this.left+"px").fadeIn("slow");

            

        },

        function() {

            this.title = this.t;

            $("p#vtip").fadeOut("slow").remove();

        }

    ).mousemove(

        function(e) {

            this.top = (e.pageY + yOffset);

            this.left = (e.pageX + xOffset);

                         

            $("p#vtip").css("top", this.top+"px").css("left", this.left+"px");

        }

    );            

    

};



jQuery(document).ready(function($){vtip();}) 





function fnchngopt(qtype){

	

	



	

	if(qtype == '3'){

		document.getElementById('rating').style.display='block';

		document.getElementById('displayFormat').style.display='none';

		document.getElementById('RatingDiv_name_1').disabled=false;

		document.getElementById('RatingDiv_name_2').disabled=false;

		document.getElementById('RatingDiv_value_1').disabled=false;

		document.getElementById('RatingDiv_value_2').disabled=false;

		

	}else{

		document.getElementById('rating').style.display='none';

		document.getElementById('displayFormat').style.display='block';

	}

	

	if(qtype == '4'){

		document.getElementById('menudiv').style.display='block';

		document.getElementById('displayFormat').style.display='none';

		document.getElementById('MenuDiv_name_1').disabled=false;

		document.getElementById('MenuDiv_value_1').disabled=false;

	}else{

		document.getElementById('menudiv').style.display='none';

		document.getElementById('displayFormat').style.display='block';

	}

	if((qtype == '2') || (qtype == '5') || (qtype == '6') || (qtype == '7')){

		document.getElementById('answers').style.display='none';

		document.getElementById('displayFormat').style.display='none';

		document.getElementById('FieldChoices').disabled=true;

	}else{

		document.getElementById('answers').style.display='block';

		document.getElementById('displayFormat').style.display='block';

		document.getElementById('FieldChoices').disabled=false;

	}

	

	/*if(qtype == '2'){

		document.getElementById('answers').style.display='none';

		document.getElementById('displayFormat').style.display='none';

		document.getElementById('FieldChoices').disabled=true;

	}else{

		document.getElementById('answers').style.display='block';

		document.getElementById('displayFormat').style.display='block';

		document.getElementById('FieldChoices').disabled=false;

	}

	*/

}

//show hide fields



function showfields(div,val,cnt){

	var cnt = parseInt(cnt);

	for(var i=1;i<=cnt;i++){

		if(i <= parseInt(val)){

			document.getElementById(div+i).style.display='block';

			document.getElementById(div+'name_'+i).disabled=false;

			document.getElementById(div+'value_'+i).disabled=false;

		}else{

			document.getElementById(div+i).style.display='none';

			document.getElementById(div+'name_'+i).disabled=true;

			document.getElementById(div+'value_'+i).disabled=true;

		}

		

	}

}



function checkExistPwordcunsumer(val)



{

	

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = val;

var url = "http://www.businessrater.com/profile/check_existing_password/"+encodeURIComponent(queryString);

  

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('busiexpwd').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);
			 if(ajaxRequest.responseText==''){

				document.getElementById('hiderspwd').value=1;	

			}else{

				document.getElementById('hiderspwd').value='';

			}
			

        }

    }

}



/////////CAPTCHA /////////////////////////////



var url = 'http://www.businessrater.com/signup/captchek/';

var captchaOK = 2; 

// 2 - not yet checked, 1 - correct, 0 - failed 

function getHTTPObject() { try { req = new XMLHttpRequest(); } catch (err1) { try { req = new ActiveXObject("Msxml12.XMLHTTP"); } catch (err2) { try { req = new ActiveXObject("Microsoft.XMLHTTP"); } catch (err3) { req = false; } } } return req; } var http = getHTTPObject();



function handleHttpResponse() { 

if (http.readyState == 4) { 

captchaOK = http.responseText;



if(captchaOK == 0) { 

//alert('IN');

//alert('The entered code was not correct. Please try again'); 

document.getElementById('ccode').innerHTML='The entered code was not correct. Please try again';

//document.getElementById("ccode").innerHTML="New Header";

//document.getElementById('code').value=''; 

//document.getElementById('code').focus(); 

document.getElementById('hideCode').value='';

return false;

 } else{

	 //alert('OUT');

	document.getElementById('ccode').innerHTML=''; 

	document.getElementById('hideCode').value='1';

 }

 

 } 

 } 



function checkcode(thecode) { 

 url2 = url + escape(thecode);

 http.open("GET", url2, true);

 http.onreadystatechange = handleHttpResponse; 

 http.send(null);

 } 

 

 var timer;

function chk_me(arg) {

    clearTimeout(timer);

    timer = setTimeout(function () {

        checkcode(arg);

    }, 1500);

}



 

/*var timer;

    function chk_me(thecode){



       clearTimeout(timer);

       timer=setTimeout(function checkcode(thecode),1000);

    }

*/

 //getting subcategories to business signup

function get_business_profilepics(picid)

{

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = picid ;

var url = "http://www.businessrater.com/business_profile/profilePics/" + queryString

   

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

			//document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('profilepic').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}

function othercategories(val)

{

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryString = val;

var url = "http://www.businessrater.com/business_signup/otherall_categories/" + queryString

   

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('other_exactcat').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}


function checkExistPwordsuperadmin(val)



{



var ajaxRequest;// The variable that makes Ajax possible!

try{

// Opera 8.0+, Firefox, Safari

ajaxRequest = new XMLHttpRequest();

} catch (e){

// Internet Explorer Browsers

try{

ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

} catch (e) {

try{

ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

} catch (e){

// Something went wrong

alert("Your browser broke!");

return false;

}

}

}

var queryString = val;

var url = "http://www.businessrater.com/superadmin/dashboard/check_existing_password/" + encodeURIComponent(queryString);



ajaxRequest.open("POST", url, true);

ajaxRequest.send(null);

ajaxRequest.onreadystatechange = function(){

if(ajaxRequest.readyState == 4){

//var ajaxDisplay = document.getElementById('ajaxDiv');



//document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

document.getElementById('superadmin').innerHTML= ajaxRequest.responseText;

if(ajaxRequest.responseText==''){

document.getElementById('hiderspwd').value=1;

}else{

document.getElementById('hiderspwd').value='';

}



//alert(ajaxRequest.responseText);



}

}

}



mrsrinureddy: //here sr work best cate and write review Emp departmet







function bestcategoriesvote(vals,busval)



{

//alert(busval);	

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var queryStrings = vals;

var queryStrings_bus = busval;

var url = "http://www.businessrater.com/business_profile/best_categories_vote/" + queryStrings +"/"+ queryStrings_bus

  //alert(url);

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

		document.getElementById('votetest').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}











function get_development_emplo(devpid)

{

//alert('hi');

//alert(devpid);

var ajaxRequest;// The variable that makes Ajax possible!

try{

// Opera 8.0+, Firefox, Safari

ajaxRequest = new XMLHttpRequest();

} catch (e){

// Internet Explorer Browsers

try{

ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

} catch (e) {

try{

ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

} catch (e){

// Something went wrong

alert("Your browser broke!");

return false;

}

}

}

var queryString = devpid ;

var url = "http://www.businessrater.com/write_a_review/review_form_departments_employees/" + queryString



ajaxRequest.open("POST", url, true);

ajaxRequest.send(null);

ajaxRequest.onreadystatechange = function(){

if(ajaxRequest.readyState == 4){

//var ajaxDisplay = document.getElementById('ajaxDiv');



//document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

document.getElementById('getempdev').innerHTML= ajaxRequest.responseText;

document.getElementById('getempdev1').innerHTML= ajaxRequest.responseText;

//alert(ajaxRequest.responseText);



}

}

} 



//getting subcategories to business signup

function get_review_form(bUid,deptid)

{

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var url = "http://www.businessrater.com/write_a_review/review_form_fields/" +bUid+"/"+deptid

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('reviewform_ajax').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}



//getting subcategories to business signup

function get_reviewform_newuser(bUid,deptid)

{

var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var url = "http://www.businessrater.com/write_a_review/review_form_fields/" +bUid+"/"+deptid

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){

            //var ajaxDisplay = document.getElementById('ajaxDiv');

			

            //document.getElementById('getingcollege').innerHTML= ajaxRequest.responseText;

			document.getElementById('reviewform_ajax_newuser').innerHTML= ajaxRequest.responseText;

			//alert(ajaxRequest.responseText);

			

        }

    }

}

function get_survey_status(val)

{
var ajaxRequest;// The variable that makes Ajax possible!

    try{

        // Opera 8.0+, Firefox, Safari

        ajaxRequest = new XMLHttpRequest();

    } catch (e){

        // Internet Explorer Browsers

        try{

            ajaxRequest = new ActiveXObject("Msxml2.XMLHTTP");

        } catch (e) {

            try{

                ajaxRequest = new ActiveXObject("Microsoft.XMLHTTP");

            } catch (e){

                // Something went wrong

                alert("Your browser broke!");

                return false;

            }

        }

    }

var url = "http://www.businessrater.com/write_a_review/survey_step/"+val

    ajaxRequest.open("POST", url, true);

    ajaxRequest.send(null); 

    ajaxRequest.onreadystatechange = function(){

        if(ajaxRequest.readyState == 4){
			var st = ajaxRequest.responseText;
				if(st==0){
				document.getElementById('step_enable').style.display='none';
				}else{
				document.getElementById('step_enable').style.display='block';	
				}
				
			
        }

    }

}


