function newcheck(s)
{
if(s==1)
{
if(document.form_model.Model.value=="None"){alert("Please select a model to continue further"); return false;}
else
	{
document.form_part.Part_no.value="None";
window.open("./tr_drinkingwater_display.php?Model="+document.form_model.Model.options[form_model.Model.selectedIndex].value,'CoolProducts','top=200,left=250,directories=no,height=300,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=700,maximizable=yes,minimizable=yes,maxheight=200');
		return true;
	}
}
else
{
if(document.form_part.Part_no.value=="None"){alert("Please select a part number to continue further"); return false;}
else
	{
	document.form_model.Model.value="None";	window.open("./tr_drinkingwater_display.php?Part_no="+document.form_part.Part_no.options[form_part.Part_no.selectedIndex].value,'CoolProducts','top=200,left=250,directories=no,height=300,location=no,resizable=yes,scrollbars=yes,status=no,toolbar=no,width=700,maximizable=yes,minimizable=yes,maxheight=200');
		return true;
	}
}

}

function add_validate()
{
	if (validateBlank(form1.txt_model)==0 || validateBlank(form1.txt_part_number)==0 )
	{
		alert("Please Fill all the Fields marked by *");
		return false;
	}
	else
		return true;
}

function modify_validate()
{
	if (!validateSelect(form_modify.cbo_model))
	{
		alert("Please Select the Model");
		return false;
	}
	else if (validateBlank(form1.txt_model)==0 || validateBlank(form1.txt_part_number)==0 )
	{
		alert("Please Fill all the Fields marked by *");
		return false;
	}
	else
		return true;


}
function validateCombo()
{
if(document.form_modify.cbo_model.value=="s")
{
alert("Please select a Model to Delete");
return false;
}
var b_flag=false;
var browsername=navigator.appName 
if(browsername=="Microsoft Internet Explorer")
{
		b_flag=confirm("Are you sure to delete this Reverse Osmosis Model ?");
		if(b_flag==true)
		{
			return true;
		}
		else
		{
			return false;
		}
}

else 
return true;
}
