function noenter1() {
  if(window.event.keyCode == 13)
  {
    checkform3();
  }
}

function noenter2() {
  if(window.event.keyCode == 13)
  {
    fieldcheck();
  }
}

function noenter3() {
  if(window.event.keyCode == 13)
  {
    checkform2();
  }
}

function checkform2()
{
	var val;
	if (document.frm.search.value <= 0)
	{
		alert ('Please enter the search keywords');
		document.frm.search.focus();
		document.frm.search.select();
		//return false;	
	}
	else
	{
		document.frm.action='searchlist.asp?n=New&page=1';		
		document.frm.submit();	
		return true;
	}
}

function checkform3()
{
	var val;
	if (document.frm.searchleft.value <= 0)
	{
		alert ('Please enter the search keywords');
		document.frm.searchleft.focus();
		document.frm.searchleft.select();
		//return false;	
	}
	else
	{
		document.frm.action='searchlist1.asp?n=New&page=1';		
		document.frm.submit();	
		return true;
	}
}


function fieldcheck()
{
		document.frm.action='advsearchlist.asp?n=New&page=1';	
		document.frm.submit();	
		return true;
}

function checkform()
{
	if (document.frm.loginid.value <= 0)
	{
		alert ('Please enter the Login ID');
		document.frm.loginid.focus();
		document.frm.loginid.select();
		return false;	
	}
    if (document.frm.password.value <= 0)
	{
		alert ('Please enter the password');
		document.frm.password.focus();
		document.frm.password.select();
		return false;	
	}
	return true;
}

function checkformR()
{
	if (document.frm.txtItems.value <= 0)	// This checks the Items
	{
		alert ('Enter Item interested in');
		document.frm.txtItems.focus();
		return false;	
	}
	if (document.frm.txtQuality.value <= 0)	// This checks the Quantity 
	{
		alert ('Enter Quantity needed');
		document.frm.txtQuality.focus();
		return false;	
	}	
	if (document.frm.txtDate.value <= 0)	// This checks the Date needed 
	{
		alert ('Enter Date needed');
		document.frm.txtDate.focus();
		return false;	
	}
	if (document.frm.txtsplrem.value <= 0)	// This checks the Date needed 
	{
		alert ('Enter Special Remarks');
		document.frm.txtsplrem.focus();
		return false;	
	}
	if (document.frm.txtNameMail.value <= 0)	// This checks the First name 
	{
		alert ('Enter Name');
		document.frm.txtNameMail.focus();
		return false;	
	}	
	if (document.frm.txtCompany.value <= 0)	// This checks the Company 
	{
		alert ('Enter Company');
		document.frm.txtCompany.focus();
		return false;	
	}	
	if (document.frm.txtAddress.value <= 0)	// This checks the Address I 
	{
		alert ('Enter Address');
		document.frm.txtAddress.focus();
		return false;	
	}	
//	if (document.frm.txtAddress2.value <= 0)	// This checks the Address II 
//	{
//		alert ('Enter Complete Address');
//		document.frm.txtAddress2.focus();
//		return false;	
//	}	
	if (document.frm.txtCity.value <= 0)	// This checks the City 
	{
		alert ('Enter City');
		document.frm.txtCity.focus();
		return false;	
	}	
	if (document.frm.txtState.value <= 0)	// This checks the State
	{
		alert ('Enter State');
		document.frm.txtState.focus();
		return false;	
	}	
	if (document.frm.txtZip.value <= 0)	// This checks the ZIP code 
	{
		alert ('Enter Zip Code');
		document.frm.txtZip.focus();
		return false;	
	}	
	if (document.frm.txtPhone.value <= 0)	// This checks the Phone number 
	{
		alert ('Enter Phone Number');
		document.frm.txtPhone.focus();
		return false;	
	}	
	if (document.frm.txtFax.value <= 0)	// This checks the Fax Number 
	{
		alert ('Enter Fax Number');
		document.frm.txtFax.focus();
		return false;	
	}
	if (document.frm.txtEmail.value == 0)	//	This checks the email id
	{
		alert ('Enter Email Addrerss');
		document.frm.txtEmail.focus();
		return false;	
	}
	if (document.frm.txtEmail.value.indexOf('@',0)==-1 || document.frm.txtEmail.value.indexOf('.',0)==-1)
	{
		alert('Please enter a valid email address');
		document.frm.txtEmail.focus();
		return false;
	}		
//	if (document.frm.txtASINo.value <= 0)	// This checks the ASI No
//	{
//		alert ('Enter ASI No');
//		document.frm.txtASINo.focus();
//		return false;	
//	}
// if (document.frm.nature.selectedIndex == 0)	// This checks the title
//	{
//		alert ('Select Nature of Complaint');
//		document.frm.nature.focus();
//		return false;	
//	}
//	
		return true;
}

function checkformC()
{
	if (document.frm.txtmessage.value <= 0)	// This checks the Date needed 
	{
		alert ('Enter Message');
		document.frm.txtmessage.focus();
		return false;	
	}
	if (document.frm.txtNameMail.value <= 0)	// This checks the First name 
	{
		alert ('Enter Name');
		document.frm.txtNameMail.focus();
		return false;	
	}	
	if (document.frm.txtCompany.value <= 0)	// This checks the Company 
	{
		alert ('Enter Company');
		document.frm.txtCompany.focus();
		return false;	
	}	
	if (document.frm.txtAddress.value <= 0)	// This checks the Address I 
	{
		alert ('Enter Address');
		document.frm.txtAddress.focus();
		return false;	
	}	
	if (document.frm.txtCity.value <= 0)	// This checks the City 
	{
		alert ('Enter City');
		document.frm.txtCity.focus();
		return false;	
	}	
	if (document.frm.txtState.value <= 0)	// This checks the State
	{
		alert ('Enter State');
		document.frm.txtState.focus();
		return false;	
	}	
	if (document.frm.txtZip.value <= 0)	// This checks the ZIP code 
	{
		alert ('Enter Zip Code');
		document.frm.txtZip.focus();
		return false;	
	}	
	if (document.frm.txtPhone.value <= 0)	// This checks the Phone number 
	{
		alert ('Enter Phone Number');
		document.frm.txtPhone.focus();
		return false;	
	}	
	if (document.frm.txtFax.value <= 0)	// This checks the Fax Number 
	{
		alert ('Enter Fax Number');
		document.frm.txtFax.focus();
		return false;	
	}
	if (document.frm.txtEmail.value == 0)	//	This checks the email id
	{
		alert ('Enter Email Addrerss');
		document.frm.txtEmail.focus();
		return false;	
	}
	if (document.frm.txtEmail.value.indexOf('@',0)==-1 || document.frm.txtEmail.value.indexOf('.',0)==-1)
	{
		alert('Please enter a valid email address');
		document.frm.txtEmail.focus();
		return false;
	}		
		return true;
}

function checkformS()
{
	if (document.frm.txtNameMail.value <= 0)	// This checks the First name 
	{
		alert ('Enter Name');
		document.frm.txtNameMail.focus();
		return false;	
	}	
	if (document.frm.txtCompany.value <= 0)	// This checks the Company 
	{
		alert ('Enter Company');
		document.frm.txtCompany.focus();
		return false;	
	}	
	if (document.frm.txtAddress.value <= 0)	// This checks the Address I 
	{
		alert ('Enter Address');
		document.frm.txtAddress.focus();
		return false;	
	}	
	if (document.frm.txtCity.value <= 0)	// This checks the City 
	{
		alert ('Enter City');
		document.frm.txtCity.focus();
		return false;	
	}	
	if (document.frm.txtState.value <= 0)	// This checks the State
	{
		alert ('Enter State');
		document.frm.txtState.focus();
		return false;	
	}	
	if (document.frm.txtZip.value <= 0)	// This checks the ZIP code 
	{
		alert ('Enter Zip Code');
		document.frm.txtZip.focus();
		return false;	
	}	
	if (document.frm.txtPhone.value <= 0)	// This checks the Phone number 
	{
		alert ('Enter Phone Number');
		document.frm.txtPhone.focus();
		return false;	
	}	
	if (document.frm.txtFax.value <= 0)	// This checks the Fax Number 
	{
		alert ('Enter Fax Number');
		document.frm.txtFax.focus();
		return false;	
	}
	if (document.frm.txtEmail.value == 0)	//	This checks the email id
	{
		alert ('Enter Email Addrerss');
		document.frm.txtEmail.focus();
		return false;	
	}
	if (document.frm.txtEmail.value.indexOf('@',0)==-1 || document.frm.txtEmail.value.indexOf('.',0)==-1)
	{
		alert('Please enter a valid email address');
		document.frm.txtEmail.focus();
		return false;
	}		
		return true;
}

function checkformPS()
{
	if (document.frm.txtmessage.value <= 0)	// This checks the Date needed 
	{
		alert ('Enter Message');
		document.frm.txtmessage.focus();
		return false;	
	}
	if (document.frm.txtNameMail.value <= 0)	// This checks the First name 
	{
		alert ('Enter Name');
		document.frm.txtNameMail.focus();
		return false;	
	}	
	if (document.frm.txtCompany.value <= 0)	// This checks the Company 
	{
		alert ('Enter Company');
		document.frm.txtCompany.focus();
		return false;	
	}	
	if (document.frm.txtAddress.value <= 0)	// This checks the Address I 
	{
		alert ('Enter Address');
		document.frm.txtAddress.focus();
		return false;	
	}	
	if (document.frm.txtCity.value <= 0)	// This checks the City 
	{
		alert ('Enter City');
		document.frm.txtCity.focus();
		return false;	
	}	
	if (document.frm.txtState.value <= 0)	// This checks the State
	{
		alert ('Enter State');
		document.frm.txtState.focus();
		return false;	
	}	
	if (document.frm.txtZip.value <= 0)	// This checks the ZIP code 
	{
		alert ('Enter Zip Code');
		document.frm.txtZip.focus();
		return false;	
	}	
	if (document.frm.txtPhone.value <= 0)	// This checks the Phone number 
	{
		alert ('Enter Phone Number');
		document.frm.txtPhone.focus();
		return false;	
	}	
	if (document.frm.txtFax.value <= 0)	// This checks the Fax Number 
	{
		alert ('Enter Fax Number');
		document.frm.txtFax.focus();
		return false;	
	}
	if (document.frm.txtEmail.value == 0)	//	This checks the email id
	{
		alert ('Enter Email Addrerss');
		document.frm.txtEmail.focus();
		return false;	
	}
	if (document.frm.txtEmail.value.indexOf('@',0)==-1 || document.frm.txtEmail.value.indexOf('.',0)==-1)
	{
		alert('Please enter a valid email address');
		document.frm.txtEmail.focus();
		return false;
	}		
		return true;
}

function checksendtofriend(linkname)
{
	var val;
	if (document.frm.emailsString.value <= 0)
	{
		alert ('Please enter the to email');
		document.frm.emailsString.focus();
		document.frm.emailsString.select();
		return false;	
	}
	if (document.frm.emailsString.value.indexOf('@',0)==-1 || document.frm.emailsString.value.indexOf('.',0)==-1)
	{
		alert('Please enter a valid email address');
		document.frm.emailsString.focus();
		document.frm.emailsString.select();
		return false;
	}
	if (document.frm.ToName.value <= 0)
	{
		alert ('Please enter the to name');
		document.frm.ToName.focus();
		document.frm.ToName.select();
		return false;	
	}
	if (document.frm.ToCompany.value <= 0)
	{
		alert ('Please enter the to company');
		document.frm.ToCompany.focus();
		document.frm.ToCompany.select();
		return false;	
	}
	if (document.frm.fromName.value <= 0)
	{
		alert ('Please enter the from name');
		document.frm.fromName.focus();
		document.frm.fromName.select();
		return false;	
	}
	if (document.frm.fromCompany.value <= 0)
	{
		alert ('Please enter the from company');
		document.frm.fromCompany.focus();
		document.frm.fromCompany.select();
		return false;	
	}
	if (document.frm.fromEmail.value <= 0)
	{
		alert ('Please enter the from email');
		document.frm.fromEmail.focus();
		document.frm.fromEmail.select();
		return false;	
	}
	if (document.frm.fromEmail.value.indexOf('@',0)==-1 || document.frm.fromEmail.value.indexOf('.',0)==-1)
	{
		alert('Please enter a valid email address');
		document.frm.fromEmail.focus();
		document.frm.fromEmail.select();
		return false;
	}
	if (document.frm.message.value <= 0)
	{
		alert ('Please enter the message');
		document.frm.message.focus();
		document.frm.message.select();
		return false;	
	}

		return true;
}

function openlarge(linkname)
{
	window.open('prodlarge.asp?prod='+linkname,'abc','status=yes,height=530,width=665,left=0,top=0,scrollbars=yes');
}

function openreg(linkname)
{
	window.open('content/register.asp?item='+linkname,'reg','status=yes,height=530,width=595,left=0,top=0,scrollbars=yes');
}

function openprodsource()
{
	window.open('content/prodsource.asp','PS','status=yes,height=530,width=565,left=0,top=0,scrollbars=yes');
}

function opencontact()
{
	window.open('content/contact.asp','contact','status=yes,height=500,width=595,left=0,top=0,scrollbars=yes');
}

function opensendtofriend(linkname)
{
	window.open('sendtofriend.asp?link='+linkname,'sendtofriend','status=yes,height=440,width=414,left=50,top=50,scrollbars=yes');
}

function opendisclaimer()
{
	window.open('disclaimer.asp','disclaimer','status=yes,height=200,width=365,left=50,top=50,scrollbars=yes');
}

function openspecials()
{
	window.open('content/specials.asp','disclaimer','status=yes,height=425 width=595,left=50,top=50,scrollbars=yes');
}