function winClose(wpop) {
   document.getElementById(wpop).style.display="none";
}
function winMessage($str) {
	offsetHeight = document.body.scrollTop;
	win = window.document.getElementById("winPopup");			
	win.style.top = offsetHeight+100;
	win.style.left = 300;
	window.document.getElementById("winPopupMessage").innerHTML = $str;				
	win.style.display="block";		
}
var flagSplash = false;
var flagSplashLoad = false;
var oSplash;
var checkIt;
var checkIt_show;
var win_splash;
window.onclick = hide_cat_splash();
function show_cat_splash()
{

	if (flagSplash == false)
	{
		if (!checkIt_show){
			checkIt_show = setTimeout('show_cat_splash()',3000);
			return true;
		}
		oiframe = window.ifsdata;
		href = "?load_block=catalog_show_splash";
		oiframe.location.href=href;
	}
	else{
		//oSplash.style.display="block";
		//checkSplash();
		win_splash.show();
	}
}
function hide_cat_splash()
{
	//oSplash = window.document.getElementById("showcatsplash");
	//oSplash.style.display = 'none';
	if (checkIt_show) {
		clearTimeout(checkIt_show);
	}
	if (flagSplash == true)
	{
		win_splash.hide();
	}

}
function onload_cat_splash()
{
	oiframe = window.ifsdata;
	offsetHeight = document.body.scrollTop;
	oSplash = window.document.getElementById("showcatsplash");
	oSplash.style.top = offsetHeight+50;
	oSplash.style.left = 270;

	win_splash = new Window('catalog_splash', {title:"Migom.by",top:50, left:270, zIndex:150, width:400, height:250, resizable: true})
	win_splash.getContent().innerHTML = oiframe.document.body.innerHTML;
	win_splash.show();
	flagSplash = true;
	checkSplash();
	   /*   oSplash.innerHTML = oiframe.document.body.innerHTML;
	oSplash.style.display="block";
	flagSplash = true;
	checkSplash();*/
}
function checkSplash()
{
	if (checkIt) clearTimeout(checkIt);
	checkIt = setTimeout('hide_cat_splash()',3000);
}

