function tr(obj){
s=obj.value;
re=/^\s+/;s=s.replace(re, '');
re=/\s+$/;s=s.replace(re, '');
obj.value=s;return s;
}
function ve(e){
ind=e.indexOf('\@');return (ind>0 && ind<s.length-1?true:false);
}
function validate(f){
p='Ââåäèòå ';
if (tr(f.email)==''||!ve(f.email.value)) {alert(p+'ïðàâèëüíûé email!'); return false;}
return true;
}

function setdiv(div, HTML) {
	if(document.all) {document.all(div).innerHTML = HTML}

	else if(document.layers) {
		with(document.layers[div].document) {
			open ("text/html")
			write (HTML)
			close ()
		}
	}
	else if(document.getElementById) {document.getElementById(div).innerHTML = HTML;}

}

function pop(url)
{
width=430;height=350;
if (parseInt (navigator.appVersion) >= 4 )
{
X=(screen.width  - width )/2;
Y=(screen.height - height)/2;
}
var extra='width='+width+',height='+height+',top='+Y+',left='+X+',resizable=1,scrollbars=1,location=no,directories=no,status=yes,menubar=no,toolbar=no';
window.open(url,'freecall',extra);
}