function setCookie(param)
{	
	var link = param.type;
	var currentLink = decodeURI(document.location);
	var propertyType = String.prototype.match.call(currentLink,/PropertyType\/(\d+)/);

	if (propertyType)
	{	
		jQuery.cookie('PropertyType', propertyType[1]+'', { expires: 1, path: '/', domain: 'infodoc.kama-software.com' } );
	}
	param.href = link;	
}

function getCookie()
{
	var type = jQuery.cookie('PropertyType');
	if (type)
	{
		jQuery(jQuery(".imgType")[type-1]).click();
	}
        jQuery.cookie('PropertyType', null);
}
