
function cookie_save(cName, cValue, cTime)
{
	if (cName!=null && cValue!=null)
	{

		isNow=new Date();


		if(cTime!=null)
		{
				isNow.setTime(expire = (cTime) + isNow.getTime());
		}
		//	isNow.setTime(expire = (cTime) + isNow.getTime());
			//isNow.setTime(expire = (24*60*60*1000) + isNow.getTime());

		///expire=;
		document.cookie= cName+"=" + escape(cValue) //+ "; expires="+expTime;
			+ ( (expire == null) ? "" : ( "; expires=" + isNow.toGMTString() ) );
			//+ ( (expire == null) ? "" : ( "; expires=" + expire.toGMTString() ) );

	}
};

function cookie_load(cName)
{
	var search = cName + "=";

	if (document.cookie.length > 0)
	{

		offset = document.cookie.indexOf(search);

		if (offset != -1)
		{
			begin = offset + search.length;
			end = document.cookie.indexOf(";", offset)

			if (end == -1)
				end = document.cookie.length

			return unescape(document.cookie.substring(begin, end))
		}
	}

	return "";
};


//var LANG = "ENGLISH";
var LANG = "POLISH";

function changeLang(l)
{
	LANG = l;
	//alert (l);
	//window.frames["main"].re();
	 //alert(window.frames["main"].);//.reprintMenu()
}

function getLang()
{
	return LANG;
}

function getLangSign()
{
	if(LANG == "ENGLISH" || LANG=="ENG" || LANG=="EN")
		return "en";
	if(LANG == "POLISH" || LANG=="POL" || LANG=="PL")
		return "pl";
	else
		return "pl";
}


/*
function changeBasic(myvar, myval)
{
	document.groupform["basic["+myvar+"]"].value = myval;
};

function changeAction(myvar, myval)
{
	//alert(document.groupform["basic[ACTION]"].value);
	document.groupform["basic[ACTION]"].value = myval;
};

function changeSubAction(myvar, myval)
{
	document.groupform["basic["+myvar+"]"].value = myval;
	//document.groupform["basic[SUBACTION]"].value = myval;
	//document.groupform.basic[SUBACTION] = myval;
	//document.groupform.basic['SUBACTION'].value = myval;
};

function testSubmit(objForm, testStringClassName)
{
	////if(testClassDisable(<*CLASS*>)==true){this.form.submit()};
	if(testStringClassName.indexOf("disable", 0) == -1)
		objForm.submit();

	return;
};
*/
function setWindowFrame()
{
	//maksymalizuje okno:
	//self.moveTo(0,0);
	//self.resizeTo(screen.availWidth,screen.availHeight);
	self.resizeTo(800,600);

	//document.title = (new Date()).getYear();
}

//experymentalne
function testFormObj(obj)
{
	out = "Object is \'" + typeof(obj) + "\' type";

	out += "\n her name is \'" + obj.name + "\'";

	//for (var i = 0; i < arguments.length; i++)
		//obj = arguments[i];
		for (prop in obj)
		{
			out += "\n"
			out += " " + prop
			//out += " - " + typeof(obj[prop])
			//out += " - " + obj[prop]
		}
	//}




	////if(testClassDisable(<*CLASS*>)==true){this.form.submit()};
	//if(testStringClassName.indexOf("disable", 0) == -1)
	//	objForm.submit();

	return out;
};
