//====================================================================================================
function curKeyPress(evt)
{
	var charCode = (evt.which) ? evt.which : event.keyCode
	if (charCode > 31 && (charCode < 48 || charCode > 57)) {
		alert("Galima ávesti tik skaičius")
		return false
	}
	return true
}

//====================================================================================================
function curKeyUp(cookieName, obj)
{
	var expdate = new Date();
	expdate.setTime (expdate.getTime() + (24 * 60 * 60 * 1000));
	setCookieData(cookieName,obj.value,expdate);
}

//====================================================================================================
function setCookieData(name,data,expires)
{
	document.cookie = name + "=" + data + ";expires=" + expires.toGMTString();
}

//====================================================================================================
function setCookieDataPlus(name,data,expires)
{
	var expdate = new Date();
	expdate.setTime (expdate.getTime() + expires); //emailas galios tris dienas
	document.cookie = name + "=" + data + ";expires=" + expdate.toGMTString();
}

//====================================================================================================
function verifyCompatibleBrowser()
{
	this.ver = navigator.appVersion;
	this.dom = document.getElementById?1:0
	this.ie5 = (this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
	this.ie4 = (document.all && !this.dom)?1:0;
	this.ns5 = (this.dom && parseInt(this.ver) >= 5) ?1:0;
	this.ns4 =(document.layers && !this.dom)?1:0;
	this.bw = (this.ie5 || this.ie4 || this.ns4 || this.ns5);
	return this
}
bw=new verifyCompatibleBrowser();

//====================================================================================================
function initGetObj()
{
	document.getObj=bw.dom?new Function("obj","return document.getElementById(obj)"):bw.ie4?new Function("obj", "return document.all[obj]"):bw.ns4?new Function("obj","nest","return eval(((!nest)?'':'document.'+nest+'.')+'document.'+obj)"):0;
}

//====================================================================================================
//====================================================================================================
//====================================================================================================

