/**
 * @author at
 */
window.onload = init;
function init(){
	document.getElementById('radio2').onclick = checkRadio;
	document.getElementById('radio1').onclick = deCheckRadio;
	document.getElementById('radio1').checked = 'checked';	
	var loader = new net.ContentLoader('url'+ params,onReadyState);
}
var size = 2;
var params;
function getData(){
	doorType = document.getElementById('doorType').options[document.getElementById('doorType').selectedIndex].value;
	outFurnish = document.getElementById('outFurnish').options[document.getElementById('outFurnish').selectedIndex].value;
	inFurnish = document.getElementById('inFurnish').options[document.getElementById('inFurnish').selectedIndex].value;
	lockType = document.getElementById('lockType').options[document.getElementById('lockType').selectedIndex].value;
	lockModel = document.getElementById('lockModel').options[document.getElementById('lockModel').selectedIndex].value;
	params = '$doorType='+ doorType+'&outFurnish='+ outFurnish +'&inFurnish='+ inFurnish +'&lockType='+ lockType +'&lockModel='+ lockModel +'$size='+ size;
}
function checkRadio(){	
	var hSize = document.getElementById('height');
	hSize.disabled = false;
	hSize.style.background = "white";
	hSize.style.color = "black";
	var wSize = document.getElementById('width');
	size = (hSize * wSize)/ 1000000;
	wSize.disabled = false;
	wSize.style.background = "white";
	wSize.style.color = "black";	
}
function deCheckRadio(){
	size = 2;
	var hSize = document.getElementById('height');
	hSize.disabled = true;
	hSize.style.background = "#f5f5f5";
	hSize.style.color = "#b2b2b2";
	var wSize = document.getElementById('width');
	wSize.disabled = true;
	wSize.style.background = "#f5f5f5";
	wSize.style.color = "#b2b2b2";	
}

