function deleteMessageConfirm()
{
	var restart = confirm("Bu Mesajı Silmek İstediğinizden Emin misiniz?");
	if(restart)
		return true;
	else
		return false;
}
function deleteMessageConfirmAll()
{
	var restart = confirm("Tüm Okunan Mesajlarınızı Silmek İstediğinizden Emin misiniz?");
	if(restart)
		return true;
	else
		return false;
}
function openPopUp_520x390(href, target)
{
	newWindow = window.open(href, target, 'width=520, height=390, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	if (window.focus) {newWindow.focus()}
		return false;
}
function openPopUp_400x300(href, target)
{
	newWindow = window.open(href, target, 'width=400, height=300, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0');
	if (window.focus) {newWindow.focus()}
		return false;
}
function openPopUp_600x600(href, target)
{
	newWindow = window.open(href, target, 'width=600, height=600, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=1');
	if (window.focus) {newWindow.focus()}
		return false;
}
function showFirmProduct(idx)
{
	newWindow = window.open("virtual_fair_firm_product_detail.php?id=" + idx, "virtual_fair_firm_product_detail", "width=640, height=480, top=0, toolbar=0, location=0, directories=0, status=1, menuBar=0, scrollBars=1, resizable=0");
	if (window.focus) {newWindow.focus()}
	return false;
}
function handleEnter (field, event)
{
	var keyCode = event.keyCode ? event.keyCode : event.which ? event.which : event.charCode;
	alert(keyCode);
	if (keyCode == 13) 
		return false;
	else
		return true;
}
function trim(s) 
{
	while (s.substring(0,1) == ' ')
		s = s.substring(1,s.length);
	while (s.substring(s.length-1,s.length) == ' ')
		s = s.substring(0,s.length-1);
	return s;
}
function onlyNumber()
{
	if (event.keyCode < 45 || event.keyCode> 57) 
		event.returnValue = false;
}
function valButton(btn)
{
	var cnt = -1;
	for (var i=0; i < btn.length; i++)
	{
		if (btn[i].checked)
		{
			cnt = i;
			i = btn.length;
		}
	}
	if (cnt > -1)
		return btn[cnt].value;
	else
		return null;
}
function InvalidEmail(elm)
{
	if (elm.value.indexOf("@") <= 0 || elm.value.indexOf(".") <= 0 || elm.value.indexOf("@.") > 0 || elm.value.indexOf(".@") > 0)
		return true;
	else
		return false;
}
function InvalidPassword(elm)
{
	if (elm.value.length < 6)
		return true;
	else
		return false;
}