function initBoxes(box1,box2) {
	var strObjectA = document.getElementById(box1);
	var strObjectB = document.getElementById(box2);
	for (i=0; i < attwiz.length; i++) {
		var x = document.createElement('option');
		var y = document.createTextNode(attwiz[i]['brand']);
		if (window.attachEvent) { // for IE
			x.setAttribute('value',y.nodeValue);
		}
		x.appendChild(y);
		strObjectA.appendChild(x);
	}
	strObjectA.onchange = function (){
		if(strObjectA.value != '') {
			var list = document.getElementById(box2);
			while (list.childNodes[0]) {
				list.removeChild(list.childNodes[0]);
			}
			fillBox2(strObjectB,strObjectA.value );
		}
	}
	fillBox2(strObjectB,strObjectA.value);
}

function fillBox2(box2,tmpObjectA) {
	var brow =navigator.appVersion;
	for (i=0; i < attwiz.length; i++) {
		if (attwiz[i]['brand'] == tmpObjectA) {
			var strObjectB = attwiz[i]['model'];
		}
	}
	if (strObjectB) {
		for (i=0; i < strObjectB.length; i++) {
			
			if (brow.search(/MSIE 7.0/) != -1) {
				var option = document.createElement("option");
				option.setAttribute("value",strObjectB[i]);
				option.setAttribute("text",strObjectB[i]);
				box2.add(option);
			} else {
				var x = document.createElement('option');
				var y = document.createTextNode(strObjectB[i]);
				x.appendChild(y);
				box2.appendChild(x);
			}

		}
	}
}


