<?php
function pt_get_captch()
{
	global $captchaimagepath;
	$captchaimagepath = get_bloginfo('template_url').'/library/captcha/';
?>
<div class="form_row clearfix">
<label><?php _e(CAPTCHA);?></label>
<input type="text" name="captcha" size="6" maxlength="6" class="textfield textfield_m" /> 
<img src="<?php bloginfo('template_url');?>/library/captcha/captcha.php" alt="captcha image" /></div>
<?php if($_REQUEST['emsg']=='captch'){echo '<span class="message_error2" id="category_span">'.__('Please enter valid black colored text only').'</span>';}?>
<span class="message_note"><?php _e('Please enter black colored text only.');?></span>
<?php
}
function pt_check_captch_cond()
{
	if($_SESSION["captcha"]==$_POST["captcha"])
	{
		return true;
	}
	else
	{
		return false;
	}	
}
?>