function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}


var cur_div = null;
function SwitchMenuDiv(id){
  var o = document.getElementById(id);
  if(o!=null){
    /*if(cur_div!=null && cur_div.id!=id){
      cur_div.style.display = 'none';
      cur_div = null;
    }*/
    o.style.display = o.style.display!='block' ? 'block' : 'none';
    if(o.style.display=='block')
      cur_div = o;
  }
}

function emailCheck (emailStr) {
var emailPat=/^(.+)@(.+)$/
var specialChars="\\(\\)<>@,;:\\\\\\\"\\.\\[\\]"
var validChars="\[^\\s" + specialChars + "\]"
var quotedUser="(\"[^\"]*\")"
var ipDomainPat=/^\[(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\]$/
var atom=validChars + '+'
var word="(" + atom + "|" + quotedUser + ")"
var userPat=new RegExp("^" + word + "(\\." + word + ")*$")
var domainPat=new RegExp("^" + atom + "(\\." + atom +")*$")
var matchArray=emailStr.match(emailPat)
if (matchArray==null) {
	alert("Введен некоректный Email")
	return false
}
return true;
}

function confirmLink(op) {
 var is_confirmed = false;
 if (op == 'del') {
  is_confirmed = confirm('Вы уверены, что хотите удалить запись?');
 }
 return is_confirmed;
}//end_of_function

function AddCountry(ID) { 
 lnk=window.open("tours_contry.php?id="+ID, "AddCartWindow", "toolbar=no, location=no, directoties=no, status=no, menubar=no, scrollbars=yes, resizable=no, titlebar=no, height=500, width=650, left=100, top=100");
}//end_of_function




