function add_mp3()
{
	             if(document.addmp3.filename.value=="")
	             {
	             	alert("Please type a file name for the MP3");	
	             	document.addmp3.filename.focus();
	             	return false;	             	
	             }
	              
	             if(document.addmp3.file.value=="")
	             {
	             	alert("Please Upload mp3");	
	             	document.addmp3.file.focus();
	             	return false;	             	
	             }
	             
	             if(document.addmp3.file.value!='')
	             {                           
	                          
	                          var val1=new String(document.addmp3.file.value);
				
			         what=val1;
				 if (what.indexOf('/') > -1)
					   answer = what.substring(what.lastIndexOf('/')+1,what.length);
			              else
					    answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
					
			            ext1=answer.split('.');
			            
				if((ext1[1]!='mp3')&&(ext1[1]!='MP3')&&(ext1[1]!='Mp3')&&(ext1[1]!='mP3'))
				{
					alert("Please upload Mp3's only");
					document.addmp3.file.focus();
					return false;
				}
			
	                         ext1=val1.split("\\");                                     
	                       
		}		
			
}

function add_mp31()
{
		
		 if(document.editshow.file.value!='')
	             {                                      
	                          
		             var val1=new String(document.editshow.file.value);
			what=val1;
			 if (what.indexOf('/') > -1)
				   answer = what.substring(what.lastIndexOf('/')+1,what.length);
		              else
				    answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
				
		            ext1=answer.split('.');
		          		             
			if((ext1[1]!='mp3')&&(ext1[1]!='MP3')&&(ext1[1]!='Mp3')&&(ext1[1]!='mP3'))
			{
				alert("Please upload Mp3's only");
				document.addmp3.file.focus();
				return false;
			}
			
	                         ext1=val1.split("\\");                                   
	                       
		}
	
}

function movewin(win, width, height) {
		var fullWidth = screen.availWidth;
		var fullHeight = screen.availHeight;
		var x = (fullWidth/2)-(width/2);
		var y = (fullHeight/2)-(height/2);
		win.moveTo(x,y); 
	}
			
function viewWin(filenames)
{
	
	filenames=filenames;
	width='950';
	height='650';
		
	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);
	
	movewin(newwin, width, height);
	    if (navigator.appName=="Netscape") 
	        newwin.location=url;
		
		newwin.opener=window;
		newwin.focus();
		return false;
}
function viewWin1(filenames)
{
	
	filenames=filenames;
	width='500';
	height='450';
		
	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);
	
	movewin(newwin, width, height);
	    if (navigator.appName=="Netscape") 
	        newwin.location=url;
		
		newwin.opener=window;
		newwin.focus();
		return false;
}

function viewWin2(filenames)
{
	
	filenames=filenames;
	width='450';
	height='250';
		
	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);
	
	movewin(newwin, width, height);
	    if (navigator.appName=="Netscape") 
	        newwin.location=url;
		
		newwin.opener=window;
		newwin.focus();
		return false;
}

function viewWin3(filenames)
{
	
	filenames=filenames;
	width='450';
	height='200';
		
	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);
	
	movewin(newwin, width, height);
	    if (navigator.appName=="Netscape") 
	        newwin.location=url;
		
		newwin.opener=window;
		newwin.focus();
		return false;
}

function viewWin4(filenames)
{
	
	filenames=filenames;
	width='600';
	height='450';
		
	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);
	
	movewin(newwin, width, height);
	    if (navigator.appName=="Netscape") 
	        newwin.location=url;
		
		newwin.opener=window;
		newwin.focus();
		return false;
}

function viewWin5(filenames)
{
	
	filenames=filenames;
	width='850';
	height='550';
		
	var newwin = window.open(filenames, 'mydoc', 'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=1,resizable=1,maximize=0,width='+width+',height='+height);
	
	movewin(newwin, width, height);
	    if (navigator.appName=="Netscape") 
	        newwin.location=url;
		
		newwin.opener=window;
		newwin.focus();
		return false;
}

 //onSubmit="return formValidator();
function formValidator(ty)
{
	
		var email 	= document.theForm.email;
		var firstname 	= document.theForm.firstname;
		var lastname 	= document.theForm.lastname;
		var Password 	= document.theForm.password;
		var rePassword 	= document.theForm.passwordConfirm;
		var strPassword = new String(document.theForm.password.value);
		
		if(ty=='mus')
		{
			if(document.theForm.type.value=="")
			{
				alert("Please Select Music Type");
				return false;	
			}				
		}
		
		if (email.value == 0 )
		{
			alert("Please enter your email address");
			email.focus();
			return false;
		}
	
		// Email Checker
		/*if (email.value.indexOf("@") < 0)	
		{
			alert("Incorrect email address. Please re-enter");
			email.focus();
			return false;
		}
	
		// Email Checker
		if (email.value.indexOf(".") < 0)	
		{
			alert("Incorrect email address. Please re-enter");
			email.focus();
			return false;
		}
	
		// Email Checker
		if (email.value.indexOf(" ") >= 0)	
		{
			alert("Incorrect email address. Please re-enter");
			email.focus();
			return false;
		}*/
		
		// First Name Checker
		if (firstname.value == 0 )
		{
			alert("Please enter your first name");
			firstname.focus();
			return false;
		}
	
		// Last Name Checker
		if (lastname.value == 0 )
		{
			alert("Please enter your last name");
			lastname.focus();
			return false;
		}
		
		//Profile name checker
		if (document.theForm.profile_name.value=="")
		{
			alert("Please enter your Profile name");
			document.theForm.profile_name.focus();
			return false;
		}
		
		// Password Checker
		if (Password.value ==  "")
		{
			alert ("Please enter a password (min 4 characters)");
			Password.focus();
			return false;
		}
		else if (strPassword.length < 4)
		{
			alert ("Password must have at least 4 characters. Please Re-enter.");
			Password.focus();
			return false;
		}
		else if (Password.value.indexOf(" ") >= 0)
		{
			alert ("Space is not ALLOWED for password. Please re-enter.");
			Password.focus();
			return false;
		}
		else if (Password.value != rePassword.value)
		{
			alert ("Password do not matched. Please re-enter");
			rePassword.focus();
			return false;
		}
		
		if(document.theForm.country.value=="")
		{
			alert("Please Select Country");
			return false;	
		}
		
		if(document.theForm.news1.checked)
		{
				if(document.theForm.news.value=="")
				{
					alert("Please Select NewsletterType");
					return false;	
				}
		}		
		
		if(document.theForm.hometown.value=="")
		{
				alert("Please enter Home town");
				document.theForm.hometown.focus();
				return false;		
		}
		
		// Gender Check
		myOption = -1;
		for( i=0; i<document.theForm.gender.length; i++ )
		{
			if( document.theForm.gender[i].checked )
			{
				myOption = i;
			}
		}

		if( myOption == -1 )
		{
			alert("Please select your Gender.");
			return false;
		}
		
		if(document.theForm.gender.value=="")
		{
				alert("Please enter Gender town");
				document.theForm.gender.focus();
				return false;		
		}
		
		
		
		if(document.theForm.postalCode.value=="")
		{
				alert("Please enter Postal Code");
				document.theForm.postalCode.focus();
				return false;		
		}		
		
		x=document.theForm.bMonth.selectedIndex;
		if(document.theForm.bMonth[x].value==0)
		{
			alert("Enter your date of birth");
			return false;
			
		}
		
		x=document.theForm.bDay.selectedIndex;
		if(document.theForm.bDay[x].value==0)
		{
			alert("Enter your date of birth");
			return false;
			
		}
		
		x=document.theForm.bYear.selectedIndex;
		if(document.theForm.bYear[x].value==0)
		{
			alert("Enter your date of birth");
			return false;			
		}
		
		if(ty=='ent')	
		{
			if(document.theForm.biography.value=="")
			{
				alert("Please enter Biography");
				document.theForm.biography.focus();
				return false;		
			}
			
			if(document.theForm.who_they_are.value=="")
			{
				alert("Please enter What you do");
				document.theForm.who_they_are.focus();
				return false;		
			}
				
		}
		
		if(ty=='bus')	
		{
			
			
			if(document.theForm.business_type.value=="")
			{
				alert("Please enter Business Type");
				document.theForm.business_type.focus();
				return false;		
			}	
			
		}
		
		if(ty=='bus' || ty=='cls' || ty=='st' || ty=='gen' || ty=='ent' || ty=='ban' )
		{
			var frm=document.theForm;
			var prodimg=frm.image.value;
			
			if(frm.image.value=="")
			{
				alert("Please enter your profile  image");
				frm.image.focus();
				return false;		
			}
			
			if(frm.image.value!="")
			{
				var val1=new String(frm.image.value);
				what=val1;
				 if (what.indexOf('/') > -1)
				        answer = what.substring(what.lastIndexOf('/')+1,what.length);
				    else
				        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
				
				ext1=answer.split('.');
				if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
				{
				alert("Please upload the images with .jpg or .jpeg extension");
				frm.image.focus();
				return false;
				}
			}
				
		}			
		
		
		if(ty=='bus')	
		{
			var frm=document.theForm;
			var prodimg=frm.logo.value;		
			
			if(frm.logo.value!="")
			{
				var val1=new String(frm.logo.value);
				what=val1;
				 if (what.indexOf('/') > -1)
				        answer = what.substring(what.lastIndexOf('/')+1,what.length);
				    else
				        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
				
				ext1=answer.split('.');
				if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
				{
				alert("Please upload the image logo  with .jpg or .jpeg extension");
				frm.logo.focus();
				return false;
				}
			}		
		}
		
		if(ty=='ban')
		{
			if(document.theForm.mobile.value=="")
			{
				alert("Please enter mobile number");
				document.theForm.mobile.focus();
				return false;		
			}
			
			if(document.theForm.type.value=="")
			{
				alert("Please Select Music type");
				return false;		
			}
			
			var len;
			x=document.theForm.type.selectedIndex;
			colorid=document.theForm.type[x].value;
			
			if(colorid=='1' || colorid=='2' || colorid=='3')
			{
				if(document.theForm.bandname.value=="")
				{
					alert("Please enter band name");
					document.theForm.bandname.focus();
					return false;	
				}
				else
				{
					var ban_name= document.theForm.bandname;	
					
					if (ban_name.value.indexOf("@") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf("/") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf(":") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf("&") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf("?") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf(" ") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf("<") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf(">") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}
					if (ban_name.value.indexOf("'") > 0)
					{
						alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@,' ");	
						document.theForm.bandname.focus();
						return false;
					}					
				}
			}	
			
		}
		
		if(ty=='ban1')
		{
			if(document.theForm.mobile.value=="")
			{
				alert("Please enter mobile number");
				document.theForm.mobile.focus();
				return false;		
			}
			
			if(document.theForm.type.value=="")
			{
				alert("Please Select Music type");
				return false;		
			}
		}
		
		if(!document.theForm.ch9.checked)
		{
			alert("Please agree to the terms and conditions");
			return false;
		}
		if(document.theForm.txtCode.value=="")
	 	{
		 	alert("please Fill  Code   ");
		 	 document.theForm.txtCode.focus();
		 	return false;
		}
		 if(isNaN(document.theForm.txtCode.value))
		{
			alert("Please input valid Verification Code");
			document.theForm.txtCode.focus();
			return false;
		}             
					
}

function formclassified()
{
	
		if(document.fc.category.value=="")
		{
		            alert("Please enter Category");
			document.fc.category.focus();
			return false;		
		}
		
		if(document.fc.productname.value=="")
		{
		            alert("Please enter Product Name");
			document.fc.productname.focus();
			return false;		
		}
		if(document.fc.desc.value=="")
		{
		            alert("Please enter Description");
			document.fc.desc.focus();
			return false;		
		}
		if(document.fc.startprice.value=="")
		{
		            alert("Please enter Start Price");
			document.fc.startprice.focus();
			return false;		
		}
		
		
		
		if(document.fc.postage.value=="")
		{
		            alert("Please enter Postage Details");
			document.fc.postage.focus();
			return false;		
		}
		
		
		if(document.fc.image3.value!="")
		{
			var val1=new String(document.fc.image3.value);
			what=val1;
				 if (what.indexOf('/') > -1)
				        answer = what.substring(what.lastIndexOf('/')+1,what.length);
				    else
				        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
				
				ext1=answer.split('.');
			if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
			{
				alert("Please upload the images with .jpg or .jpeg extension");
				document.fc.image3.focus();
				return false;
			}
		
		}
		if(document.fc.image4.value!="")
		{
			var val1=new String(document.fc.image4.value);
			what=val1;
			 if (what.indexOf('/') > -1)
			        answer = what.substring(what.lastIndexOf('/')+1,what.length);
			    else
			        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
			
			ext1=answer.split('.');
			if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
			{
				alert("Please upload the images with .jpg or .jpeg extension");
				document.fc.image4.focus();
				return false;
			}
			
		}
		if(document.fc.image1.value=="" &&  document.fc.image2.value==""  &&   document.fc.image3.value=="" &&  document.fc.image4.value=="")
		{
			alert("Please enter Atleast one Image");
			return false;
				
		}
	
	
		if(document.fc.image1.value!="")
		{
			var val1=new String(document.fc.image1.value);
				what=val1;
			 if (what.indexOf('/') > -1)
			        answer = what.substring(what.lastIndexOf('/')+1,what.length);
			    else
			        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
			
			ext1=answer.split('.');
			if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
			{
				alert("Please upload the images with .jpg or .jpeg extension");
				document.fc.image1.focus();
				return false;
			}
		
		
		}
		if(document.fc.image2.value!="")
		{
			var val1=new String(document.fc.image2.value);
			what=val1;
			 if (what.indexOf('/') > -1)
			        answer = what.substring(what.lastIndexOf('/')+1,what.length);
			    else
			        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
			
			ext1=answer.split('.');
			if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
			{
				alert("Please upload the images with .jpg or .jpeg extension");
				document.fc.image2.focus();
				return false;
			}
		
		}
	
		
		x=document.fc.cMonth.selectedIndex;
		if(document.fc.cMonth[x].value==0)
		{
			alert("Enter  Auction Closing Date");
			return false;
				
		}
			
		x=document.fc.cDay.selectedIndex;
		if(document.fc.cDay[x].value==0)
		{
			alert("Enter  Auction Closing Date");
			return false;
				
		}
			
		x=document.fc.cYear.selectedIndex;
		if(document.fc.cYear[x].value==0)
		{
			alert("Enter  Auction Closing Date");
			return false;
				
		}	
		
}

function formstolen()
{
		if(document.fs.category.value=="")
		{
		            alert("Please enter Category");
			document.fs.category.focus();
			return false;		
		}
		if(document.fs.desc.value=="")
		{
		            alert("Please enter Description");
			document.fs.desc.focus();
			return false;		
		}
	
		if(document.fs.image1.value!="")
		{
			var val1=new String(document.fs.image1.value);
				what=val1;
			 if (what.indexOf('/') > -1)
			        answer = what.substring(what.lastIndexOf('/')+1,what.length);
			    else
			        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
			
			ext1=answer.split('.');
			if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
			{
				alert("Please upload the images with .jpg or .jpeg extension");
				document.fs.image1.focus();
				return false;
			}	
		}
		if(document.fs.image2.value!="")
		{
			var val1=new String(document.fs.image2.value);
			what=val1;
			 if (what.indexOf('/') > -1)
			        answer = what.substring(what.lastIndexOf('/')+1,what.length);
			    else
			        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
			
			ext1=answer.split('.');
			if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
			{
				alert("Please upload the images with .jpg or .jpeg extension");
				document.fs.image2.focus();
				return false;
			}
		
		}
		
		x=document.fs.cMonth.selectedIndex;
		if(document.fs.cMonth[x].value==0)
		{
			alert("Enter  Missing Date");
			return false;
				
		}
			
		x=document.fs.cDay.selectedIndex;
		if(document.fs.cDay[x].value==0)
		{
			alert("Enter  Missing Date");
			return false;
				
		}
			
		x=document.fs.cYear.selectedIndex;
		if(document.fs.cYear[x].value==0)
		{
			alert("Enter  Missing Date");
			return false;
				
		}
		if(document.fs.reward.value=="")
		{
		            alert("Please enter  Reward ");
			document.fs.reward.focus();
			return false;		
		}
		
		if(document.fs.title.value=="")
		{
		            alert("Please Title ");
			document.fs.title.focus();
			return false;		
		}
		if(document.fs.image1.value=="" &&  document.fs.image2.value=="" )
		{
			alert("Please enter Atleast one Image");
			return false;
				
		}
	
}

function formband(ty)
{
	
	if(ty=='bb')
	{
		if(document.form_band.bandname.value=="")
		{
			   alert("Please enter  Bandname ");
			   document.form_band.bandname.focus();
			   return false;		
		}
		
		var ban_name= document.form_band.bandname;	
					
		if (ban_name.value.indexOf(" ") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf("@") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf("?") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf("&") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf("<") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf(">") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf("&") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		if (ban_name.value.indexOf(":") > 0)
		{
			alert("Band name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
			document.form_band.bandname.focus();
			return false;
		}
		
		
	}
	
	if(document.form_band.bandmember.value=="")
	{
		   alert("Please enter  Band Member ");
		   document.form_band.bandmember.focus();
		   return false;		
	}
	if(document.form_band.bandmember.value!="")
	{
		  if(isNaN(document.form_band.bandmember.value)==true)
		  {
			   alert("Please enter Number of members ");
			   document.form_band.bandmember.focus();
			   return false;		
		   }
	}	
	
	if(document.form_band.city.value=="")
	{
		   alert("Please enter  City.");
		   document.form_band.city.focus();
		   return false;		
	}
	if(document.form_band.country1.value=="")
	{
		   alert("Please enter  Country.");
		   return false;		
	}
	if(document.form_band.influences.value=="")
	{
		   alert("Please enter Influences.");
		   document.form_band.influences.focus();
		   return false;		
	}
	if(document.form_band.like.value=="")
	{
		   alert("Please enter Sounds Like.");
		   document.form_band.like.focus();
		   return false;		
	}
	
	if(document.form_band.chval.checked)
	{
		if(document.form_band.text1.value=="")
		{
			   alert("Please input name.");
			   document.form_band.text1.focus();
			   return false;		
		}
		if(document.form_band.text2.value=="")
		{
			   alert("Please input name.");
			   document.form_band.text2.focus();
			   return false;		
		}
	}

	
	if(document.form_band.biography.value=="")
	{
		   alert("Please enter Biography ");
		   document.form_band.biography.focus();
		   return false;		
	}
	
	if(document.form_band.genre1.value=="")
	{
		   alert("Please enter  Genre1 ");
		   return false;		
	}
	
	if(document.form_band.chval.checked)
	{
		if(document.form_band.management_agent.value=="")
		{
			alert("Please Select Management Agent");
			return false;	
		}
		if(document.form_band.record_label.value=="")
		{
			alert("Please Select Record Label");
			return false;	
		}
	}
	
}

function form_music_agent()
{
	if(document.agent_form.who_they_are.value=="")
	{
		   alert("Please select who they are ");
		   document.agent_form.who_they_are.focus();
		   return false;		
	}
	
	
	var frm=document.agent_form;
	var prodimg=frm.image.value;
	
	
	if(frm.logo.value!="")
	{
		var val1=new String(frm.logo.value);
		//ext1=extract(val1);
		what=val1;
		 if (what.indexOf('/') > -1)
		        answer = what.substring(what.lastIndexOf('/')+1,what.length);
		    else
		        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
		
		ext1=answer.split('.');
		if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
		{
			alert("Please upload the Logo with .jpg or .jpeg extension");
			frm.logo.focus();
			return false;
		}
	}	
	
	if(document.agent_form.type.value=="")
	{
		   alert("Please select type ");
		   document.agent_form.type.focus();
		   return false;		
	}	
		
}


function formmp3(no)
{
		
	
	if(document.selectfrmcheck.file1.value=="" )
	{
		alert("Please enter  Mp3");
		return false;				
	}
	
	if(document.selectfrmcheck.file1.value!='')
	 {              
	                                     
	                          
		 var val1=new String(document.selectfrmcheck.file1.value);
				
		what=val1;
	             if (what.indexOf('/') > -1)
		             answer = what.substring(what.lastIndexOf('/')+1,what.length);
		 else
		             answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
				
		 ext1=answer.split('.');
		 
		if((ext1[1]!='mp3')&&(ext1[1]!='MP3')&&(ext1[1]!='Mp3')&&(ext1[1]!='mP3'))
		{
			alert("Please upload Mp3's only");
			document.selectfrmcheck.file1.focus();
			return false;
		}
			
	              ext1=val1.split("\\");
	                         
	            /*  var file_name=ext1[ext1.length-1];
	                           
	              chk=file_name.split(" ");
	                           
	              if(chk.length>1)
	              {
	                           alert("Please replace spaces with underscore in file name");
			return false;
	               } 
	                else
	                {
	                              	
	               } */                       
	                       
              }		
	
	if(document.selectfrmcheck.file1.value!="")
	{
		if(document.selectfrmcheck.filename1.value=="")
		{
			alert("Please enter Filename1");
			document.selectfrmcheck.filename1.focus();
			return false;				
		}
	}	
	
}

function selectone(nameval)
{
		for(i=0;i<selectfrmcheck.length;i++)
		{
			if(document.selectfrmcheck.elements[i].name != nameval)
				document.selectfrmcheck.elements[i].checked= false;
			else
				document.selectfrmcheck.elements[i].checked= true;
		}
		return true;
}

function checky(e)
{
	
	
	if(document.form_band.chval.checked)
	{
			document.getElementById("t1").style.visibility="visible";
			document.getElementById("t2").style.visibility="visible";
	}
	else
	{
			document.getElementById("t1").style.visibility="hidden";
			document.getElementById("t2").style.visibility="hidden";
			
	}
}

function extract(what) {
    if (what.indexOf('/') > -1)
        answer = what.substring(what.lastIndexOf('/')+1,what.length);
    else
        answer = what.substring(what.lastIndexOf('\\')+1,what.length);
    return answer;
}

function validateimage()
{
	
	var frm=document.uploadimage;
	var prodimg=frm.image.value;
	
	if(frm.image.value=="")
	{
		alert("Please upload the images with .jpg or .jpeg extensions");
		frm.image.focus();
		return false;
	}



	if(frm.image.value!="")
	{
		var val1=new String(frm.image.value);
		what=val1;
		 if (what.indexOf('/') > -1)
		        answer = what.substring(what.lastIndexOf('/')+1,what.length);
		    else
		        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
		
		ext1=answer.split('.');
		if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
		{
		alert("Please upload the images with .jpg or .jpeg extension");
		frm.image.focus();
		return false;
		}//if
	}
}

function validateimage1()
{
	var frm=document.editshow;
	var prodimg=frm.image.value;
	
	if(frm.image.value!="")
	{
		var val1=new String(frm.image.value);
		what=val1;
		 if (what.indexOf('/') > -1)
		        answer = what.substring(what.lastIndexOf('/')+1,what.length);
		    else
		        answer = what.substring(what.lastIndexOf('\\')+1,what.length);		        		
		
		ext1=answer.split('.');
		if((ext1[1]!='jpg')&&(ext1[1]!='JPG')&&(ext1[1]!='jpeg')&&(ext1[1]!='JPEG'))
		{
		alert("Please upload the images with .jpg or .jpeg extension");
		frm.image.focus();
		return false;
		}//if
	}
}


function checkyes(e)
{	
		if(document.theForm.news1.checked)
		{
			document.getElementById("t2").style.visibility="visible";
			
		}
		else
		{
			document.getElementById("t2").style.visibility="hidden";
			
		}
}
function checkyes1(e)
{	
		if(document.acc_settings.news1.checked)
		{
			document.getElementById("t2").style.visibility="visible";
			
		}
		else
		{
			document.getElementById("t2").style.visibility="hidden";
			
		}
}

function chk_contact()
{
		
	if(document.mailfrm.name.value=="")
	{
		    alert("Please Enter Your name");
		    document.mailfrm.name.focus();
		    return false;	
	 }
		   
	if(document.mailfrm.email.value=="")
	 {
		      alert("Please Enter Your Email");
		      document.mailfrm.email.focus();
		      return false;	
	 }
		
}

function chk_contact1()
{
	if(document.mailfrm.first_name.value=="")
	{
		    alert("Please Enter Your name");
		    document.mailfrm.first_name.focus();
		    return false;	
	 }
	 
	 if(document.mailfrm.company.value=="")
	{
		    alert("Please Enter Company");
		    document.mailfrm.company.focus();
		    return false;	
	 }
	
	 
	 if(document.mailfrm.email.value=="")
	 {
		      alert("Please Enter Your Email");
		      document.mailfrm.email.focus();
		      return false;	
	 }
	 
	  if(document.mailfrm.industry.value=="")
	 {
		      alert("Please Enter industry");
		      document.mailfrm.industry.focus();
		      return false;	
	 }	
}			
	
	
	
	
	function chk_showform()
	{
	   if(document.showform.to.value=="")
	     {
	        alert("Enter Email of receiver");
	        document.showform.to.focus();
	        return false;
	     }	
		
		
		
	}
	
	function chk_showform1()
	{
	   if(document.showform.to.value=="")
	     {
	        alert("Select Friend to Send ");
	        document.showform.to.focus();
	        return false;
	     }		
		
		
	}
	
	
	function chk_loginfrm()
	 {
	   if (document.loginfrm.email.value=="")	
	       {
	       	  alert("Please Enter your Email");
	       	  document.loginfrm.email.focus();
	       	  return false;
	         }
	     
	    if(document.loginfrm.pass.value=="")
	       {
	          alert("Please enter your password");
	           document.loginfrm.pass.focus();
	           return false;
	       }     
	 	
	  }
	  
  function chk_acc_settings()
  {
     if(document.acc_settings.pass.value != document.acc_settings.cpass.value)
     {
	           alert("Confirm password do not match. Please input again. ");
	           document.acc_settings.pass.focus();
	           return false;	
     }
     
     if(document.acc_settings.email.value=="")
        {
           alert("Please Enter Your Email");
           document.acc_settings.email.focus();
           return false;	
        }
        
        if(document.acc_settings.oldpass.value=="")
        {
	           alert("Please Enter Your Old Password");
	           document.acc_settings.oldpass.focus();
	           return false;	
        }	
        
       
        
        
         
         if(document.acc_settings.news1.checked)
        {
			if(document.acc_settings.news.value=="")
			{
				alert("Please Select NewsletterType");
				return false;	
			}
		}      		  	
	  	
     }	  	
	  	
	function chk_showdiary()
	{
		  if(document.showdiary.message.value=="")
		    {
		       alert("Please Enter Message");
		       document.showdiary.message.focus();
		       return false;
		    }	
			
	}	  	
	
	function validate_message()
	{
		if(frm_msg.sub.value=="")
		{
			alert("Please enter the subject");
			frm_msg.sub.select();
			return false;
		}
		if(frm_msg.comments.value=="")
		{
			alert("Please enter the comments");
			frm_msg.comments.select();
			return false;
		}
	}

function chek()
{
	if(confirm("Are you sure you want to delete image?"))
		return true;
	else
		return false;	
	
}
function school()
{
	 if(document.addschool.school_name.value=="")
        	{
	           alert("Please Enter  School name");
	           document.addschool.school_name.focus();
	           return false;	
        	}
        	 if(document.addschool.city.value=="")
        	{
	           alert("Please Enter  City");
	           document.addschool.city.focus();
	           return false;	
        	}
        	if(document.addschool.country1.value=="")
        	{
	           alert("Please Enter  Country");
	           
	           return false;	
        	}
        	if(document.addschool.yearfrom.value=="")
        	{
	           alert("Please Enter  Year");
	           document.addschool.yearfrom.focus();
	           return false;	
        	}
		
}

function validate_add_band()
{
	if(document.addfrm.band_name.value=="")
        	{
	           alert("Please Add Band");
	           document.addfrm.band_name.focus();
	           return false;	
        	}	
}

function update_band_detail()
{
	if(document.form_band.chval.checked)
	{
		if(document.form_band.management_agent.value=="")
		{
			alert("Please Select Management Agent");
			return false;	
		}
		if(document.form_band.record_label.value=="")
		{
			alert("Please Select Record Label");
			return false;	
		}
	}	
}

function disp_ban()
{
	var len;
	x=document.theForm.type.selectedIndex;
	colorid=document.theForm.type[x].value;
	
	if(colorid=='1' || colorid=='2' || colorid=='3')
	{
		document.getElementById("hid").style.visibility="visible";	
	}
	else
	{		
		document.getElementById("hid").style.visibility="hidden";
	}	
}

function Wild_Chk(e)
{
	var str = new String(e.wild_url.value);
	str=str.toLowerCase();
	
	var arr = new Array("`","~","!"," ","@","#","$","%","^","&","*","(",")","-","+","=","\\","|","{","}",":",";",'"',"'","<",",",">",".","?","/");
	var chk=0;
	
	if(trimString(e.wild_url.value)=="")
	{
		alert(" Folder name cannot be left blank ");	
		e.wild_url.select();
		return false;
	}	
	
	for(var i=0;i<arr.length;i++)
	{
	     if(str.indexOf(arr[i]) > -1 )
	     {		
	     	  chk=1;
	     	  break;
	     }
	}
	if(chk)
	{
		alert("Folder name cannot contain any blank space or the characters given below:\n\n\\,:, &, ?,<,>,@ ");	
		e.wild_url.select();
		return false;
	}
	
	var arr1 = new Array("admin","avatar","banners","cmtdoc","cmtfiles","cmtimages","db","domain","flash","forum","images","image","include","menu","music","recycle","simg","template","test","wild");
	var chk1=0;
	
	for(var i=0;i<arr1.length;i++)
	{
	     if(str.indexOf(arr1[i]) > -1 )
	     {		
	     	  chk1=1;
	     	  break;
	     }
	}
	if(chk1)
	{
		alert(" Please choose another name ");
		e.wild_url.value="";	
		e.wild_url.select();
		return false;
	}
	
	
	
}

function trimString(str)
{
	  while (str.charAt(0) == ' ')
	    str = str.substring(1);
	  while (str.charAt(str.length - 1) == ' ')
	    str = str.substring(0, str.length - 1);
	  return str;
}

function Chk_Add_Show(e)
{
	if(e.venue.value=="")	
	{
		alert("Please enter venue ");	
		e.venue.focus();
		return false;
		
	}
}
  	