var fakeCall = true;

function ajaxRequest(url, data, processor) {	
	$.post(url, data, processor, "json");
}

function evalJson(json){
	return eval('(' + json + ')');
}

function isFieldEmpty(field) {
	if ($(field).value == "") {
		$(field).focus();
		return true;
	}
	return false;
}

function isFieldEmail(field) {
	if (!/[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9.-]{2,4}$/.test($(field).value)) {
		$(field).focus();
		return true;
	}
	return false;
}

function attachFilesHeight(files, links)
{
	var fHeight = 0;
	var lHeight = 0;
	var heightPx = 18;
	
	if(files > 0){
		fHeight = (files * heightPx) + 130;
	}
	if(links > 0){
		lHeight = (links * heightPx) + 130;
	}
	
	if(fHeight > lHeight){
		$('.attach').children('.files').children('.content').height(fHeight);
		if($('.attach').children('.links').length > 0){
			$('.attach').children('.links').children('.content').height(fHeight);
		}
	}else{
		if($('.attach').children('.files').length > 0){
			$('.attach').children('.files').children('.content').height(lHeight);
		}
		$('.attach').children('.links').children('.content').height(lHeight);
	}
}

