

function FormToGetReq(submit_type){


	//Init Prepare listval --
	x_rows = 1;
	y_rows = 3;
	form_lst = new Array(x_rows);
	for(i=0;i<x_rows;i++){
		form_lst[i] = new Array(y_rows);
	}
	form_lst_wk = new Array(x_rows);
	//------------------------


	//Define val ---------------------
	form_lst[0]["value"]      = document.listdat.item_maker_number.value;
	form_lst[0]["qry_name"]   = "mn";
	//--------------------------------


	//URL Encord
	qry="";
	for(i=0; i<form_lst.length; i++){
		if (form_lst[i]["value"]!=null){
			str        = form_lst[i]["value"];
			str_urlenc = encodeURIComponent(str);
			qry += form_lst[i]["qry_name"] + "=" + str_urlenc + "&";
		}
	}

//alert(qry);
	url = "listdat.php?"+qry;
	if (submit_type==0){
		location.href = "listdat.php?"+qry;
	}else{
		setTimeout( "window.location.href=url", 100 );
	}

	return false;

}


function FormToGetReq_2(submit_type){

	//Init Prepare listval --
	x_rows = 3;
	y_rows = 3;
	form_lst = new Array(x_rows);
	for(i=0;i<x_rows;i++){
		form_lst[i] = new Array(y_rows);
	}
	form_lst_wk = new Array(x_rows);
	//------------------------


	//Define val ---------------------
	form_lst[0]["value"]      = document.listdat_2.item_ctgry.value;
	form_lst[0]["qry_name"]   = "ctgset";
	form_lst[1]["value"]      = document.listdat_2.item_ctgry_2.value;
	form_lst[1]["qry_name"]   = "ctgset2";
	form_lst[2]["value"]      = document.listdat_2.item_price.value;
	form_lst[2]["qry_name"]   = "price";
	//--------------------------------


	//URL Encord
	qry="";
	for(i=0; i<form_lst.length; i++){
		if (form_lst[i]["value"]!=null){
			str        = form_lst[i]["value"];
			str_urlenc = encodeURIComponent(str);
			qry += form_lst[i]["qry_name"] + "=" + str_urlenc + "&";
		}
	}

	//alert(qry);
	url = "listdat.php?"+qry;
	if (submit_type==0){
		location.href = "listdat.php?"+qry;
	}else{
		setTimeout( "window.location.href=url", 100 );
	}

	return false;
}


//-----------------------------------------------
function strcmp(str1, str2){
    var ct;
    var cmp;

    if((cmp = str1.length - str2.length) != 0){
        return cmp;
    }

    for(ct = 0; ct < str1.length; ct++) {
        var c1 = str1.charCodeAt(ct);
        var c2 = str2.charCodeAt(ct);
        if((cmp = (c1 - c2)) != 0){
            break;
        }
    }
    return cmp;
}



