function OpenImagePopup(url,width,height) {
	var rnd = (Math.round((Math.random()*999)+1));
	var top=Math.round((screen.height-height)/2);
	var left=Math.round((screen.width-width)/2);
	this.open(url, "w"+rnd, "top="+top+",left="+left+",width="+width+",height="+height+",buttons=no,scrollbars=no,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
}

function Popupas(url,width,height) { OpenImagePopup(url,width,height); }

function OpenImagePopupSc(url,width,height) {

	var rnd = (Math.round((Math.random()*999)+1));
	var top=Math.round((screen.height-height)/2);
	var left=Math.round((screen.width-width)/2);
	this.open(url, "w"+rnd, "top="+top+",left="+left+",width="+width+",height="+height+",buttons=no,scrollbars=yes,location=no,menubar=no,resizable=no,status=no,directories=no,toolbar=no");
}

function Popup(url,width,height) { OpenImagePopupSc(url,width,height); }

function setSize(width,height) {
	if (window.outerWidth) {
		window.outerWidth = width;
		window.outerHeight = height;
	}
	else if (window.resizeTo) {
		window.resizeTo(width,height);
	}
	else {
		alert("Tavo naršyklė nesupranta.");
	}
}	

function RodytiNerodyti(Aisjungti, Aijungti, Aid, DivID) {
	if (document.getElementById(DivID).style.display == 'none') {
		document.getElementById(Aid).innerHTML = Aisjungti;
		document.getElementById(DivID).style.display = 'block'
	} else {
		document.getElementById(Aid).innerHTML = Aijungti;
		document.getElementById(DivID).style.display = 'none'		
	}
}

