function Hide_alert_window()
{
	var alert_window = document.getElementById('alert_window');
	
	if (alert_window.style.display != 'none')
	{
		alert_window.style.display = 'none';
	}
}



function HideLoginForm()
{
	var auth = document.getElementById('auth');
	
	if (auth.style.display != 'none')
	{
		auth.style.display = 'none';
	}
}

function ShowLoginForm()
{
	document.getElementById('auth').style.display = 'none';
	
	ToggleLoginForm(null);
}

function CancelEventDown(e)    
{
	if(e != null)
	{
	    if (typeof(e.cancelBubble)=='boolean')
		{		    
		    e.cancelBubble = true;
		}
		if (typeof(e.preventDefault)==undefined)
		{	    
            e.preventDefault();
		}
		if (typeof(e.returnValue)=='boolean')
		{		  			
			e.returnValue = false;
		}
		
		if (typeof(e.stopPropagation)=='function')
		{		  			
			e.stopPropagation();
		}
	}
	return false;
}

function ToggleLoginForm(e)
{
	var auth = document.getElementById('auth');

	if (auth.style.display == 'none')
	{
		auth.style.display = '';
		//document.lf.un.focus();
	}else
	{
		auth.style.display = 'none';
	}

    return CancelEventDown(e);
}

function HideStaticLoginForm()
{
	var slf = document.getElementById('authStatic');
	
	if (slf.style.display != 'none')
	{
		slf.style.display = 'none';
	}
}

function Hide_alert_korzina()
{
	var alert_korzina = document.getElementById('alert_korzina');
	
	if (alert_korzina.style.display != 'none')
	{
		alert_korzina.style.display = 'none';
	}
}
opened = 0;
	function SlideLayer(Num){
		var obj = document.getElementById(Num);
		if (opened != 0) {
			opened.style.display = 'none';
			opened = 0;
		} if (obj.style.display=="block") {
			obj.style.display="none";
			opened = 0;
		} else {
			obj.style.display="block";	
			opened = obj;
		}
	}
