function check_all(el)
{

var cntr = document.getElementsByTagName('input');

	for (var i = 0; i < cntr.length; i++)
	{
		if (cntr[i].id == el.id && cntr[i].getAttribute('type') == 'checkbox')
		{
		cntr[i].checked = el.checked
		}
	}
}

function intval(mixed_var, base)
{

var tmp;
var type = typeof(mixed_var);
  
	if (type == 'boolean')
	{
	if (mixed_var == true) return 1;
	else return 0;
    }

	else if (type == 'string')
	{
	tmp = parseInt(mixed_var * 1);
	if (isNaN(tmp) || !isFinite(tmp)) return 0;
	else return tmp.toString(base || 10);
    }

	else if (type == 'number' && isFinite(mixed_var))
	{
	return Math.floor(mixed_var);
    }

	else
	{
	return 0;
	}

}   

$(document).ready(function() {
	$('img.tip').cluetip({
		local: true
	});
});