/*
 *	search buttons rollover
 */
if (document.images) {
	buttonsearchon      = new Image();
	buttonsearchon.src  = "http://love.gala.net/img/but_search_on.gif" ;
	buttonsearchoff     = new Image() ;
	buttonsearchoff.src = "http://love.gala.net/img/but_search_off.gif" ;

	buttonclearon      = new Image();
	buttonclearon.src  = "http://love.gala.net/img/but_clear_on.gif" ;
	buttonclearoff     = new Image() ;
	buttonclearoff.src = "http://love.gala.net/img/but_clear_off.gif" ;

	buttonfullon      = new Image();
	buttonfullon.src  = "http://love.gala.net/img/but_fullsearch_on.gif" ;
	buttonfulloff     = new Image() ;
	buttonfulloff.src = "http://love.gala.net/img/but_fullsearch_off.gif" ;

	buttonaddon      = new Image();
	buttonaddon.src  = "http://love.gala.net/img/but_add_anket_on.gif" ;
	buttonaddoff     = new Image() ;
	buttonaddoff.src = "http://love.gala.net/img/but_add_anket_off.gif" ;

	buttonsendon      = new Image();
	buttonsendon.src  = "http://love.gala.net/img/but_send_on.gif" ;
	buttonsendoff     = new Image() ;
	buttonsendoff.src = "http://love.gala.net/img/but_send_off.gif" ;

	buttontellon      = new Image();
	buttontellon.src  = "http://love.gala.net/img/but_tell_on.gif" ;
	buttontelloff     = new Image() ;
	buttontelloff.src = "http://love.gala.net/img/but_tell_off.gif" ;

	buttonediton      = new Image();
	buttonediton.src  = "http://love.gala.net/img/but_edit_on.gif" ;
	buttoneditoff     = new Image() ;
	buttoneditoff.src = "http://love.gala.net/img/but_edit_off.gif" ;

	buttonaddanketon      = new Image();
	buttonaddanketon.src  = "http://love.gala.net/img/but_add_anket1_on.gif" ;
	buttonaddanketoff     = new Image() ;
	buttonaddanketoff.src = "http://love.gala.net/img/but_add_anket1_off.gif" ;

	buttoncommenton      = new Image();
	buttoncommenton.src  = "http://love.gala.net/img/but_add_on.gif" ;
	buttoncommentoff     = new Image() ;
	buttoncommentoff.src = "http://love.gala.net/img/but_add_off.gif" ;

	buttonfriendon      = new Image();
	buttonfriendon.src  = "http://love.gala.net/img/but_send1_on.gif" ;
	buttonfriendoff     = new Image() ;
	buttonfriendoff.src = "http://love.gala.net/img/but_send1_off.gif" ;

}

function buttonoff( buttonname )
{
    if (document.images) {
		document[ buttonname ].src = eval( buttonname + "off.src" );
    }
}

function buttonon ( buttonname )
{
    if (document.images) {
		document[ buttonname ].src = eval( buttonname + "on.src" );
    }
}

function showWarning()
{
	alert("В связи с участившимися случаями мошенничества с помощью анкет знакомств, администрация сайта GALA Знакомства предостерегает пользователей указанного сайта от пересылки кодов пополнения счета для мобильного телефона и любых других платежей мошенникам, которые таким образом наживаются на доверчивых людях. В случае обнаружения мошенничества просьба отправлять ссылку на анкету мошенника по адресу webmaster@gala.net");
}

function MEdit()
{
	if ( (document.FFMenu.nick.value == "") || (document.FFMenu.passwd.value == "") ) {
		alert("Пожалуйста, введите логин и пароль.\n\nPlease, type in you login or password..");
     	return;
   	}
   	document.FFMenu.acs.value='edit';
	document.FFMenu.submit();
}

function MView()
{
	if ( (document.FFMenu.nick.value == "") || (document.FFMenu.passwd.value == "") ) {
		alert("Пожалуйста, введите логин и пароль.\n\nPlease, type in you login or password..");
     	return;
   	}
   	document.FFMenu.acs.value='view';
   	document.FFMenu.submit();
}

function ResetFindForm()
{
	for(ii = 0; ii < document.FFind.length; ii++) {
	    if ( document.FFind.elements[ii].type == 'text') {
    		document.FFind.elements[ii].value = '';
    	}
    	if ( document.FFind.elements[ii].type == 'checkbox') {
      		document.FFind.elements[ii].checked = false;
      	}
    	if ( document.FFind.elements[ii].type == 'select-one') {
      		document.FFind.elements[ii].selectedIndex = -1;
      	}
  	}
  	document.FFind.FAy.selectedIndex = 0;
  	document.FFind.FWhoNeed.selectedIndex = 1;
  	document.FFind.RTime.selectedIndex = 0;
  	document.FFind.FSort.selectedIndex = 0;
}

function SubmitFindForm()
{
	document.FFind.srch.value = '1';
	document.FFind.pgno.value = 0;
	document.FFind.submit();
}

function SendMail()
{
	if (document.forms['FFMail'].lemail.value == "")
    	return;
  	document.forms['FFMail'].submit();
}

function SendMess()
{
	if (document.forms['FFMess'].mmess.value == "")
    	return;
  	document.forms['FFMess'].submit();
}

function EditCom()
{
  document.FFCom.submit();
}

function photo_view(im) {
	window.open('/photo.php?im=' + im, 'PreviewPhoto', 'status=no,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes');
}

function video_view(id) {
	window.open('/video.php?id=' + id, 'PreviewPhoto', 'status=no,toolbar=no,menubar=no,scrollbars=yes,location=no,resizable=yes');
}

		var IE=null, NS4=null, NS6=null, KO=null, OP=null;
		var navN=navigator.appName;
		if(navN.indexOf('Netscape')>=0) {
			if(navigator.appVersion.substring(0,1)>=5 )
				NS6=1;
			else
				NS4=1;
		} else if (navN.indexOf('Konqueror')>=0)
			KO=1;
  		else if(navN.indexOf('Opera')>=0)
  			OP=1;
		else
			IE=1;

		var ee	= 1;
		var Ys	= new Array(0,220,240,220,240);
		var Xs	= new Array(0,12,12,165,165);
		var addon	= 0;

		function pHint(n,flag,e)
		{
			if (flag == 1) {
				pHint(1,0,null);
				pHint(2,0,null);
				pHint(3,0,null);
				pHint(4,0,null);
  			}

			ee = 0;
			idhint = 'hint'+n;
  			if (flag==0)
  				s="hidden";
			else
				s="visible";

			if (IE||KO) {
				if(!document.all(idhint))
					return false;
    			if(KO)
    				addon = 10;
    			document.all(idhint).style.left=Xs[n];
    			document.all(idhint).style.top=Ys[n]+addon;
    			document.all(idhint).style.visibility=s;
  			} else if (NS4) {
    			if (!document.layers[idhint])
    				return false;
				document.layers[idhint].left=Xs[n];
    			document.layers[idhint].top=Ys[n]+25;
    			document.layers[idhint].visibility=s;
  			} else if (NS6||OP) {
				if (!document.getElementById(idhint))
					return false;
				if (OP)
					addon = 10;
				else
					addon = -10;
   				document.getElementById(idhint).style.left=Xs[n];
    			document.getElementById(idhint).style.top=Ys[n]+addon;
    			document.getElementById(idhint).style.visibility=s;
  			}
			return false;
		}

		function hintBody()
		{
			if (ee == 1) {
				pHint(1,0,null);
				pHint(2,0,null);
				pHint(3,0,null);
				pHint(4,0,null);
  			}
  			ee = 1;
		}


		function MainCity()
		{
			document.FFCity.submit();
		}


		function ShowDay(){
			document.FFShow.submit();
		}

function ExtFind()
{
  window.location="/?acs=find";
}
