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)==false)
                        { blnEmpty = true; strMessage = strMessage + " - A 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 watchvideo(var1)
{

		var winl = (screen.width-480)/2;
		var wint = (screen.height-400)/2;
		var settings ='height=400,';
		settings +='width=480,';
		settings +='top='+wint+',';
		settings +='left='+winl+',';
		settings +='scrollbars='+scroll+',';
		settings +='resizable=yes';
		win=window.open("watch-video.aspx?url="+var1,'large_win3', settings);
		if(parseInt(navigator.appVersion) >= 4){win.window.focus();}

}


function validate_newsletter(theForm)
        {
                var strMessage, blnEmpty;
                strMessage = "Please enter the following fields: \n";
                blnEmpty = false;

                if(theForm.txtEmail.value == null || theForm.txtEmail.value == "" || isEmailAddr(theForm.txtEmail.value)==false)
                        { blnEmpty = true; strMessage = strMessage + " - A valid Email Address\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=600,height=400,scrollbars=yes,resizable=yes,status=no,location=no,menubar=no');
	large_image1_win.focus();
}


