function getLink(slink,neww) {
	newlink = unescape(slink).replace(/\|/g,"");
	if(neww == 1) {
		window.open();
	}
	window.location = newlink;
}

function setHomePage(domain) {
	// If it's Internet Explorer, use automatic link
	// Be sure to change the "http://www.YourWebSiteHere.com\"
	// to the URL you want them to bookmark.
	if (document.all){
	  document.write('<a href="#" onClick="this.style.behavior=\'url(#default#homepage)\';this.setHomePage(\''+ domain +'\');">');
	  document.write('Сделать стартовой</a>');
	}
}

function setScroll(obj) {
	setInterval(function() { scrollBlock(obj); }, 5000);
}

function scrollBlock(obj) {
	obj.scrollTop = obj.scrollTop+50;
	if(obj.offsetHeight >= obj.scrollTop-10)
		obj.scrollTop = 0;
}

function rollBlock(ids) {
	var block = document.getElementById(ids);

	if(block.style.display == 'none')
		block.style.display = 'block';
	else
		block.style.display = 'none';
}

function placeBlocks(parent) {
	alert(parent.divs);
}
