//====================================================================================================
//	Function Name	:	Gallery_Move()
//----------------------------------------------------------------------------------------------------
var curIndex = 0;

function Gallery_Move(dir)
{
	if(!ffox)
		document.getElementById('tmplArea').filters[0].apply();

	if(dir == 'next')
	{
		curIndex++;
		if(arrTmpl.length==curIndex)curIndex=0;
	}
	else
	{
		curIndex--;
		if(curIndex<0)curIndex=arrTmpl.length-1;
	}

	document.getElementById('txtTmpl').innerHTML 	= arrTmpl[curIndex][0];
	document.getElementById('imgTmpl').src 			= arrTmpl[curIndex][1];

	if(!ffox)
		document.getElementById('tmplArea').filters[0].play();
}

function FullView(img)
{
	popupWindowURL(document.location + '&Action=View&img='+img, 'list', 600, 500, false, false, true);
}

function Login_Click(frm)
{
	with(frm)
    {
    	if(!IsEmpty(username, 'Please, enter Username.'))
        {
			return false;
        }
    	if(!IsEmpty(password, 'Please, enter Password.'))
        {
			return false;
        }
        return true;
    }
}

function Validate_ContactUs(frm)
{
	with(frm)
	{
		if(!IsEmpty(first_name, 'Please, enter First Name.'))
		{			
			return false;
		}

		if(!IsEmpty(last_name, 'Please, enter Last Name.'))
		{			
			return false;
		}

		if(!IsEmail(email, 'Please, enter valid email address.'))
		{			
			return false;
		}

		if(!IsEmpty(comment, 'Please, enter Comment / Question.'))
		{
			return false;
		}

		return true;
	}
}