function show_calendar(fname) {
        url="calender.php?fname="+fname
        vWinCal = window.open(url, "Calendar",
                "width=290,height=180,status=no,resizable=yes,top=200,left=200");
        vWinCal.opener = self;
}
 function monthno(mnth)
{
	getmonthno=13
	mnth=mnth.toLowerCase();
	switch(mnth)
			 {
				case "jan": getmonthno = 1; break;
				case "feb": getmonthno = 2; break;
				case "mar": getmonthno = 3; break;
				case "apr": getmonthno = 4; break;
				case "may": getmonthno = 5; break;
				case "jun": getmonthno = 6; break;
				case "jul": getmonthno = 7; break;
				case "aug": getmonthno = 8; break;
				case "sep": getmonthno = 9; break;
				case "oct": getmonthno = 10; break;
				case "nov": getmonthno = 11; break;
				case "dec": getmonthno = 12; break;
			}
	return getmonthno;
}



// -->

var whitespace = " \t\n\r"
function isEmpty(s)
{
   return ((s == null) || (s.length == 0))
}
function isWhitespace (s)
{  var i;
	// Is s empty?
	if (isEmpty(s)) return true;

	 // Search through string's characters one by one
	 // until we find a non-whitespace character..// When we do, return false; if we don't, return true.
	 for (i = 0; i < s.length; i++)
	 {   
		 // Check that current character isn't whitespace.
		 var c = s.charAt(i);
 
		 if (whitespace.indexOf(c) == -1) return false;
	 }
 
	 // All characters are whitespace.
	 return true;
}
function BuildStr(s, s1)
{
	  if (s.length> 0) s = s + "\n";
	  s = s + s1;
	  return s;
}

function isCharsInBag (s, bag)
{  
  var i;
  // Search through string's characters one by one..// If character is in bag, append to returnString.

  for (i = 0; i < s.length; i++)
  {   
	  // Check that current character isn't whitespace.
	  var c = s.charAt(i);
	  if (bag.indexOf(c) == -1) return false;
  }
  return true;
}


function Validate(theForm)
{
	var errMesg = "";
	var diplayMesg = "";
	// Check all the Required Information fields.
	{
	var Q = ""; // this block determines lifespan of Q
	if (isWhitespace(theForm.title.value))
	{
		Q += "  Show Title\n";
	}
	if (isWhitespace(theForm.showlocation.value))
	{
		Q += "  Show Location\n";
	}
	if (isWhitespace(theForm.startdate.value))
	{
		Q += "  Show Start Date\n";
	}
	if (isWhitespace(theForm.enddate.value))
	{
		Q += "  Show End Date\n";
	}	
			
	if ( Q.length > 0 )
	{
		diplayMesg = "Please provide Valid values for\n" + Q ;
		//errMesg += "Please provide Valid values for\n" + Q ;
	
	}

	if (errMesg == "" && diplayMesg == "")
	{
		//theForm.submit();
	}
	
	else
	{
	
			if(diplayMesg!="")
			{
				alert(diplayMesg);
				return false;			
			}
			else
			{
				alert(errMesg);
				return false;
			}	
	}
}
	}
