function valida(f2)
	{
		
		var ftBlogTitle=document.getElementById("ftBlogTitle").value;
		var fnCategoryId=document.getElementById("fnCategoryId").value;
		var ftBlogDesc=document.getElementById("ftBlogDesc").value;
		
		if(document.getElementById("fnCommentAllow").checked==true)
		{	
			document.getElementById("fnCommentAllow").value='1';
		}
		else
			document.getElementById("fnCommentAllow").value='0';
		if(document.getElementById("fnBlogEmailAllow").checked==true)
		{
			document.getElementById("fnBlogEmailAllow").value='1';
		}
		else
			document.getElementById("fnBlogEmailAllow").value='0';
		
		if(ftBlogTitle=="")
		{
			alert("Enter Blog Title");
			f2.ftBlogTitle.focus();
			return false;
		}
		if(fnCategoryId=="")
		{
			alert("Select Category");
			f2.fnCategoryId.focus();
			return false;
		}
		if(ftBlogDesc=="")
		{
			alert("Enter Blog Description");
			f2.ftBlogDesc.focus();
			return false;
		}
		
		
	}
function valid(f11)
	{
		bl=document.getElementById("ftBlogDesc").value;
		document.f.getElementByName("ftBlogDesc").innerHTML=bl;
		document.f.getElementById("ftBlogDesc").innerHTML=bl;
	}
	
function valid_photo(f2)
	{
		
		var ftPhotoTitle=document.getElementById("ftPhotoTitle").value;
		var fnCategoryId=document.getElementById("fnCategoryId").value;
		var fnSubCategoryId=document.getElementById("fnSubCategoryId").value;
		var ftPhotoLoc=document.getElementById("ftPhotoLoc").value;
		var ftPhotoHeadline=document.getElementById("ftPhotoHeadline").value;
		var ftPhotoDesc=document.getElementById("ftPhotoDesc").value;
		var file1=document.getElementById("file1").value;
		var fnUserId=document.getElementById("fnUserId").value;
		var ed=document.getElementById("ed").value;
		
		if(document.getElementById("fnPhotoEmailAllow").checked==true)
		{
			document.getElementById("fnPhotoEmailAllow").value='1';
		}
		else
			document.getElementById("fnPhotoEmailAllow").value='0';
			
		if(ftPhotoTitle=="")
		{
			alert("Enter Photo Title");
			f2.ftPhotoTitle.focus();
			return false;
		}
		
		
		if(fnCategoryId=="")
		{
			alert("Select Category");
			f2.fnCategoryId.focus();
			return false;
		}
		
		if(fnSubCategoryId=="")
		{
			alert("Select Sub Category");
			f2.fnSubCategoryId.focus();
			return false;
		}
		if(ftPhotoLoc=="")
		{
			alert("Enter Photo Location");
			f2.ftPhotoLoc.focus();
			return false;
		}
		if(ftPhotoHeadline=="")
		{
			alert("Enter Photo Headline");
			f2.ftPhotoHeadline.focus();
			return false;
		}
		if(ftPhotoDesc=="")
		{
			alert("Enter Photo Description");
			f2.ftPhotoDesc.focus();
			return false;
		}
		if(fnUserId.substr(0,1)=="U")
		{	
			if(ftPhotoDesc.match(/([\<a])*([\>])/i)!=null)
			{
				alert("Link tags are not allowed");
				f2.ftPhotoDesc.focus();
				return false;
			}
			if(ftPhotoDesc.match(/([\<])([^\>]{1,})*([\>])/i)!=null)
			{
				alert("HTML tags are not allowed");
				f2.ftPhotoDesc.focus();
				return false;
			}
			
			if((ftPhotoDesc.match("http://")!=null) || (ftPhotoDesc.match("www.")!=null))
			{
				alert("URL is not allowed");
				f2.ftPhotoDesc.focus();
				return false;
			}
		}
		if(ed==0)
		{
			if(file1=="")
			{
				alert("Enter Photo");
				f2.file1.focus();
				return false;
			}
		}
	}
		