/**
*	phone Search Combo
*/
var scrollNumber = 0;
var arrPhoneModel = new Array;
var arrPhoneLength = 0;

function selectSeriesPhoneListDWR(data) {	
	var seriesPhoneModel = document.getElementById("seriesPhoneModel");
	createSeriesOption(seriesPhoneModel, data);
}
function clearSelectBox(selectBox)
{
    if (null == selectBox || null == selectBox.options){
        return;
    }
    var length = selectBox.options.length;
    selectBox.options.length = 0;
}

function createSeriesOption(selectBox,category)
{	
	if(category.length > 0) {
		arrPhoneLength = category.length;
	}else {
		arrPhoneLength = 0;
	}
	arrPhoneModel = new Array;
	arrPhoneName = new Array;	
    if (null == category) return;

    clearSelectBox(selectBox);
    alert(category.length);
	if(category.length > 0) {		 
		for(var i=0; i < category.length; i++) {
	        var option = new Option();
	        option.id = category[i].phoneModel;
	        option.value = category[i].phoneName;
	        selectBox.options.add(option);
		}
	}else {
		arrPhoneModel[0] = "Phone Name";		
        var option = new Option();
        option.id = "";
        option.value = "";
        option.text = arrPhoneModel[0];
        selectBox.options.add(option);
	}

    scrollNumber = 0;
}

function selectSeriesPhoneModel() {
	var seriesPhoneModel = document.getElementById("seriesPhoneModel").selectedIndex;
	
	if(seriesPhoneModel == ""){
		return;
	}	
	
	location.href="/ENG/mobile/"+document.getElementById("seriesPhoneModel").options[seriesPhoneModel].value;
}
/**
*	phoneSearch Combo end
*/