// JavaScript Documentfunctions

// JavaScript Document

function userregister()
{

	var frm=document.form1;
if(GenValidation(frm.txtname,'First name','','') == 0)
		return false;
		if(GenValidation(frm.txtname,'','First name','') == 0)
		return false;
		
		if(GenValidation(frm.username,'User name','','') == 0)
		return false;
		if(GenValidation(frm.username,'','User  name','') == 0)
		return false;
		if(GenValidation(frm.pwd,'Password','','') == 0)
		return false;
		if(GenValidation(frm.pwd,'','Password','') == 0)
		return false;
		if(GenValidation(frm.pwd1,'Confirm Password','','') == 0)
		return false;
		if(frm.pwd1.value!==frm.pwd.value)
		{
			alert("Password and Confirm Password Doesn't Match");
			return false;
		}
		if (GenValidation(frm.email,'email id','','')==0)
		return false;
		//if (GenValidation(frm.email,'','email id','')==0)
//		return false;
		//if (EmailValidation(frm.email)==0)
//		return false;
		if(SelectValidation(frm.select1,'Category')==0)
		return false;
	if(SelectValidation(frm.selectmon,'Month')==0)
		return false;
	
	if(SelectValidation(frm.select5,'Day')==0)
		return false;
	if(SelectValidation(frm.select6,'Year')==0)
		return false;
		if (GenValidation(frm.marital,'Marital Status','','')==0)
		return false;
		if (GenValidation(frm.profession,'Profession','','')==0)
		return false;
		
						if(GenValidation(frm.mobile,'mobile','','') == 0)
		return false;
	if(SplNumbersworkphone(frm.mobile) == 0)
		return false;
		if(GenValidation(frm.textfieldad,'Address','','') == 0)
		return false;
		if(GenValidation(frm.textfieldad,'','Address','') == 0)
		return false;
		if(GenValidation(frm.textfield5,'City','','') == 0)
		return false;
		if(GenValidation(frm.textfield5,'','City','') == 0)
		return false;
if(GenValidation(frm.textfield6,'State','','') == 0)
		return false;
		if(GenValidation(frm.textfield6,'','State','') == 0)
		return false;
		if (SelectValidation(frm.selectcountry,'Country')==0)
		return false;
		
			var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename=frm.file.value;
				dots=filename.split(".");
					ftype	= dots[dots.length-1];
			if((frm.file.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( 	ftype 		== "JPEG" )||( ftype== "JPG" ) ||( ftype == "BMP" ) ||( ftype == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes));
		frm.file.focus();
		return false;
		}
				}
				if(GenValidation(frm.texcapt,'','Code','') == 0)
		return false;
				
	frm.submit();

}
function doeditlogovalidate()
{
	var frm=document.formedit;
	if(GenValidation(frm.txtname,'logo name','','') == 0)
		return false;
		if(GenValidation(frm.txtname,'','logo  name','') == 0)
		return false;
		var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename=frm.txtimage.value;
				dots=filename.split(".");
					ftype	= dots[dots.length-1];
			if((frm.txtimage.value =='')||(frm.txtimage.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{if((frm.txtimage.value ==''))
		{
			alert("Please upload logo");
			return false;
		}
		if((frm.txtimage.value !=''))
		{
	if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( 	ftype 		== "JPEG" )||( ftype== "JPG" ) ||( ftype == "BMP" ) ||( ftype == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes));
		frm.txtimage.focus();
		return false;
		}
				}
		}
		frm.submit();
}
function doaddsubscribervalidate()
{
	var frm=document.frmaddsubscriber;
	if(GenValidation(frm.txtsubscriber,'subcriber name','','') == 0)
		return false;
		if(GenValidation(frm.txtsubscriber,'','subscriber  name','') == 0)
		return false;
		if (GenValidation(frm.txtsubscriberemail,'email id','','')==0)
		return false;
		if (GenValidation(frm.txtsubscriberemail,'','email id','')==0)
		return false;
		if (EmailValidation(frm.txtsubscriberemail)==0)
		return false;
		frm.submit();
}
function addsubservicevalidate()
{
	var frm=document.frmservice;

		if (SelectValidation(frm.selectservice,'service name')== 0)
	return false;
		if(GenValidation(frm.txtname,'sub service name','','') == 0)
		return false;
		if(GenValidation(frm.txtname,'','sub service name','') == 0)
		return false;
		frm.submit();
}
function indexvalidation()
{
	
	//frm=document.frmreg;
	 if(document.getElementById('txtemail').value =='')
{
document.getElementById('t2').innerHTML = "please enter username ";
document.frmreg.txtname.focus();
}
else if(document.getElementById('password').value =='')
{
document.getElementById('t2').innerHTML = "please enter password ";
document.frmreg.txtname.focus();
return false;
}
return true;
	
}
function doaddservicevalidate()
{
	frm=document.frmaddservice;
		if(GenValidation(frm.txtservicetitle,'service name','','') == 0)
		return false;
	    if(GenValidation(frm.txtservicetitle,'','service name','') == 0)
		return false;	
		   if (GenValidationsh(frm.textshortdescription,'short description','','')==0)
		return false;
		if (GenValidationsh(frm.textshortdescription,'','short description ','')==0)
		return false;
	
		if(TextareaValidation(frm.textshortdescription,'short description',500) == 0)
		return false;
		var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename=frm.service_image.value;
				dots=filename.split(".");
					ftype	= dots[dots.length-1];
			if((frm.service_image.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( 	ftype 		== "JPEG" )||( ftype== "JPG" ) ||( ftype == "BMP" ) ||( ftype == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes));
		frm.service_image.focus();
		return false;
		}
				}
					var ftypes2=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename2=frm.service_image2.value;
				dots2=filename2.split(".");
					ftype2	= dots2[dots2.length-1];
			if((frm.service_image2.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype2 == "gif" )||( ftype2 == "jpeg" )||( ftype2 == "jpg" )||( ftype2 == "GIF" )||( 	ftype2== "JPEG" )||( ftype2== "JPG" ) ||( ftype2 == "BMP" ) ||( ftype2 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.service_image2.focus();
		return false;
		}
				}
				var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename3=frm.service_image3.value;
				dots3=filename3.split(".");
					ftype3	= dots3[dots3.length-1];
			if((frm.service_image3.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype3 == "gif" )||( ftype3 == "jpeg" )||( ftype3 == "jpg" )||( ftype3 == "GIF" )||( 	ftype3== "JPEG" )||( ftype3== "JPG" ) ||( ftype3 == "BMP" ) ||( ftype3 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes3));
		frm.service_image3.focus();
		return false;
		}
				}
					
				
					var ftypes4=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename4=frm.service_image4.value;
				dots4=filename4.split(".");
					ftype4	= dots4[dots4.length-1];
			if((frm.service_image4.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype4 == "gif" )||( ftype4 == "jpeg" )||( ftype4 == "jpg" )||( ftype4== "GIF" )||( 	ftype4	== "JPEG" )||( ftype4== "JPG" ) ||( ftype4 == "BMP" ) ||( ftype4 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes4));
		frm.service_image4.focus();
		return false;
		}
				}
					var ftypes5=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename5=frm.service_image5.value;
				dots5=filename5.split(".");
					ftype5	= dots5[dots5.length-1];
			if((frm.service_image5.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype5 == "gif" )||( ftype5 == "jpeg" )||( ftype5 == "jpg" )||( ftype5 == "GIF" )||( 	ftype5== "JPEG" )||( ftype5== "JPG" ) ||( ftype5 == "BMP" ) ||( ftype5 == "bmp" ))
		{
					
	}
	else
	{ 
		alert("Valid file types are:\n\n" + (ftypes5));
		frm.service_image5.focus();
		return false;
		}
				}
	
}
function doaddproductvalidate()
{
	 	frm=document.frmaddproduct;
		if(GenValidation(frm.txtproducttitle,'product name','','') == 0)
		return false;
	    if(GenValidation(frm.txtproducttitle,'','product name','') == 0)
		return false;	
		if (SelectValidation(frm.selectproduct,'category')==0)
		return false;

        if (GenValidation(frm.textshortdescription,'short description','','')==0)
		return false;
		if (GenValidation(frm.textshortdescription,'','short description ','')==0)
		return false;
		if(TextareaValidation(frm.textshortdescription,'short description',500) == 0)
		return false;
		
		var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename=frm.product_image.value;
				dots=filename.split(".");
					ftype	= dots[dots.length-1];
			if((frm.product_image.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( 	ftype 		== "JPEG" )||( ftype== "JPG" ) ||( ftype == "BMP" ) ||( ftype == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes));
		frm.product_image.focus();
		return false;
		}
				}
				
		var ftypes2=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename2=frm.product_image2.value;
				dots2=filename2.split(".");
					ftype2	= dots2[dots2.length-1];
			if((frm.product_image2.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype2 == "gif" )||( ftype2 == "jpeg" )||( ftype2 == "jpg" )||( ftype2 == "GIF" )||( 	ftype2		== "JPEG" )||( ftype2== "JPG" ) ||( ftype2 == "BMP" ) ||( ftype2 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.product_image2.focus();
		return false;
		}
				}
				var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename3=frm.product_image3.value;
				dots3=filename3.split(".");
					ftype3	= dots3[dots3.length-1];
			if((frm.product_image3.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype3 == "gif" )||( ftype3== "jpeg" )||( ftype3 == "jpg" )||( ftype3 == "GIF" )||( 	ftype3== "JPEG" )||( ftype3== "JPG" ) ||( ftype3 == "BMP" ) ||( ftype3 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes3));
		frm.product_image3.focus();
		return false;
		}
				}
				var ftypes4=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename4=frm.product_image4.value;
				dots4=filename4.split(".");
					ftype4	= dots4[dots4.length-1];
			if((frm.product_image4.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype4 == "gif" )||( ftype4 == "jpeg" )||( ftype4 == "jpg" )||( ftype4 == "GIF" )||( 	ftype4	== "JPEG" )||( ftype4== "JPG" ) ||( ftype4 == "BMP" ) ||( ftype4 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.product_image4.focus();
		return false;
		}
				}
				var ftypes5=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
		//var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename5=frm.product_image5.value;
				dots5=filename5.split(".");
					ftype5	= dots5[dots5.length-1];
			if((frm.product_image5.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype5 == "gif" )||( ftype5 == "jpeg" )||( ftype5 == "jpg" )||( ftype5 == "GIF" )||( 	ftype5== "JPEG" )||( ftype5== "JPG" ) ||( ftype5 == "BMP" ) ||( ftype5 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.product_image5.focus();
		return false;
		}
				}
				var ftypes=['.pdf'];	
		filename=frm.product_pdfdocument.value;	
		dots=filename.split(".");
		ftype 	= dots[dots.length-1];	
		if(frm.product_pdfdocument.value !='')
		{
		if(( ftype == "pdf" ))
		{
			return true;
	     }
	else
		{
		alert("Valid file types are:\n\n" + (ftypes));
		frm.product_pdfdocument.focus();
		return false;
		}
		return false;
		
}
frm.submit();
}
	
function doValidate()
{
 var frm=document.form1;
 if(GenValidation(frm.textfield2,'User Name','','') == 0)
 return false;
 if(GenValidation(frm.textfield3,'Password','','') == 0)
 return false;
 frm.submit();
}
function Register1()
{
 var frm=document.addletter;
 if(GenValidation(frm.txttitle,'title','','') == 0)
 return false;
 if(GenValidation(frm.txttitle,'','title','') == 0)
 return false;
// if (SelectValidation(frm.txtselectuser,'user')==0)
// return false;
 if (SelectValidation(frm.txtselectuser,'user')=="")
		return false;
		frm.submit();
}
function doaddprojectvalidate()
{
	  var frm=document.frmaddproject;
	  
	 	//frm=document.frmaddproject;
		if(GenValidation(frm.txtproducttitle,'vacancy title','','') == 0)
		return false;
	    if(GenValidation(frm.txtproducttitle,'','vacancy title','') == 0)
		return false;
		 if (GenValidationsh(frm.textshortdescription,'short description','','')==0)
		return false;
		if (GenValidationsh(frm.textshortdescription,'','short description ','')==0)
		return false;
		if(GenValidation(frm.txtproductcreated,'created date','','') == 0)
		return false;
	    if(GenValidation(frm.txtproductcreated,'','created date','') == 0)
		return false;
		var ftypes=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];	
	filename=frm.project_image.value;


	dots=filename.split(".");


	ftype 	= dots[dots.length-1];	

		if((frm.project_image.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype == "gif" )||( ftype == "jpeg" )||( ftype == "jpg" )||( ftype == "GIF" )||( 	ftype 		== "JPEG" )||( ftype == "JPG" ) ||( ftype == "BMP" ) ||( ftype == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes));
		frm.project_image.focus();
		return false;
		}
				}
			var ftypes2=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename2=frm.project_image2.value;
				dots2=filename2.split(".");
					ftype2 	= dots2[dots2.length-1];
			if((frm.project_image2.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype2 == "gif" )||( ftype2 == "jpeg" )||( ftype2 == "jpg" )||( ftype2 == "GIF" )||( 	ftype2 		== "JPEG" )||( ftype2 == "JPG" ) ||( ftype2 == "BMP" ) ||( ftype2 == "bmp" ))
		{
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.project_image2.focus();
		return false;
		}
				}
				var ftypes3=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename3=frm.project_image3.value;
				dots3=filename3.split(".");
					ftype3	= dots3[dots3.length-1];
			if((frm.project_image3.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype3 == "gif" )||( ftype3 == "jpeg" )||( ftype3 == "jpg" )||( ftype3 == "GIF" )||( 	ftype3 		== "JPEG" )||( ftype3 == "JPG" ) ||( ftype3 == "BMP" ) ||( ftype3 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes3));
		frm.project_image3.focus();
		return false;
		}
				}
				var ftypes4=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename4=frm.project_image4.value;
				dots4=filename4.split(".");
					ftype4 	= dots4[dots4.length-1];
			if((frm.project_image4.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype4 == "gif" )||( ftype4 == "jpeg" )||( ftype4 == "jpg" )||( ftype4 == "GIF" )||( 	ftype4 		== "JPEG" )||( ftype4 == "JPG" ) ||( ftype4 == "BMP" ) ||( ftype4 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.project_image4.focus();
		return false;
		}
				}
		var ftypes5=['.gif','.jpeg','.jpg','.GIF','.JPEG','.JPG','.BMP','.bmp'];
				filename5=frm.project_image5.value;
				dots5=filename5.split(".");
					ftype5 	= dots5[dots5.length-1];
			if((frm.project_image5.value !=''))//||(frm.project_image3.value !='')||(frm.project_image4.value !='')||(frm.project_image5.value !=''))
		{
	if(( ftype5 == "gif" )||( ftype5 == "jpeg" )||( ftype5 == "jpg" )||( ftype5 == "GIF" )||( 	ftype5 		== "JPEG" )||( ftype5 == "JPG" ) ||( ftype5 == "BMP" ) ||( ftype5 == "bmp" ))
		{
					
	}
	else
	{
		alert("Valid file types are:\n\n" + (ftypes2));
		frm.project_image5.focus();
		return false;
		}
				}
		var ftypes1=['.pdf'];	
		filename1=frm.product_pdfdocument.value;	
		dots1=filename1.split(".");
		ftype1 	= dots1[dots1.length-1];	
		if(frm.product_pdfdocument.value !='')
		{
		if(( ftype1 == "pdf" ))
		{
			return true;
	     }
	else
		{
		alert("Valid file types are:\n\n" + (ftypes1));
		frm.product_pdfdocument.focus();
		return false;
		}
		return false;
		
}
frm.submit();
}

		




function changepassvalidate()
{
  var frm=document.frmchangepass;
        if(GenValidation(frm.txtuser,'user name','','') == 0)
		return false;
	    if(GenValidation(frm.txtuser,'','user name','') == 0)
		return false;
		if(GenValidation(frm.txtold,'old password','','') == 0)
		return false;
	    if(GenValidation(frm.txtold,'','old password','') == 0)
		return false;
		if(GenValidation(frm.txtnew,'new password','','') == 0)
		return false;
	    if(GenValidation(frm.txtnew,'','new password','') == 0)
		return false;
		if(GenValidation(frm.txtconf,'confirm password','','') == 0)
		return false;
	    if(GenValidation(frm.txtconf,'','confirm  password','') == 0)
		return false;
		if(PassValidation(frm.txtconf,frm.txtnew))
		return false;
		
frm.submit();		
}
function video()
{
	  var frm=document.form1;
  if(GenValidation(frm.textfield2,'Title','','') == 0)
		return false;
	if(GenValidation(frm.textarea,'Description','','') == 0)
		return false;	
		if(GenValidation(frm.textfield23,'Keywords','','') == 0)
		return false;	
		if(GenValidation(frm.textfield24,'Category','','') == 0)
		return false;
		frm.submit();	
}

function val()
{
	  var frm=document.form1;
  if(GenValidation(frm.textfielda,'Title','','') == 0)
		return false;
	
		frm.submit();	
}
function aval()
{
	  var frm=document.form1;
  if(GenValidation(frm.Company,'Company','','') == 0)
		return false;
		if(GenValidation(frm.Company2,'Contact Name','','') == 0)
		return false;
		if(GenValidation(frm.Email,'Email','','') == 0)
		return false;
        if (EmailValidation(frm.Email)==0)
		return false;
       if(GenValidation(frm.Mobile,'Mobile','','') == 0)
		return false;
		if(SplNumbersworkphone(frm.Mobile) == 0)
		return false;
		if(SelectValidation(frm.country,'Country')==0)
		return false;
		if(GenValidation(frm.username,'Username','','') == 0)
		return false;
	if(GenValidation(frm.password,'Password','','') == 0)
		return false;
		if(GenValidation6(frm.password,'','password','') == 0)
		return false;
		if(GenValidation(frm.repassword,'Confirm Password','','') == 0)
		return false;
		if(frm.password.value != frm.repassword.value) 
		
		{
			alert("Confirm Password doesn't match");
			frm.repassword.focus();
			return false;
		}
		if(SelectValidation(frm.TypeOfIndustry,'TypeOfIndustry')==0)
		return false;
		if(GenValidation(frm.Specifications,'Specifications','','') == 0)
		return false;
		if(SelectValidation(frm.ExportMarket,'Cine Market')==0)
		return false;
		frm.submit();	
}
function login2()
{

	  var frm=document.form2;
  if(GenValidation(frm.txtname,'Agent User Name','','') == 0)
		return false;
		if(GenValidation(frm.txtname2,'Password','','') == 0)
		return false;frm.submit();	
}

 	function SetAllCheckBoxes1(FormName, FieldName, CheckValue)
{
	if(!document.forms[FormName])
		return;
	var objCheckBoxes = document.forms[FormName].elements[FieldName];
	if(!objCheckBoxes)
		return;
	var countCheckBoxes = objCheckBoxes.length;
	if(!countCheckBoxes)
		objCheckBoxes.checked = CheckValue;
	else
		// set the check value for all check boxes
		for(var i = 0; i < countCheckBoxes; i++)
			objCheckBoxes[i].checked = CheckValue;
}

							
							function doadd()
{
alert(document.fornm1.value);
	var frm=document.fornm1;
	if(GenValidation(frm.to2,'Sender name','','') == 0)
		return false;
			frm.submit();
}

function freed()
{

	  var frm=document.freedemo;
      if(GenValidation(frm.name,'Name','','') == 0)
		return false;
		
		if(GenValidation(frm.email,'Email','','') == 0)
		return false;
        if (EmailValidation(frm.email)==0)
		return false;
		
       if(GenValidation(frm.contact,'Contact Number','','') == 0)
		return false;
		if(SplNumbersworkphone(frm.contact) == 0)
		return false;
		
		 if(SelectValidation(frm.course,'Course')==0)
		return false;


 		frm.submit();	
}

function registerfrm()
{
	  var frm=document.register;

		 if(SelectValidation(frm.course,'Course')==0)
		return false;

        if(GenValidation(frm.fristName,'Frist Name','','') == 0)
		return false;
		
        if(GenValidation(frm.Lastname,'Last name','','') == 0)
		return false;
		
       if(GenValidation(frm.phone,'Mobile Number','','') == 0)
		return false;
		if(SplNumbersworkphone(frm.phone) == 0)
		return false;
		

        if(GenValidation(frm.street1,'Address','','') == 0)
		return false;

		 if(SelectValidation(frm.state,'State')==0)
		return false;
		
		if(GenValidation(frm.email,'Email','','') == 0)
		return false;
        if (EmailValidation(frm.email)==0)
		return false;
 	
		if(GenValidation(frm.txtnew,'Password','','') == 0)
		return false;
	    if(GenValidation(frm.txtnew,'','Password','') == 0)
		return false;
		if(GenValidation(frm.txtconf,'Confirm password','','') == 0)
		return false;
	    if(GenValidation(frm.txtconf,'','Confirm  password','') == 0)
		return false;
		
   var onew=document.register.txtnew;
	var conf=document.register.txtconf;
  	
	if((conf.value!=onew.value))
	{
		alert("Your passwords do not match,retype again")
		conf.focus()
		return false;
	}
	
	 return true;
	
  		frm.submit();	
}

