function checkField(felt) 
{
	return (document.getElementById(felt));
}

function setFocus(felt)
{
	var obj = checkField(felt);
	if (obj != null) obj.focus();
}

/** Removes ALL whitespace from input string */
function TrimWhitespace( input )
{
	return input.replace( /\s/g, '' );
}

function LTrim(str)
	{
	var whitespace = new String(" \t\n\r");

	var s = new String(str);

	if (whitespace.indexOf(s.charAt(0)) != -1) 
		{
		var j=0, i = s.length;
		while (j < i && whitespace.indexOf(s.charAt(j)) != -1)
			j++;
		s = s.substring(j, i);
		}
	return s;
	}

function RTrim(str)
	{
	var whitespace = new String(" \t\n\r");

	var s = new String(str);

	if (whitespace.indexOf(s.charAt(s.length-1)) != -1) 
		{
		var i = s.length - 1;
		while (i >= 0 && whitespace.indexOf(s.charAt(i)) != -1)
			i--;
		s = s.substring(0, i+1);
		}
	return s;
	}

function Trim(str)
	{
	return RTrim(LTrim(str));
	}
	
function doScroll(seed,tekst) 
	{
	var m1 = tekst ;
	var msg=m1;
	var out = " ";
	var c = 1;
	var l1=75;
	var l2=110;
	var cmd;
	
	if (seed > 100) 
		{
		seed--;
		cmd="doScroll("+seed+",'"+tekst+"')";
		timerTwo=window.setTimeout(cmd,l1);
		}
	else 
		{
		if (seed <= 100 && seed > 0) 
			{
			for (c=0 ; c < seed ; c++) 
				{
				out+=" ";
				}
			out+=msg;
			seed--;
			window.status=out;
			cmd="doScroll("+seed+",'"+tekst+"')";
			timerTwo=window.setTimeout(cmd,l1);
			}
		else 
			{
			if (seed <= 0) 
				{
				if (-seed < msg.length) 
					{
					out+=msg.substring(-seed,msg.length);
					seed--;
					window.status=out;
					cmd="doScroll("+seed+",'"+tekst+"')";
					timerTwo=window.setTimeout(cmd,l2); //100
					}
				else
					{
					window.status=" ";
					cmd="doScroll("+100+",'"+tekst+"')";
					timerTwo=window.setTimeout(cmd,l1);
					}
				}
			}
		}
	}
	
function scrollText(sTxt)
	{ 
	if (typeof(doScroll) == 'function') if (sTxt.length > 0) doScroll(100,sTxt);
	}
//
// Check for cookies
//	
function checkCookie()
	{
	if (document.cookie == "") 
		{
		document.cookie="testcookie" ;
		var cookieenabled=(document.cookie.indexOf("testcookie")!=-1)? true : false ;
		if (!cookieenabled)	document.location = "cookie_information.asp" ;
		}
	}
	
//document.cookie = '';

InsertLoadQue( "checkCookie()" );	

