function as()
{
	document.writeln("<table border=0 cellpadding=4 cellspacing=0><tr><td class=small_lg>Дизайн: <a href='http://www.eggy.ru' target='_blank'>Вадим Егги</a><br>Программирование: <a href='mailto:as@communicate.ru'>Алексей Степанов</a></td></tr></table>");
}
function mailto(n)
{
	n += '@';
	n += 'realag';
	n += '.';
	n += 'spb';
	n += '.';
	n += 'ru'
	document.write("<a href='mailto:",n,"'>",n,"</a>");
}
function openPage(lnk)
{
	location.href=lnk;
}
function zoom(img)
{
	w = 100;
	h = 100;
	var l = Math.round((screen.availWidth-w)/2);
	var t = Math.round((screen.availHeight-h)/2);
	var href = "zoom.php?img="+img;
	viewWin = open(href, "zoom", "left="+l+", top="+t+", width="+w+", height="+h+", dependent=yes, status=no, toolbar=no, menubar=no, scrollbars=no, resizable=no, statusbar=no");
//	viewWin = open(href,"zoom","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, fullscreen=yes");
}
function zoom2(img)
{
	w = 100;
	h = 100;
	var l = Math.round((screen.availWidth-w)/2);
	var t = Math.round((screen.availHeight-h)/2);
//	img = img.replace('_s.jpg','.jpg');
//	img = img.replace('_s.gif','.gif');
	var href = "zoom.php?img="+img;
	viewWin = open(href, "zoom", "left="+l+", top="+t+", width="+w+", height="+h+", dependent=yes, status=no, toolbar=no, menubar=no, scrollbars=no, resizable=no, statusbar=no");
//	viewWin = open(href,"zoom","toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, fullscreen=yes");
}
function info(id)
{
	w = 800;
	h = 600;
	var l = Math.round((screen.availWidth-w)/2);
	var t = Math.round((screen.availHeight-h)/2);
	var href = "info.php?id="+id;
	viewWin = open(href, "info"+id, "left="+l+", top="+t+", width="+w+", height="+h+", dependent=yes, status=no, toolbar=no, menubar=no, scrollbars=auto, resizable=no, statusbar=no");
}
function number_format(n)
{
	n = n.toString();
	var tmp_n = new Array();
	var i = n.length;
	for(k = 0; i > 0; i -= 3)
	{
		var pos = i > 0 ? i - 3 : i;
		tmp_n[k++] = n.substring(i, pos);
	}
	n = tmp_n.reverse().join(' ');
	return(n);
}
function numeralsOnly(evt) {
    evt = (evt) ? evt : event;
    var charCode = (evt.charCode) ? evt.charCode : ((evt.keyCode) ? evt.keyCode : 
        ((evt.which) ? evt.which : 0));
    if (charCode > 31 && (charCode < 48 || charCode > 57)) {
//        alert("В это поле можно вводить только цифры.");
        return false;
    }
    return true;
} 
function testEmail(src)
{
	reg1=new RegExp("(@.*@)|(\\.\\.)|(@\\.)|(^\\.)");
	reg2=new RegExp("^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,4}|[0-9]{1,4})(\\]?)$");
	b=(!reg1.test(src) && reg2.test(src));
	return b;
}
