
<SCRIPT type=text/javascript>


// Function to add bbcode to the text area

function writeImgTag(code)
{
var cache = document.getElementById('sign').message.value;
this.code = code;
document.getElementById('sign').message.value = cache + code;
document.getElementById('sign').message.focus();
}

function checkfield()
{
var result;
	if ((document.getElementById('sign').name.value == '') || (document.getElementById('sign').message.value == '') || (document.getElementById('sign').email.value == ''))
	{
		alert('Bir veya daha fazla yer bos!  Lütfen bosluklari doldurunuz...')
		result = false;
	}
	else
	{
		var str=document.getElementById('sign').email.value;
		var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2,4})?)$/i;
		if (filter.test(str))
		{
			result = true;
		}
		else
		{
			alert('Lütfen gecerli bir e-mail adresi yaziniz...');
			result = false;
		}
	}
return result;
}

</SCRIPT>

<div>
<?php
$attr = array("method"=>"POST", "id"=>"sign", "onsubmit"=>"return checkfield()");
    echo form::open("mailer/send", $attr);
 //<FORM id=sign onsubmit='return checkfield()' action="send" method=post>
 ?>

<table>

<?= formr::input("name")?>
<?= formr::input("email")?>
<?= formr::input("subject")?>
<?= formr::textarea("message")?>

<tr><td><?= form::input("gonder","Gonder",array("type"=>"submit")) ?></td></tr>
</table>


<?=form::close()?>
</div>




