	function validateContacts_frm(){		
		var fName=lName=pNumber=zip=email=brief_desc=input_captcha='';
		var flag='1';
		var elefocus='';
		
		fName=$('#fName').val();
		lName=$('#lName').val();
		pNumber=$('#pNumber').val();
		zip=$('#zip').val();
		email = $('#email').val();
		brief_desc=$('#brief_desc').val();
		if(brief_desc=='(500 Characters)'){		
				brief_desc='';
			}
		input_captcha=$('#input_captcha').val();	
		
		if(fName==''){
			$('#fnameError').show(); 
			$('#fnameError').html('Please enter first name.');
			if(elefocus==''){
			elefocus='#fName';}	
			flag='0';
			}		
		
		if(fName!=''){
			$('#fnameError').hide();
		}
		
				
		if(lName==''){
			$('#lnameError').show(); 
			$('#lnameError').html('Please enter last name.');
			if(elefocus==''){
			elefocus='#lName';}	
			flag='0';
		}		
		
		if(lName!=''){
			$('#lnameError').hide();
		}
		
		
		/*if(pNumber==''){
			$('#pNumberError').show(); 
			$('#pNumberError').html('Please enter your phone number.');
			if(elefocus==''){
			elefocus='#pNumber';}	
			flag='0';
		}*/		
		
		if(pNumber!=''){
			$('#pNumberError').hide();
		}	
		

		if(zip==''){
			$('#zipError').show(); 
			$('#zipError').html('Please enter your zip code.');
			if(elefocus==''){
			elefocus='#zip';}	
			flag='0';
		}		
		
		if(zip!=''){
			$('#zipError').hide();
		}	
		
		
		if(email==''){
			$('#emailError').show(); 
			$('#emailError').html('Please enter your email address.');
			if(elefocus==''){
			elefocus='#email';}	
			flag='0';}
			
		else if(email!=''){		
			if(!isEmail(email)){
			$('#emailError').show(); 
			$('#emailError').html('Please enter valid email address');		
			if(elefocus==''){
			elefocus='#email';}			
			flag='0';}	
			else {	
			$('#emailError').hide();}
			}		
		
		if(brief_desc==''){
			$('#BriefError').show(); 
			$('#BriefError').html('Please enter brief Description.');
			if(elefocus==''){
			elefocus='#brief_desc';}	
			flag='0';
		}		
		
		if(brief_desc!=''){
			$('#BriefError').hide();
		}
		
		if(input_captcha==''){
			$('#captchaError').show(); 
			$('#captchaError').html('Please enter capctha code.');
			if(elefocus==''){
			elefocus='#input_captcha';}	
			flag='0';
		}		
		
		if(input_captcha!=''){
			$('#captchaError').hide();
		}
		
		if(flag=='0'){
			$(elefocus).focus();
			return false;
		}
	
		document.frmContact.submit();
	}
	
	
		
	function showMess() {
		drawBackLayer();
		$('#messpopup').show();
		var snpopup = $('#messpopup');
		var height = $(window).height();
		var width = $(document).width();
		// $("#signupFName").focus();
		snpopup.css({
		'left' : width/2 - (snpopup.width() / 2),  
		'top' : height/2 - (snpopup.height() / 2), 
		'z-index' : 10000000                        
		});
	
	}
	
	function hidemessPopup() {
		removeBackLayer();
		$('#messpopup').hide();
	} 
	
	
	
		
	
	
	function showAttornPopup() {
		drawBackLayer();
		$('#attornpopup').show();
		var snpopup = $('#attornpopup');
		var height = $(window).height();
		var width = $(document).width();
		// $("#signupFName").focus();
		snpopup.css({
		'left' : width/2 - (snpopup.width() / 2),  
		'top' : height/2 - (snpopup.height() / 2), 
		'z-index' : 1000000                        
		});	
	}
	
	
	function hideSignupPopup() {
		
		$('#contactName').val('Contact Name:');
		$('#lawFirmName').val('Law Firm Name:');
		$('#contactNumber').val('Contact Number:');
		$('#email_add').val('Email Address:');
		$('#city').val('City:');
		$('#state').val('State:');
		$('#zip_code').val('Zip Code:');
		$('#comment').val('Comment box with (500 Characters)');
		
		$('#contactError').hide();
		$('#lawFirmError').hide();
		$('#cNumberError').hide();
		$('#email_add_Error').hide();
		$('#cityError').hide();
		$('#stateError').hide();
		$('#zipCodeError').hide();
		$('#commentError').hide();
		
		removeBackLayer();
		$('#attornpopup').hide();
	} 
	
	function drawBackLayer(){
		var winheight = $(document).height();	
        $('#winhidelayer').css('height',winheight);
		$('#winhidelayer').show();
	}
	
	function removeBackLayer(){
		$('#winhidelayer').hide();
	} 
	
	
	function validate_popup(){
		var contactName=lawFirmName=contactNumber=email_add=city=state=zip_code=comment='';
		var flag='1';
		var elefocus='';
		
		contactName=$('#contactName').val();
			if(contactName=='Contact Name:'){		
				contactName='';
			}
		
		lawFirmName=$('#lawFirmName').val();
			if(lawFirmName=='Law Firm Name:'){		
				lawFirmName='';
			}
		
		contactNumber=$('#contactNumber').val();
			if(contactNumber=='Contact Number:'){		
				contactNumber='';
			}
		
		email_add = $('#email_add').val();
			if(email_add=='Email Address:'){		
				email_add='';
			}
			
		city = $('#city').val();
			if(city=='City:'){		
				city='';
			}
			
		state = $('#state').val();
			if(state=='State:'){		
				state='';
			}
			
		zip_code=$('#zip_code').val();
			if(zip_code=='Zip Code:'){		
				zip_code='';
			}
		
		comment=$('#comment').val();
			if(comment=='Comment box with (500 Characters)'){		
				comment='';
			}
		
		if(contactName==''){
			$('#contactError').show(); 
			$('#contactError').html('Please enter contact name.');
			if(elefocus==''){
			elefocus='#contactName';}	
			flag='0';
			}		
		
		if(contactName!=''){
			$('#contactError').hide();
		}
		
				
		if(lawFirmName==''){
			$('#lawFirmError').show(); 
			$('#lawFirmError').html('Please enter law firm name.');
			if(elefocus==''){
			elefocus='#lawFirmName';}	
			flag='0';
		}		
		
		if(lawFirmName!=''){
			$('#lawFirmError').hide();
		}
		
		
		if(contactNumber==''){
			$('#cNumberError').show(); 
			$('#cNumberError').html('Please enter contact number.');
			if(elefocus==''){
			elefocus='#contactNumber';}	
			flag='0';
		}		
		
		if(contactNumber!=''){
			$('#cNumberError').hide();
		}	
		
		if(email_add==''){
			$('#email_add_Error').show(); 
			$('#email_add_Error').html('Please enter email address.');
			if(elefocus==''){
			elefocus='#email_add';}	
			flag='0';}
			
		else if(email_add!=''){		
			if(!isEmail(email_add)){
			$('#email_add_Error').show(); 
			$('#email_add_Error').html('Please enter valid email address');		
			if(elefocus==''){
			elefocus='#email_add';}			
			flag='0';}	
			else {	
			$('#email_add_Error').hide();}
			}
		
		if(city==''){
			$('#cityError').show(); 
			$('#cityError').html('Please enter your city.');
			if(elefocus==''){
			elefocus='#city';}	
			flag='0';
		}		
		
		if(city!=''){
			$('#cityError').hide();
		}	
		
		
		if(state==''){
			$('#stateError').show(); 
			$('#stateError').html('Please enter your state.');
			if(elefocus==''){
			elefocus='#state';}	
			flag='0';
		}		
		
		if(state!=''){
			$('#stateError').hide();
		}	
		
		if(zip_code==''){
			$('#zipCodeError').show(); 
			$('#zipCodeError').html('Please enter zip code.');
			if(elefocus==''){
			elefocus='#zip_code';}	
			flag='0';
		}		
		
		if(zip_code!=''){
			$('#zipCodeError').hide();
		}			
		
		if(comment==''){
			$('#commentError').show(); 
			$('#commentError').html('Please enter comment description.');
			if(elefocus==''){
			elefocus='#comment';}	
			flag='0';
		}		
		
		if(comment!=''){
			$('#commentError').hide();
		}		
		
		if(flag=='0'){
			$(elefocus).focus();
			return false;
		}
	
		document.frm_attorney.submit();
	}
	
	function showAttMess() {
		drawBackLayer();
		$('#messAttpopup').show();
		var snpopup = $('#messAttpopup');
		var height = $(window).height();
		var width = $(document).width();
		snpopup.css({
		'left' : width/2 - (snpopup.width() / 2),  
		'top' : height/2 - (snpopup.height() / 2), 
		'z-index' : 10000000                        
		});
	
	}
	
	function hideAttmessPopup() {
		removeBackLayer();
		$('#messAttpopup').hide();
	} 
