function SetSiteCookie( cookie_name, value )
{
	document.cookie = cookie_name+"=" + escape( value ) + ";path=/";
	window.location.reload();
}

var SetSelect = function( name, value )
{
	var el = document.getElementById( name );
	for ( var i=0; i < el.options.length; i++ )
	{
		if ( el.options[ i ].value == value )
		{
			el.selectedIndex = i;
			return;
		}
	}
	//el.selectedIndex = 1;
	//alert([name, el.selectedIndex])
}

var ClosePrint = function()
{
	var el = document.getElementById('prnframe');
	if (el)
		document.body.removeChild(el);
}

var PrintUni = function( id )
{
	ClosePrint();

	wnd = document.createElement('iframe');
	wnd.src = receptor+'?index_mode=receptor&module=unimod&command=print&id='+id;
	wnd.id = "prnframe";
	wnd.name = "prnframe";
	wnd.frameborder = 0;
	wnd.border = 0;
	wnd.style.top = '100px';
	wnd.style.left = '0px';
	wnd.style.visibility = 'hidden';
	wnd.height = '0px';
	wnd.width = '0px';	
	window.document.body.appendChild(wnd);
	//document.appendChild(wnd);
	
	//GetData( 'module=unimod&command=print&id='+id, OnPrint );
}
