function Delete_Cookie( name, path, domain )
{
	if ( Get_Cookie( name ) ) document.cookie = name + "=" + ( ( path ) ? ";path=" + path : "") + ( ( domain ) ? ";domain=" + domain : "" ) + ";expires=Thu, 01-Jan-1970 00:00:01 GMT";
}

function Get_Cookie( name )
{
	var start = document.cookie.indexOf( name + "=" );
	var len = start + name.length + 1;
	if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) )
	{
		return null;
	}
	if ( start == -1 ) return null;
	var end = document.cookie.indexOf( ";", len );
	if ( end == -1 ) end = document.cookie.length;
	return unescape( document.cookie.substring( len, end ) );
}

function showLayer(id)
{
	$('#'+id).show('slow');
}

function hideLayer(id)
{
	$('#'+id).hide('slow');
}

function showInfoLayer(title,info,type)
{
	var d=document.getElementById('inform');
	switch(type)
	{
		case 'del':
			d.className='del';
			break;
		case 'info':
			d.className='info';
			break;
		case 'ok':
			d.className='ok';
			break;
		case 'alert':
			d.className='alert';
			break;
		default: 
			d.className='info';
			break;
	}
	d.innerHTML='<h1>'+title+'</h1>'+'<p>'+info+'</p>';
	$('#inform').show('slow');
	Delete_Cookie('cms_action','','');
	setTimeout("hideInfoLayer()",10000);
}

function hideInfoLayer()
{
	$('#inform').hide('slow');
}

function popupOpen()
{
	var url=document.location+'/mode,print';
	window.open( url, "PrintVersion");
}

function wo(url,width,height)
{
	window.open( url, "PrintVersion", "width="+width+", height="+height);
}


