function $(n){return document.getElementById(n)}
function changePic(tmb,w,h) {
  var pic=$("fsClipper");
  $("loading").style.display="block";
  pic.className="loading_bg";
  pic.onload=function(){
    $("loading").style.display="none";
    pic.className="";
    pic.alt=tmb.alt;
	pic.width=w;
	pic.height=h;
	$("photoName").innerHTML=tmb.alt;
  }
  pic.src=tmb.src.replace("small","big");
}
function changeMenu(cur, mode, isLast) {
  cur.className=(mode=='over'?'hover':'') + (isLast?' m_last':'');
  try {
  	$('m_here').style.background='url(i/li.png) no-repeat 100% '+(mode=='over'?'0':'-169px');
  } catch (e) {}
}

function AJAXReq (url,callBack){
  var x
  try {x=new ActiveXObject("Msxml2.XMLHTTP")}
  catch (e) {
    try {x=new ActiveXObject("Microsoft.XMLHTTP")}
    catch (e) {x=null}
  }
  if (!x && typeof XMLHttpRequest!="undefined") x=new XMLHttpRequest()
  if (!x) return
  x.open("GET", url, true)
  x.onreadystatechange=function(){if((x.readyState==4)&&callBack)callBack(x.responseText)}
  x.send(null)
}

function subscr_focus (el){
  el.value='';
  el.onfocus=null;
}

function subscr_submit () {
  return $('subscr_email').value.match(/\s*[a-z0-9_\.\-]+@[a-z0-9\.\-]+\.[a-z]{2,6}\s*/i) ? true : false;
}
