	var i_status;
	var c_status;
	var o_status;
function instructions(id_1)
{
	if (!document.getElementById(id_1))
	{
		return;
	}
          if(i_status != 1)
			  {
               document.getElementById(id_1).style.display='block';
               i_status = 1;
          }
          else{
               document.getElementById(id_1).style.display='none';
               i_status = 0;
          }
}

function instructions1(id_1)
{
	if (!document.getElementById(id_1))
	{
		return;
	}
          if(i_status != 1)
			  {
               document.getElementById(id_1).style.display='block';
               i_status = 1;
          }
          else{
               document.getElementById(id_1).style.display='none';
               i_status = 0;
          }
}



function GotoMain(id)
{
	document.frm_search.submit();
}

function GotoSub(id)
{
	
	document.frm_search.action="search_list.php?cat=sub&cmb_subcategory="+id;
	document.frm_search.submit();
}

function GotoManuf(id)
{
	
	document.frm_search.action="search_list.php?description="+id;
	document.frm_search.submit();
}

function Check()
{

	if(checkBlank(document.frm_search.txtpartno,"Search")==false)
		return false;

	document.frm_search.action="search_list.php";
	document.frm_search.submit();
	return true;
	
}

function Subscriber()
{

	frm = document.frm_search;
	if(checkBlank(frm.txt_subscribe,"Subscriber")==false)
		return false;
	if(ValidateEmail(frm.txt_subscribe,"Subscriber E-Mail")==false)
		return false;
	document.frm_search.btnSubscribe.value = "Subscribe";
	document.frm_search.submit();
	return true;
	
}

function Check_blank()
{
	frm = document.frm_search;
//checkSelect

	if(document.frm_search.cmb_category.selectedIndex<=0)
	{
		alert("Please select a Category");
		return false;
	}
	
	cat_id1 = document.frm_search.cmb_category.value;
	cat_id2 = document.getElementById('cmb_subcategory').value;
	//cat_id3 = document.frm_search.cmb_manuf.value;
	cat_id4 = document.getElementById('cmb_model').value;
	cat_id3 = document.getElementById('cmb_manuf').value;
	
	
	//cat_id4 = document.frm_search.cmb_model.value;

	if(cat_id2=="")
	{
		cat_id2=0;
	}
	
	//alert(cat_id3);
	document.frm_search.action = "search_list.php?cat_id="+cat_id1+"&sub_cat_id="+cat_id2+"&manuf="+cat_id3+"&cmb_model="+cat_id4;
	document.frm_search.submit();
	//document.frm_search.action="search_list.php";
	
	return false;
	
}

function Select_Category(id)
{
	//alert(id);
	cid = "DivPrice";
	document.getElementById(cid).style.display=(document.getElementById(cid).style.display!="block")? "block" : "block";
	document.getElementById(cid).innerHTML= "<span style='margin-left: 27;'>processing....please wait</span>";
	var url = 'getCombo.php?id='+id;
	var pars = '';
	var target = 'DivPrice';
	var myAjax = new Ajax.Updater(target, url, {method: 'get', parameters: pars});
}

function back_page(str)
{
	
	window.location = str;
}