function go(msg,hvalue){
  if(msg=="") return false;
  else {
    document.mainform.msg.value=msg;
    document.mainform.hvalue.value=hvalue;
    document.mainform.submit();
  }
}
//...............................................................................................
function ch(){
  document.mainform.change.value="true";
}
//...............................................................................................
function subscribeform(form) {
	if (!form.email.value)
	  {alert("Yeah... I need your e-mail address... if you want receive any news form me.\n your Katcha");form.email.focus();return false;}
	else {
    if (form.email.value.match("^[_a-zA-Z0-9\.\-]+@[_a-zA-Z0-9\.\-]+\.[a-zA-Z]{2,4}$")){}
    else {alert("Uppps... I mean this is incorrect format of e-mail address...\nexample.\tinfo@domain.com.\n your Katcha");form.email.focus();return false;}
  }

return true;
}

//...............................................................................................
function setPointer(theRow, thePointerColor)
{
    if (thePointerColor==''||typeof(theRow.style)=='undefined') {return false;}
    if (typeof(document.getElementsByTagName) != 'undefined') { var theCells = theRow.getElementsByTagName('td');
    } else if (typeof(theRow.cells) != 'undefined') { var theCells = theRow.cells;
		} else { return false;    }
    var rowCellsCnt  = theCells.length;
    for (var c = 0; c < rowCellsCnt; c++) {theCells[c].style.backgroundColor = thePointerColor;}
    return true;
}
//...............................................................................................
function getFotoWin(url,xx,yy)
{
		var win = window.open(url,'','toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=1,dependent=no,width='+(xx+20)+',height='+(yy+20)+'');
		//return win;
}

//...............................................................................................
var global_win=0;
var global_field_name=0;

function myCustomFileBrowser(field_name, url, type, win) {
	// Do custom browser logic
	//win.document.forms[0].elements[field_name].value = 'my browser value';
	global_win=win;
	global_field_name=field_name;
//	alert(field_name+"\n"+url+"\n"+type+"\n"+win);
	getFotoWin("../../../../foto.php"+urlget+"opener="+win,"400","200");
}
//...............................................................................................
function getImgUrl(url) {
	var win = opener.global_win;
	win.document.forms[0].elements[opener.global_field_name].value = url;
	window.close();
}
