function createInfoBar(text)
{
	var infoBar = document.createElement('div');
	infoBar.innerHTML = text;
	infoBar.style.border='1px solid #000';
	infoBar.style.backgroundColor='#f2ec88';
}
		
function triggerImage(imgid)
{
	imgobj = document.getElementById(imgid);
	if(imgobj.style.display == 'block')
		imgobj.style.display = 'none';
	else
		imgobj.style.display = 'block';
}	
		
// News script
var scrollHover = 0;
var cInfo = 
{
	'content': null,
	'pos': 160, // default
	'height': 0,
	'step': 1,
	'rate': 50,
	'spacing': 10
};
		
function scrollNews() 
{
	var pos = cInfo.pos;
	pos -= cInfo.step
	if (pos <= -cInfo.height) pos = 0;
	if (!scrollHover) cInfo.pos = pos;
	cInfo.content.style.top = pos + 'px';
	setTimeout(scrollNews, cInfo.rate);
}
			
function initNews(pos)
{
	cInfo.pos = pos;
	var content = document.getElementById("mCont");
	document.getElementById('ss').style.marginBottom = cInfo.spacing + 'px';
	cInfo.spacing = parseInt(document.getElementById('ss').style.marginBottom);
	while(cInfo.spacing + document.getElementById('ss').offsetHeight < document.getElementById('mBox').offsetHeight)
		cInfo.spacing += 10;
	document.getElementById('ss').style.marginBottom = cInfo.spacing;
	var height = document.getElementById('ss').offsetHeight + cInfo.spacing;
	var smth = document.getElementById("ss");
	var clone = smth.cloneNode(true);
	clone.style.top = height + 'px';
	content.appendChild(clone);
	cInfo.content = content;
	cInfo.height = height;
	if(document.layers) content.captureEvents(Event.MOUSEDOWN); // if using ns4
	scrollNews();     
}



var scrollHover2 = 0;
var cInfo2 = 
{
	'content2': null,
	'pos2': 160, // default
	'height2': 0,
	'step2': 1,
	'rate2': 50,
	'spacing2': 10
};
		
function scrollNews2() 
{
	var pos2 = cInfo2.pos2;
	pos2 -= cInfo2.step2
	if (pos2 <= -cInfo2.height2) pos2 = 0;
	if (!scrollHover2) cInfo2.pos2 = pos2;
	cInfo2.content2.style.top = pos2 + 'px';
	setTimeout(scrollNews2, cInfo2.rate2);
}
			
function initNewsGallery(pos2)
{
	cInfo2.pos2 = pos2;
	var content2 = document.getElementById("mContGallery");
	document.getElementById('ssGallery').style.marginBottom = cInfo2.spacing2 + 'px';
	cInfo2.spacing2 = parseInt(document.getElementById('ssGallery').style.marginBottom);
	while(cInfo2.spacing2 + document.getElementById('ssGallery').offsetHeight < document.getElementById('mBoxGallery').offsetHeight)
		cInfo2.spacing2 += 10;
	document.getElementById('ssGallery').style.marginBottom = cInfo2.spacing2;
	var height2 = document.getElementById('ssGallery').offsetHeight + cInfo2.spacing2;
	var smth2 = document.getElementById("ssGallery");
	var clone2 = smth2.cloneNode(true);
	clone2.style.top = height2 + 'px';
	content2.appendChild(clone2);
	cInfo2.content2 = content2;
	cInfo2.height2 = height2;
	if(document.layers) content2.captureEvents(Event.MOUSEDOWN); // if using ns4
	scrollNews2();     
}
// End of news script