//====================================================================================================
//	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(contact_name, 'Please, enter your name.'))
        {
			return false;
        }
		if(!IsEmpty(contact_question, 'Please, enter your question/request.'))
        {
			return false;
        }
    	if(!IsEmpty(contact_email, 'Please, enter email address.'))
        {
			return false;
        }
		if(!IsEmail(contact_email, 'Please, enter valid email address.'))
		{
			return false;
		}
        return true;
    }
}
/*function ShowHide_Click(fld)
{
	//suboption = document.getElementsByName("suboption[]");
//
//	//hide rest of options other than clicked
//	for(i=0;i<suboption.length;i++)
//	{
//		sub_id = suboption[i].value;
//		if(sub_id != fld.id)
//		{
//			blocks						= document.getElementById(sub_id);
//			blocks.style.visibility 	= 'hidden';
//			blocks.style.display 		= 'none';
//			
//		}
//	}
	//div clicked to display/hide
	if(fld)
	{
		if(fld.style.visibility == 'hidden')
		{
			fld.style.visibility	= 'visible';
			fld.style.display		= 'block';
		}
		else
		{
			fld.style.visibility 	= 'hidden';
			fld.style.display 		= 'none';

		}
	}
}*/

