
function cmdSubmit_onclick() 
{
	if(blank(document.frmQuery.txtDetail.value))
	{	
		alert("Please specify the Detail.")
		document.frmQuery.txtDetail.focus()
		return false
	}
	if(blank(document.frmQuery.txtorgName.value))
	{	
	   	alert("Please specify the Organization name.")
	   	document.frmQuery.txtorgName.focus()
		return false
	}
	if(validtext(document.frmQuery.txtorgName.value))
	{
		alert("Please do not use the special character(s).")
		document.frmQuery.txtorgName.value="" ;
		document.frmQuery.txtorgName.focus()
		return false
	}
	if(blank(document.frmQuery.txtName.value))
	{	
		alert("Please specify the User Name.")
		document.frmQuery.txtName.focus()
		return false
	}
	if(validtext(document.frmQuery.txtName.value))
	{
		alert("Please do not use the special character(s).")
		document.frmQuery.txtName.value="" ;
		document.frmQuery.txtName.focus()
		return false
	}
	if((!blank(document.frmQuery.txtEmail.value)) && (validtext(document.frmQuery.txtEmail.value)))
	{
		alert("Please do not use the special character(s).")
		document.frmQuery.txtEmail.value="" ;
		document.frmQuery.txtEmail.focus()
		return false
	}
	if(blank(document.frmQuery.txtPhone.value))
	{	
		alert("Please specify the Phone.")
		document.frmQuery.txtPhone.focus()
		return false
	}
	if(negative(document.frmQuery.txtPhone.value))
	{
		alert("Please don't give the negative values.");
		document.frmQuery.txtPhone.value="" 
		document.frmQuery.txtPhone.focus()
		return false;
	}
	if(isNaN(document.frmQuery.txtPhone.value)==true)
	{
		alert("Please enter the numeric value for Phone.");
		document.frmQuery.txtPhone.value="" ;
		document.frmQuery.txtPhone.focus()
		return false;
	}
	if(blank(document.frmQuery.txtAddress.value))
	{	
		alert("Please specify the Address.")
		document.frmQuery.txtAddress.focus()
		return false
	}
	if(validtext(document.frmQuery.txtAddress.value))
	{
		alert("Please do not use the special character(s).")
		document.frmQuery.txtAddress.value="" ;
		document.frmQuery.txtAddress.focus()
		return false
	}
	if(blank(document.frmQuery.txtCity.value))
	{	
		alert("Please specify the City.")
		document.frmQuery.txtCity.focus()
		return false
	}
	if(validtext(document.frmQuery.txtCity.value))
	{
		alert("Please do not use the special character(s).")
		document.frmQuery.txtCity.value="" ;
		document.frmQuery.txtCity.focus()
		return false
	}
	if(blank(document.frmQuery.txtState.value))
	{	
		alert("Please specify the State.")
		document.frmQuery.txtState.focus()
		return false
	}
	if(validtext(document.frmQuery.txtState.value))
	{
		alert("Please do not use the special character(s).")
		document.frmQuery.txtState.value="" ;
		document.frmQuery.txtState.focus()
		return false
	}
	if(isNaN(document.frmQuery.txtPin.value)==true)
	{
		alert("Please enter the numeric value for Pin Code.");
		document.frmQuery.txtPin.value="" ;
		document.frmQuery.txtPin.focus()
		return false;
	}
	if(negative(document.frmQuery.txtPin.value))
	{
		alert("Please don't give the negative values.");
		document.frmQuery.txtPin.value="" 
		document.frmQuery.txtPin.focus()
		return false;
	}
	document.frmQuery.action ="/agroecommerce/Triumph/Userform/HomepageMang/Query/querysave.asp"
	document.frmQuery.submit() 
	return true;
}
function ProductImage(code)
{
	url ="/agroecommerce/Triumph/homepages/ProductImage.asp?id="+code;
	window.open(url,"ProductImage","width=300,height=400,scrollbars=yes");
}

function ProductDetail(code)
{
	url ="/agroecommerce/Triumph/homepages/ProductDetail.asp?id="+code;
	window.open(url,"ProductDetail","width=500,height=500");
}

function swapImage(v)
{
	if (v=="about_r2_c1")
		about_r2_c1.src = "/agroecommerce/Triumph/Images/ahome.jpg"
	else if	(v=="about_r3_c1")
		about_r3_c1.src = "/agroecommerce/Triumph/Images/aabout.jpg"
	else if	(v=="about_r4_c1")
		about_r4_c1.src = "/agroecommerce/Triumph/Images/aproducts.jpg"
	else if	(v=="about_r5_c1")
		about_r5_c1.src = "/agroecommerce/Triumph/Images/aevents.jpg"
	else if	(v=="about_r6_c1")
		about_r6_c1.src = "/agroecommerce/Triumph/Images/aquery.jpg"
	else if	(v=="about_r7_c1")
		about_r7_c1.src = "/agroecommerce/Triumph/Images/acontact.jpg"
	else if	(v=="about_r8_c1")
		about_r8_c1.src = "/agroecommerce/Triumph/Images/aagroecommerce.jpg"				
}
function restoreImage(v)
{
	if (v=="about_r2_c1")
		about_r2_c1.src="/agroecommerce/Triumph/Images/about_r2_c1.jpg"
	else if	(v=="about_r3_c1")
		about_r3_c1.src="/agroecommerce/Triumph/Images/about_r3_c1.jpg"
	else if	(v=="about_r4_c1")
		about_r4_c1.src="/agroecommerce/Triumph/Images/about_r4_c1.jpg"
	else if	(v=="about_r5_c1")
		about_r5_c1.src="/agroecommerce/Triumph/Images/about_r5_c1.jpg"
	else if	(v=="about_r6_c1")
		about_r6_c1.src="/agroecommerce/Triumph/Images/about_r6_c1.jpg"
	else if	(v=="about_r7_c1")
		about_r7_c1.src="/agroecommerce/Triumph/Images/about_r7_c1.jpg"
	else if	(v=="about_r8_c1")
		about_r8_c1.src="/agroecommerce/Triumph/Images/about_r8_c1.jpg"							
}


