function setIeTitle() {
	if( typeof(documentTitle) != 'undefined') {
		document.title = documentTitle;
		window.title = documentTitle;
	}
}

window.onload = function(){
	if(location.hash && $.browser.msie) {
			setIeTitle();
		}
	};

function Translations() {
	this.messages = new Array();
}
Translations.prototype.get = function(key) {
	if( this.messages[key]) {
		return this.messages[key]
	} else {
		return key;
	}
}
Translations.prototype.push = function(key, val) {
	this.messages[key] = val;
}

function show_comments(div_id)
{
    var div = document.getElementById(div_id);
    
    if(div.style.display == 'none')
    {
        div.style.display = '';
    }
    else
    {
        div.style.display = 'none';
    }
}

function StopSpam(name,domain)
{
    document.write('<a class=Kontaktu_duomenys href=\"mailto:'+name+'@'+domain+'\">');document.write(name+'@'+domain+'</a>');
}

function changeImage(imgTagId, imageUrl) {
	
	var imgTagElement = document.getElementById(imgTagId);
	imgTagElement.src = imageUrl;
	
}
function createCookie(name,value,days) {
	if (days) {
		var date = new Date();
		date.setTime(date.getTime()+(days*24*60*60*1000));
		var expires = "; expires="+date.toGMTString();
	}
	else var expires = "";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for(var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') c = c.substring(1,c.length);
		if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
	}
	return null;
}

function eraseCookie(name) {
	createCookie(name,"",-1);
}