onLoginAction = "";
onAdminAction = "";
onNoAdminAction = "";

onLogining = "";

onLoginAction += "$('#dropdown-link').bind('mouseenter', function(e) {$('#dropdown').fadeIn();});";
onLoginAction += "$('#dropdown').bind('mouseleave', function(e) {$('#dropdown').fadeOut();});";

onNoLogining = "";
onBanerAction="";
//sRef = "1";

function GetCookie( 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 SetCookie(sName, sValue)
{
	document.cookie += sName + "=" + escape(sValue) + ";"; 
}


function getRef()
{
	loc = window.location.href
	ref = 1;
	ref = GetCookie('ref');
	try
	{
		var re = new RegExp("ref=([0-9])*","ig");
		r = loc.match(re);r=r[0];
		r = r.replace('ref=', '');
		if(r > 0)ref = r;
	}catch(e){}
	
	SetCookie('ref', ref);
	return ref;
}

try{sRef = getRef();}catch(e){sRef = 1;}
 