/******* GLOBALS [BEGIN] *******/
var is_opera = /opera\/9/i.test(navigator.userAgent);
var is_gecko = /gecko/i.test(navigator.userAgent);
var is_ie    = /MSIE/.test(navigator.userAgent);
/******* GLOBALS [END] *******/
function miceOver(theName)
	{theName.id='menu_hover';}
function miceOut(theName)
	{theName.id='menu_normal';}
	
function miceOver_2(theName)
	{theName.id='edit_menu_hover';}
function miceOut_2(theName)
	{theName.id='edit_menu_normal';}
	
function TestForm() {
	err='';
	h=document.form1;
	if(h.contact_person.value=='') err+='contact e-mail,';
	if(h.contacts.value=='') err+=' contacts';
	if(h.message.value=='') err+=' and write a message.';
	if(err.length>0) { alert("Enter your:" + err); }
	else { h.submit(); return true; }
}

function testForm2() {
h = document.form1; err='';
if (h.name.value=='') {
	err = 'Please, fill in Your Name'+"\n";
	h.name.focus();
	
}
if (h.country.value='') {
	err += 'Please, choose the country'+"\n";
	h.country.focus();
	
}

var filter=/^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i
if (!filter.test(h.email.value)) {
	err += 'Please, write down Your E-mail address'+"\n";
	h.email.focus();
	
}

if (h.day.options.selectedIndex==0 || h.month.options.selectedIndex==0 || h.year.options.selectedIndex==0) {
	err += 'Please, correct Your birth date'+"\n";
	h.day.focus();
	
}

  if( err=='') { return  true } else{ alert (err); return false; }
}

////////////////////////////

function del_img (r) {
	var img = r.split ('=');
	if(confirm("Delete image " + img[1] + " ?")) {
		
		document.location=r;
		
	}
}
function open_url (theURL,winName,features) {
  window.open(theURL,winName,features);
}

 function formTest() {
	 h = document.search_form
	 if(h.country.value == '') {
	 	alert('Please, choose the country')
		h.country.focus()
		return false
	 }
 }
