
function pop_up(var1, var2, var3)
{


	if(var1 == "ImageEnlarge")
	{
		popup_win2 = window.open("image_enlarge.php?ImageUrl="+var2, "popup2", "width=600, height=400, scrollbars, resizable=yes"); 
	}



}


function validate_fields(theForm)
        {
                var strMessage, blnEmpty;
                strMessage = "Please enter the following fields: \n";
                blnEmpty = false;

                if(theForm.txtName.value == null || theForm.txtName.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Full Name\n"; }

                if(theForm.txtEmail.value == null || theForm.txtEmail.value == "" || !(isEmailAddr(theForm.txtEmail.value)))
                        { blnEmpty = true; strMessage = strMessage + " - Valid Email Address\n"; }

                if(theForm.txtMessage.value == null || theForm.txtMessage.value == "")
                        { blnEmpty = true; strMessage = strMessage + " - Your Message\n"; }


                if(blnEmpty)
                {  alert(strMessage); return (false); }
                else
                {  return (true); }
        }
		



function isEmailAddr(email)
{
	var result = false
	var theStr = new String(email)
	var index = theStr.indexOf("@");
	if (index > 0)
	{
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1))
		result = true;
	}
	return result;
}


	function ShowLarge1(sUrl)
	{
		large_image1_win = window.open(sUrl, 'large_image1_win', 'width=500,height=262,scrollbars=no,resizable=no,status=no,location=no,menubar=no');
		large_image1_win.focus();
	}
	function ShowLarge2(sUrl)
	{
		large_image2_win = window.open(sUrl, 'large_image2_win', 'width=300,height=150,scrollbars=no,resizable=no,status=no,location=no,menubar=no');
		large_image2_win.focus();
	}
	function ShowLarge3(sUrl)
	{
		large_image3_win = window.open(sUrl, 'large_image3_win', 'width=120,height=480,scrollbars=no,resizable=no,status=no,location=no,menubar=no');
		large_image3_win.focus();
	}
	function ShowLarge4(sUrl)
	{
		large_image4_win = window.open(sUrl, 'large_image4_win', 'width=550,height=450,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no');
		large_image4_win.focus();
	}



