function display(stuff) { window.status = stuff}

function hide_subMenu(){
    	if(document.layers){
    		document.getElementById('SubMenu').style.visibility='hide'
        }else document.getElementById('SubMenu').style.visibility='hidden';
      }
function PageBack(){
		history.back();
		return true
}


function ZoomFoto(photo){
	objWindow = window.open("","","height=600, width=770"); 
	objWindow.document.write('<IMG SRC="../../images/' + photo + '">') ;
	objWindow.document.close();
	return true
}


function checkOpros(oForm) {
	if (oForm.fam.value == ''){
		alert('Вы не ввели вашу фамилию!');	
		oForm.fam.focus();
		return false;
	}
  if (oForm.doljnost.value == ''){
		alert('Вы не назвали свою должность!');	
		oForm.doljnost.focus();
		return false;
	}
  if (oForm.company.value == ''){
		alert('Вы не назвали свою компанию!');	
		oForm.company.focus();
		return false;
	}
  if (oForm.profil.value == ''){
		alert('Вы не назвали профиль деятельности своей компании!');	
		oForm.profil.focus();
		return false;
	}

  if (oForm.tel.value == ''){
		alert('Введите ваш телефонный номер!');	
		oForm.tel.focus();
		return false;
	}

  if (oForm.email.value == ''){
		alert('Введите ваш e-mail!');	
		oForm.email.focus();
		return false;
	}

	if (oForm.email.value!='') {
		var cValue = new String;
		cValue=oForm.email.value;
		if(!cValue.match(/^[A-Za-z0-9\.\_]{1,32}\@[A-Za-z0-9\.\_]{1,32}\.[a-zA-Z]{2,6}$/)) {
			alert('Некорректно введен e-mail');
			oForm.email.focus(); 
			oForm.email.select();
			return false;
		}
	}
} 
	
function htmlSpecialChars(s) {
	if (typeof(s)=='string') {
    var out_s = new Array('&amp;','&quot;','&lt;','&gt;','<BR>','<BR>','<BR>');
    var in_s  = new Array('&','"','<','>','\r\n','\n','\n\r');
    for (var i=0; i< in_s.length;i++) {
      var pos = s.indexOf(in_s[i]);
  	  while ( pos >=0 ) {
        s = s.substring(0,pos)+out_s[i]+s.substr(pos+in_s[i].length+1);
        pos = s.indexOf(in_s[i]);
			}
  	}
  }
	return s;
}



/// You may define additional text arrays if you have multiple drop downs:

