function Set_Cookie( name, value, expires, path, domain, secure ) 
{
	var today = new Date();
	today.setTime( today.getTime() );
	if ( expires )
	{
	expires = expires * 1000 * 60;
	}
	var expires_date = new Date( today.getTime() + (expires) );
	document.cookie = name + "=" +escape( value ) +
	( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
	( ( path ) ? ";path=" + path : "" ) + 
	( ( domain ) ? ";domain=" + domain : "" ) +
	( ( secure ) ? ";secure" : "" );
}
function delete_cookie(name, path)
{
	// Build expiration date string:
	var expiration_date = new Date ();
	expiration_date . setYear (expiration_date . getYear () - 1);
	expiration_date = expiration_date . toGMTString ();

	// Build set-cookie string:
	var cookie_string = escape (name) + "=; expires=" + expiration_date;
	if (path != null)
		cookie_string += "; path=" + path;

	// Delete the cookie:
	document . cookie = cookie_string;
}
function changeSort(obj){
	Set_Cookie('sortby', obj.options[obj.selectedIndex].value, 100000, '/', 'www.italiahard.biz', '' );
	window.location.reload(true);
}
function setVM(cvm){
	Set_Cookie('vm', cvm, 100000, '/', 'www.italiahard.biz', '' );
	window.location.reload(true);
}
function setSite(obj){
	Set_Cookie('csite', obj.options[obj.selectedIndex].value, 100000, '/', 'www.italiahard.biz', '' );
	window.location.reload(true);
}