//небольшая защита от робота по сбору email адресов
function mailLink(mailprefix, maildomain, mailsuffix, mailname)
{
	var mailprefix; // первая часть адреса до @
	var maildomain; // домен
	var mailsuffix; // зона домена (.RU, .COM и т. п.)
	var mailname; // текст ссылки (имя получате-ля)

	if (mailname == null) {
		mailname = "e-mail";
	}
	document.write('<a href="mailto:' + mailprefix + '%40' + maildomain + '.' + mailsuffix + '">' + mailprefix + '@' + maildomain + '.' + mailsuffix + '</a>');
}


function confirm1(url_)
{
	if (confirm("Вы уверены ?")) location.href=url_;
}


function round_s(int_,count_)
{
	get=new String(int_);

	if (isNaN(int_)) return 0;
	//if (isNaN(parseInt(int_))) return 0;
	//if (isNaN(parseFloat(int_))) return 0;

	x = get.indexOf('.');
	if(x!=-1)
	{
		pre=new String(get.substr(0, x));
		aft=new String(get.substr(x+1, count_));

		if (!(aft*1)) return pre;

		return pre+"."+aft;
	}
	else return int_;
}



function open_new_window(url,winName,x,y)
{
	var xscr=Math.round ((screen.availWidth / 2) - (x / 2));
	var yscr=Math.round ((screen.availHeight / 2) - (x / 2));
	df= window.open('',winName,'scrollbars=no,width='+x+',height='+y+',top='+yscr+',left='+xscr);
	df.document.write("<body topmargin=0 leftmargin=0>");
	df.document.write("<a onclick='self.close();' title='Close'><img src="+url+" width="+x+" height="+y+"></a>");
}



function MM_jumpMenu(targ,selObj,restore){
	eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
	if (restore) selObj.selectedIndex=0;
}


/* Загружаем n картинок в кэш браузера */

function preloadImages()
{
	var imgList = preloadImages.arguments;
	var img = new Array();
	for(var i = 0; i < imgList.length; i++)
	{
		img[i] = new Image();
		img[i].src = imgList[i];
	}
}

function resize_window_full_screen()
{
	top.window.moveTo(0,0);
	if (document.all) {
		top.window.resizeTo(screen.availWidth,screen.availHeight);
	}
	else if (document.layers||document.getElementById)
	{
		if (top.window.outerHeight<screen.availHeight||top.window.outerWidth<screen.availWidth)
		{
			top.window.outerHeight = screen.availHeight;
			top.window.outerWidth = screen.availWidth;
		}
	}
}


//-->
