// JavaScript Document
function DoCustomValidation()
{
frm=document.adminlogin;
  if (GenValidation(frm.username,'Username','','')==0)
		return false;
	if (GenValidation(frm.username,'','Username','')==0)
		return false;
	if (GenValidation(frm.password,'Password','','')==0)
		return false;
	if (GenValidation(frm.password,'','Password','')==0)
		return false;
}
function AddSiteadmin()
{
var	frmf=document.getElementById("addsite[admin_fname]");
var	frml=document.getElementById("addsite[admin_lname]");
var	frmu=document.getElementById("addsite[admin_name]");
var frmp=document.getElementById("addsite[admin_pword]");
var	frme=document.getElementById("addsite[admin_email]");
	if (GenValidation(frmf,'Fist Name','','')==0)
		return false;	
	if (GenValidation(frml,'Last Name','','')==0)
		return false;	
	if (GenValidation(frmu,'Username','','')==0)
		return false;	
		if (GenValidation(frmp,'Password','','')==0)
		return false;		
		if (GenValidation(frme,'Email','','')==0)
		return false;
		if (checkEmail(frme)==0)
	 return false;
}
function confirmdel()
{
if (confirm("Are you sure you want to Remove?"))
	return true ;
else
	return false ;
}
function confirmstatus()
{
if (confirm("Are you sure you want to Change Status?"))
	return true ;
else
	return false ;
}
function Addpagemanage()
{
	frm=document.addpagefrm;
	if (GenValidation(frm.page_name,'Page Name','','')==0)
		return false;
	if (GenValidation(frm.page_name,'','Page Name','')==0)
		return false;	
}
function Adddepartment()
{
	frm=document.adddeaprtmentfrm;
	if (GenValidation(frm.department_name,'Department Name','','')==0)
		return false;
	if (GenValidation(frm.department_name,'','Department Name','')==0)
		return false;
	}
	function Addeventscategory()
{
	frm=document.addeventscatfrm;
	if (GenValidation(frm.category_name,'Category Name','','')==0)
		return false;
	if (GenValidation(frm.category_name,'','Category Name','')==0)
		return false;
	}
	function AddNewsletterval()
	{
		frm=document.addnewsletterfrm;
	if (GenValidation(frm.newsletter_name,'Newsletter Name','','')==0)
		return false;
	if (GenValidation(frm.newsletter_name,'','Newsletter Name','')==0)
		return false;
	}
	function dosendnewsletterval()
	{
		frm=document.frmsendnewsletter;
		if(SelectValidation(frm.selsubscriber,'Send Newsletter')==0)
		return false;
	}
	function Usersignupval()
{
frm=document.usersignup;
 if (GenValidation(frm.first_name,'First Name','','')==0)
	 	 return false;
	if (GenValidation(frm.first_name,'','First Name','')==0)
		  return false;
	if (GenValidation(frm.last_name,'Last Name','','')==0)
		  return false;
	if (GenValidation(frm.last_name,'','Last Name','')==0)
	  	return false;	
 if (GenValidation(frm.username,'Username','','')==0)
	  	return false;
	if (GenValidation(frm.username,'','Username','')==0)
	  	return false;
	if (GenValidation(frm.password_1,'Password','','')==0)
	 	return false;
	if (GenValidation(frm.password_1,'','Password','')==0)
	 	return false;
	if (GenValidation(frm.password_2,'Confirm Password','','')==0)
			return false;
	if (GenValidation(frm.password_2,'','Confirm Password','')==0)
			return false;
	if (PassValidation(frm.password_1,frm.password_2)==0)
			return false;
		if(frm.date.value=="")
		{
			alert("Please select Date Of Birth");
			return false;
			}
	if (GenValidation(frm.company,'Company Name','','')==0)
	 	 return false;
	if (GenValidation(frm.company,'','Company Name','')==0)
		  return false;
	if (GenValidation(frm.address_1,'Address 1','','')==0)
		  return false;
	if (GenValidation(frm.address_1,'','Address 1','')==0)
	  	return false;	
	if (GenValidation(frm.city,'City','','')==0)
	 	 return false;
	if (GenValidation(frm.city,'','City','')==0)
		  return false;
	if (GenValidation(frm.state,'State','','')==0)
	 	 return false;
	if (GenValidation(frm.state,'','State','')==0)
		  return false;
	if (GenValidation(frm.zip,'Zip Code','','')==0)
	 	 return false;
	if (GenValidation(frm.zip,'','Zip Code','')==0)
		  return false;
	if(SplNumberszipcode(frm.zip)==0)
	   return false;
	if(SelectValidation(frm.Country,'Country')==0)
		  return false;
	if (GenValidation(frm.phone_1,'Phone','','')==0)
	 	 return false;
	if (GenValidation(frm.phone_1,'','Phone','')==0)
		  return false;
	if(SplphoneNumbers(frm.phone_1)==0)
	  return false;
	if (GenValidation(frm.fax,'Fax','','')==0)
	 	 return false;
	if (GenValidation(frm.fax,'','Fax','')==0)
		 return false;
	if(SplNumberszipcode(frm.fax)==0)
	  return false;
	if (GenValidation(frm.user_email,'Email','','')==0)
	 	return false;
	if (GenValidation(frm.user_email,'','Email','')==0)
		 return false;	
	if (checkEmail(frm.user_email)==0)
	  return false;
}	
function addstarmeetval()
{
frm=document.addsmeetfrm;
  if (GenValidation(frm.smeet_title,'Starmeet Title','','')==0)
				return false;
 	if (GenValidation(frm.smeet_title,'','Starmeet Title','')==0)
				return false;
		if (GenValidation(frm.smeet_location,'Starmeet Location','','')==0)
				return false;
 	if (GenValidation(frm.smeet_location,'','Starmeet Location','')==0)
				return false;
		if (GenValidation(frm.smeet_address,'Starmeet Address','','')==0)
				return false;
 	 if (GenValidation(frm.smeet_address,'','Starmeet Address','')==0)
				return false;
		 if (GenValidation(frm.smeetdate,'Meet Display Date','','')==0)
				return false; 	
			if (GenValidation(frm.smeetenddate,'Meet Display EndDate','','')==0)
				return false; 
			 if((frm.smeetdate.value) > (frm.smeetenddate.value))
			 {
				 alert("Please enter Valed Date");
				 return false;				
				}
				var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
				filename=frm.smeet_image.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || (ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frm.smeet_image.focus();
				return false;
				}
}
function Addcategorys()
{
	frm=document.addcattegoryfrm;
			var	frmfile=document.getElementById("product_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
	if(SelectValidation(frm.Department,'Department')==0)
		  return false;
	if (GenValidation(frm.cat_name,'Category Name','','')==0)
				return false;
	if (GenValidation(frm.cat_name,'','Category Name','')==0)
				return false;
	if (GenValidation(frmfile,'Image','','')==0)
				    return false;	 
					filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}	
}
function Editcategorys()
{
	frm=document.addcattegoryfrm;
			var	frmfile=document.getElementById("product_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
	if(SelectValidation(frm.Department,'Department')==0)
		  return false;
	if (GenValidation(frm.cat_name,'Category Name','','')==0)
				return false;
	if (GenValidation(frm.cat_name,'','Category Name','')==0)
				return false;	 
					filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || ( ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}	
}
function uploadgalleryval()
{
	var frm=document.browseimages;
	var	frmfile=document.getElementById("my_field[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
				 if (GenValidation(frm.image_title,'Image Title','','')==0)
				    return false;
	    if (GenValidation(frm.image_title,'','Image Title','')==0)
			    	return false;
					if (GenValidation(frmfile,'Image','','')==0)
				    return false;	    
				filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
	}
	function AddProductval()
	{
   var frm=document.adddeaprtmentfrm;
				var	frmfile=document.getElementById("product_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
			if (GenValidation(frm.product_name,'Product Name','','')==0)
			 	return false;
 	 if (GenValidation(frm.product_name,'','Product Name','')==0)
			 	return false;
			if (GenValidation(frm.product_keyword,'Product keyword','','')==0)
			  	return false;
 	 if (GenValidation(frm.product_keyword,'','Product keyword','')==0)
			  	return false;	
					filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || ( ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}	
			if (GenValidation(frm.product_price,'Product Price','','')==0)
			 	return false;			
		 if(SplNumberszipcode(frm.product_price)==0)
	    return false;
			if (GenValidation(frm.product_quantity,'Product quantity','','')==0)
			 	return false;
			 if(SplNumberszipcode(frm.product_quantity)==0)
	    return false;
	}
	function changepwordadmin()
{
	frm=document.changepasswordadmin;
	if (GenValidation(frm.oldpassword,'Old Password','','')==0)
				return false;
	if (GenValidation(frm.oldpassword,'','Old Password','')==0)
				return false;
					if (GenValidation(frm.newpassword,'New Password','','')==0)
				return false;
	if (GenValidation(frm.newpassword,'','New Password','')==0)
				return false;
}
function addticketpriceval()
{
	frm=document.addticketpricefrm;
	if(SelectValidation(frm.show_time,'Show Time')==0)
		  return false;
	if (GenValidation(frm.show_price,'Price','','')==0)
				return false;
	if(SplNumberszipcode(frm.show_price)==0)
	  return false;
	}
		function ls_showvaldate()
{
	var frm=document.addlight_soundshowfrm;
			var	frmfile=document.getElementById("show_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
	if (GenValidation(frm.ls_show_title,'Show Title','','')==0)
				 return false;
	if (GenValidation(frm.ls_show_title,'','Show Title','')==0)
			 	return false;
	if (GenValidation(frm.ls_show_date,'Show Date','','')==0)
				return false;
	if (GenValidation(frm.Show_times,'Show Time','','')==0)
				 return false;	
	if (GenValidation(frm.showticketprice,'Show Ticket Price','','')==0)
				 return false;
	if(SplNumberszipcode(frm.showticketprice)==0)
	    return false;
 if (GenValidation(frmfile,'Image','','')==0)
				    return false;	 
	   filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
}
		function ls_showeditvaldate()
{
	var frm=document.addlight_soundshowfrm;
			var	frmfile=document.getElementById("show_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
	if (GenValidation(frm.ls_show_title,'Show Title','','')==0)
				 return false;
	if (GenValidation(frm.ls_show_title,'','Show Title','')==0)
			 	return false;
	if (GenValidation(frm.ls_show_date,'Show Date','','')==0)
				return false;
	if (GenValidation(frm.Show_times,'Show Time','','')==0)
				 return false;	
	if (GenValidation(frm.showticketprice,'Show Ticket Price','','')==0)
				 return false;
	if(SplNumberszipcode(frm.showticketprice)==0)
	    return false; 
	   filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || (ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
}
		function film_premiervaldate()
{
	var frm=document.add_film_premier_frm;
			var	frmfile=document.getElementById("show_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
	if (GenValidation(frm.theatre_title,'Film Premier Title','','')==0)
				 return false;
	if (GenValidation(frm.theatre_title,'','Film Premier Title','')==0)
			 	return false;
	if (GenValidation(frm.theatre_date,'Film Premier Date','','')==0)
				return false;
	if (GenValidation(frm.Show_times,'Film Premier Time','','')==0)
				 return false;	
	if (GenValidation(frm.showticketprice,'Film Premier Ticket Price','','')==0)
				 return false;
	if(SplNumberszipcode(frm.showticketprice)==0)
	    return false;
 if (GenValidation(frmfile,'Image','','')==0)
				    return false;	 
	   filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
}
	function film_premieredtval()
{
	var frm=document.add_film_premier_frm;
			var	frmfile=document.getElementById("show_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
	
	
	if (GenValidation(frm.theatre_title,'','Film Premier Title','')==0)
			 	return false;
	if (GenValidation(frm.theatre_date,'Film Premier Date','','')==0)
				return false;
	if (GenValidation(frm.Show_times,'Film Premier Time','','')==0)
				 return false;	
	if (GenValidation(frm.showticketprice,'Film Premier Ticket Price','','')==0)
				 return false;
	if(SplNumberszipcode(frm.showticketprice)==0)
	    return false;
 if (GenValidation(frmfile,'Image','','')==0)
				    return false;	 
	   filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || (ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
}
	function Addeventval()
{
	var frm=document.addeventfrm;
			var	frmfile=document.getElementById("event_image");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
			if (SelectValidation(frm.event_type,'Event Type','','')==0)
				return false;
	if (GenValidation(frm.event_theme,'Event Theme Title','','')==0)
				 return false;
	if (GenValidation(frm.event_theme,'','Event Theme Title','')==0)
			 	return false;
	if (GenValidation(frmfile,'Image','','')==0)
				    return false;	 
	   filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
	if (GenValidation(frm.event_price,'Event Price','','')==0)
				 return false;	
		if(SplNumberszipcode(frm.event_price)==0)
	    return false; 
}
	function Editeventval()
{
	var frm=document.addeventfrm;
			var	frmfile=document.getElementById("event_image");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
			if (SelectValidation(frm.event_type,'Event Type','','')==0)
				return false;
	if (GenValidation(frm.event_theme,'Event Theme Title','','')==0)
				 return false;
	if (GenValidation(frm.event_theme,'','Event Theme Title','')==0)
			 	return false;	
	   filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || (ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}		
	if (GenValidation(frm.event_price,'Event Price','','')==0)
				 return false;	
		if(SplNumberszipcode(frm.event_price)==0)
	    return false; 
}
function Addvertval()
{
	var	frmfile=document.getElementById("advert_image");
	var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];			
	var frmflashfile=document.getElementById("advert_flash");
	var flashftypes=['.fla','.flv','.swf','.swt','.swc','.FLA','.FLV','.SWF','.SWC'];
	var frm=document.addvertfrm;
	if (GenValidation(frm.advert_name,'Adverstiment Name','','')==0)
				 return false;
		if (GenValidation(frm.advert_name,'','Adverstiment Name','')==0)
			 	return false;
			if(SelectValidation(frm.adtype,'Adverstiment Type')==0)
		  return false;
			if (GenValidation(frm.advert_url,'Adverstiment URL','','')==0)
				 return false;
		  if(frm.adtype.value=="Flash")
				{
											if (GenValidation(frmflashfile,'Flash','','')==0)
												return false;	 
								flashfilename=frmflashfile.value;	
								dots=flashfilename.split(".");
								flashtype 	= dots[dots.length-1];	
								if(( flashtype == "fla" )||( flashtype == "flv" )||( flashtype == "swf" )|| ( flashtype == "swt" )||( flashtype == "swc" ) || ( flashtype == "FLA" )||( flashtype == "FLV" )||( flashtype == "SWF" )||( flashtype == "SWT" )||(flashtype == "SWC"))
								{}else{
								alert("Valid file types are:\n\n" + (flashftypes));
								frmflashfile.focus();
								return false;
								}	
				}
				 if(frm.adtype.value=="Image")
				{
									if (GenValidation(frmfile,'Image','','')==0)
											return false;	 
							filename=frmfile.value;	
							dots=filename.split(".");
							ftype 	= dots[dots.length-1];	
							if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ))
							{
								//alert("sucessfully upload");
								}
							else
							{
							alert("Valid file types are:\n\n" + (ftypes));
							frmfile.focus();
							return false;
							}	
				}
				 if(frm.adtype.value=="Text")
				{
					if (GenValidation(frm.advert_html,'Embed Code','','')==0)
				 return false;
				}	
}
function Editaddval(type)
{
	 var frm=document.addedit1frm;
 	var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
  var flashftypes=['.fla','.flv','.swf','.swt','.swc','.FLA','.FLV','.SWF','.SWC'];

	   if(GenValidation(frm.advert_name,'Adverstiment Name','','')==0)
				    return false;
				if(GenValidation(frm.advert_name,'','Adverstiment Name','')==0)
			    	return false;
			 	if(type=="Flash")	
			  {
					var frmflashfile=document.getElementById("advert_flash");
			  		if(GenValidation(frmflashfile,'Flash','','')==0)
												return false;	 
								flashfilename=frmflashfile.value;	
								dots=flashfilename.split(".");
								flashtype 	= dots[dots.length-1];	
								if(( flashtype == "fla" )||( flashtype == "flv" )||( flashtype == "swf" )|| ( flashtype == "swt" )||( flashtype == "swc" ) || ( flashtype == "FLA" )||( flashtype == "FLV" )||( flashtype == "SWF" )||( flashtype == "SWT" )||(flashtype == "SWC"))
								{}else{
								alert("Valid file types are:\n\n" + (flashftypes));
								frmflashfile.focus();
								return false;
								}	
					}
					if(type=="Image")
					{
					 var	frmfile=document.getElementById("advert_image");	 
							filename=frmfile.value;	
							dots=filename.split(".");
							ftype 	= dots[dots.length-1];	
							if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) ||( ftype == "" ))
							{}else{
							alert("Valid file types are:\n\n" + (ftypes));
							frmfile.focus();
							return false;
							}	
						}
						if(type=="Text")
					 {
						if (GenValidation(frm.advert_html,'Embed Code','','')==0)
				 return false;
						}	
}
function Editshippingcost()
{
	var frm=document.editshipping;
		if (GenValidation(frm.country_name,'Country Name','','')==0)
				return false;
	if (GenValidation(frm.country_name,'','Country Name','')==0)
				return false;
if (GenValidation(frm.country_shippingprice,'Product Price','','')==0)
			 	return false;	
}
function Events_sessions()
{
	var frm=document.events_sessions;
		var	frmfile=document.getElementById("session_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
			
	 	if (GenValidation(frm.session_name,'Session Even Name','','')==0)
	 	 return false;
  	if (GenValidation(frm.session_name,'','Session Event Name','')==0)
		  return false;
		 if (GenValidation(frm.session_cost,'Session Even Cost','','')==0)
	 	 return false;
	filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || ( ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}	
}
function Edit_events_session()
{
	
	var frm=document.editevents_sessions;
	var	frmfile=document.getElementById("session_image[]");
		 var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];	
			
		if (GenValidation(frm.session_name,'Session Even Name','','')==0)
	 	 return false;
	if (GenValidation(frm.session_name,'','Session Event Name','')==0)
		  return false;
		 if (GenValidation(frm.session_cost,'Session Even Cost','','')==0)
	 	 return false;  
	filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || ( ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}	
}
function gallery_event()
{
	var frm=document.gallery_event;
	var frmfile=document.getElementById("gallery_image[]");
    var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG'];
	if (GenValidation(frm.gallery_image_name,'Gallery Event Name','','')==0)
	 	 return false;
	if (GenValidation(frm.gallery_image_name,'','Gallery Event Name','')==0)
		  return false;
		  filename=frmfile.value;	
				dots=filename.split(".");
				ftype 	= dots[dots.length-1];	
				if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( ftype == "JPEG" )||( ftype == "JPG" ) || ( ftype == "" ))
				{}
				else
				{
				alert("Valid file types are:\n\n" + (ftypes));
				frmfile.focus();
				return false;
				}
		  
	
}