function newWin(s,w,h) {
	window.open(s,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no,width='+w+'px,height='+h+'px');
}
function OpenArticle(id) {
	window.open('article_det.php?id='+id,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no,width=600px,height=500px');
}
function OpenNews(id) {
	window.open('news_det.php?id='+id,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no,width=600px,height=300px');
}
function FeedBack(){
	window.open('feedback.php','','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,fullscreen=no,channelmode=no,width=600px,height=500px');
}
function Checkemail() {
        var t = document.getElementById("ir").value;
	if (t.indexOf("@")==-1||t.indexOf(".")==-1) {
	        alert("Неправильно указан e-mail!");
		return false;
	} else	return true;
}

function cmapa(p){
 var a = p.innerHTML;
 if (a.indexOf("map1")!=-1) p.innerHTML="<img src=\"images/map2.gif\" width=\"400\" height=\"390\" border=\"0\">";
 else if (a.indexOf("map2")!=-1) p.innerHTML="<img src=\"images/map3.gif\" width=\"400\" height=\"390\" border=\"0\">";
 else if (a.indexOf("map3")!=-1) p.innerHTML="<img src=\"images/map4.gif\" width=\"400\" height=\"390\" border=\"0\">";
}

function rcl(a){
  if (a.id!="r2") {
    document.all.sp.innerHTML="";
  } else {
    document.all.sp.innerHTML="<input id=\"fimg\" type=\"file\" name=\"img\">";
  }
}
