//====================================================================================================
//	File Name		:	login.js
//----------------------------------------------------------------------------------------------------
//	Purpose			:	Client side validation in JavaScript.
//	Author			:	Dinesh Sailor
//	Creation Date	:	05-May-2003
//	Copyright		:	Copyrights © 2003 Dot Infosys
//	Email			:	dinesh@dotinfosys.com
//	History			:
//						Date				Author					Remark
//						05-May-2003			Dinesh Sailor			Initial Release
//
//====================================================================================================

//====================================================================================================
//	Function Name	:	Form_Submit()
//	Purpose			:	This function will executed when user submits a form. It checks validity of 
//						every field in the form.
//	Parameters		:	frm  - form name
//	Return			:	true or false
//	Author			:	Dinesh Sailor
//	Creation Date	:	05-May-2003
//----------------------------------------------------------------------------------------------------
function FsboLogin_Click(frm)
{
	with(frm)
    {
    	if(!IsEmpty(username, 'Please, enter Username.'))
        {
			return false;
        }
    	if(!IsEmpty(password, 'Please, enter Password.'))
        {
			return false;
        }
        return true;
    }
}

//====================================================================================================
//	Function Name	:	Picture_Gallery_Click()
//----------------------------------------------------------------------------------------------------
function Picture_Gallery_Click(PId,HomeId,PicId,totalPic)
{	
	popupWindowURL('index.php?pid='+PId+'&hid='+HomeId+'&pic_id='+PicId+'&total_pic='+totalPic, 'list', 710, 450, false, false, true);
}

//====================================================================================================
//	Function Name	:	Next_Click()
//----------------------------------------------------------------------------------------------------
function Next_Click(PId,HomeId,PicId,totalPic)
{	
	popupWindowURL('index.php?pid='+PId+'&Action2=Next&hid='+HomeId+'&pic_id='+PicId+'&total_pic='+totalPic, 'list', 710, 450, false, false, true);
}

//====================================================================================================
//	Function Name	:	Prev_Click()
//----------------------------------------------------------------------------------------------------
function Prev_Click(PId,HomeId,PicId,totalPic)
{
	popupWindowURL('index.php?pid='+PId+'&Action2=Previous&hid='+HomeId+'&pic_id='+PicId+'&total_pic='+totalPic, 'list', 710, 450, false, false, true);
}

function ValidateContactUs(frm)
{
	with(frm)
    {
    	if(!IsEmpty(name, 'Please, enter your name.'))
        {
			return false;
        }
    	if(!IsEmpty(email, 'Please, enter email address.'))
        {
			return false;
        }
		if(!IsEmail(email, 'Please, enter valid email address.'))
		{
			return false;
		}
        return true;
    }
}
