//== mybiogazelle javascripts ==================================================================

function setInputStyle(theid, onoff){
	if(onoff==1){
		document.getElementById(theid).style.background="#e2e7bd";
		document.getElementById(theid).select();
	}
	if(onoff==2){
		document.getElementById(theid).style.background="white";
	}
}

function typeChange(){
	var type = document.getElementById('licensetype');
	
	getCurrentPrice1();
}

//== getCurrentPrice(); ====================================================================

function getCurrentPrice1(){
	var type = document.getElementById('licensetype');
	var product = document.getElementById('product');
	
	if(type.selectedIndex!=undefined){
		var typeid = type.options[type.selectedIndex].value;
	} else {
		var typeid = type.value;
	}
	
	var url = "getCurrentPrice.php?l_id="+typeid+"&p_id="+product.value;
	makeHttpRequest(url,"alertCurrentPrice",false);
}

function alertCurrentPrice(output){
	var cprice = document.getElementById('currentprice');
	cprice.value = output;
}

function getDownload(file){
	var url = "getFileDownload.php?file="+file;
	makeHttpRequest(url,"alertFileDownload",false);
}

function alertFileDownload(output){
	//-alert(output);
}

function checkAgree(obj){
	var thebtn = document.getElementById("agreebtn");
	var thechk = document.getElementById("agreechk");
	if(thechk.checked){
		thebtn.disabled=false;
	} else {
		thebtn.disabled=true;
	}
}