//====================================================================================================
//	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 ValidateContactUs(frm)
{
	with(frm)
    {
    	if(!IsEmpty(contact_name, 'Please, enter your name.'))
        {
			return false;
        }
    	if(!IsEmpty(contact_subject, 'Please, enter subject.'))
        {
			return false;
        }
		if(!IsEmpty(contact_email, 'Please, enter email address.'))
        {
			return false;
        }
		if(!IsEmail(contact_email, 'Please, enter valid email address.'))
		{
			return false;
		}
    	if(!IsEmpty(contact_message, 'Please, enter your message.'))
        {
			return false;
        }
    	if(!IsEmpty(contact_country, 'Please, enter your country.'))
        {
			return false;
        }

    	if(!IsEmpty(contact_phone, 'Please, enter your phone.'))
        {
			return false;
        }

        return true;
    }
}