/*  Script Name - upvalidate.js */
/* Created by :Mrunal Malusare date(‘Y-m-d’)->2009/04/06 */
/* Modified by :<author name> <date(‘Y-m-d’)>  */
/* Modification details : <Description of modification> */

// JavaScript Document
function update()
{
	
	document.getElementById("updatetitleDiv").innerHTML="";
	document.getElementById("updatedescriptionDiv").innerHTML="";
	document.getElementById("dateDiv").innerHTML="";
	
	if((document.getElementById('sel1').value=="") && (document.getElementById('sel3').value==""))
	{
		document.getElementById("dateDiv").innerHTML="<font color='RED'>Please select dates.</font>";
		return false;
	}
	
	if((document.getElementById('sel1').value) > (document.getElementById('sel3').value))
	{
		document.getElementById("dateDiv").innerHTML="<font color='RED'>Please selects proper dates.</font>";
		return false;
	}
	
	if(document.getElementById('id_updatetitle').value=="<br>" || document.getElementById('id_updatetitle').value=="")
	{
		
		document.getElementById("updatetitleDiv").innerHTML="<font color='RED'>Please specify update's title.</font>";
		document.getElementById('id_updatetitle').focus();
		return false;
	}
	
	if(document.getElementById('id_updatedescription').value=="" || document.getElementById('id_updatedescription').value=="<br>")
	{
		document.getElementById("updatedescriptionDiv").innerHTML="<font color='RED'>Please specify update's description.</font>";
		document.getElementById('id_updatedescription').focus();
		return false;
	}
	
	
	return true;
}
