function fetchSub(cat_id) {
		var getstr ='category_id=' + encodeURI(cat_id) +'&sid='+Math.random();
		//alert(getstr)		
		document.getElementById("subcat").innerHTML='<font color = "red">loading..</font>';
		ajaxpack.postAjaxRequest("subcat.php", getstr, display_subcategory, "txt", '');
	}
function display_subcategory() {
  var myajax = ajaxpack.ajaxobj
  var myfiletype = ajaxpack.filetype
  var products_page = ajaxpack.callback_parameter;
  if (myajax.readyState == 4){ //if request of file completed
    if (myfiletype=="txt") {
		//alert(myajax.responseText)
		document.getElementById("subcat").innerHTML = myajax.responseText			
	}
  }
}


function check_existance(mail_id) {
		var getstr ='id=' + encodeURI(mail_id) +'&sid='+Math.random();
		//alert(getstr)		
		ajaxpack.postAjaxRequest("check_exist.php", getstr, display_existance, "txt", '');
	}
function display_existance() {
  var myajax = ajaxpack.ajaxobj
  var myfiletype = ajaxpack.filetype
  var products_page = ajaxpack.callback_parameter;
  if (myajax.readyState == 4){ //if request of file completed
    if (myfiletype=="txt") {
		//alert(myajax.responseText);
		if(myajax.responseText!="")
		{
		alert(myajax.responseText);
		document.list.u_id.focus();
		}
		else
		{
        document.list.txiEmail.value=document.list.u_id.value;
		}
		//document.getElementById("subcat").innerHTML = myajax.responseText			
	}
  }
}


