function changeSelection(k){
	document.dbSession.loadType[k].checked="true"
	removeLocal();
}

function removeLocal(){
	if (!document.dbSession.loadType[1].checked) {
		document.dbSession.sqlScript.disabled="true";
	} else {
		document.dbSession.sqlScript.disabled=false;
	}
}

function enableHTML(){
	var theForm = document.dbSession
	if (theForm.recordset.checked){
		theForm.allowHTML.disabled = false
	}else{
		theForm.allowHTML.disabled = true
		theForm.allowHTML.checked = false
	}
}
function syntaxChecking(){
	var theForm = document.dbSession
	if (theForm.syntax.checked){
		theForm.failsafe.disabled = true
	}else{
		theForm.failsafe.disabled = false
	}
}	
function ResizeTextArea(){
	var TextArea = document.dbSession.body;
	var sX = document.body.clientWidth;
	var sY = document.body.clientHeight;
	TextArea.cols = (((sX / 8) - 5)<10)?50:(sX / 8) - 5
	TextArea.rows = ((sY / 35)<2)?10:sY / 35
}	

function transac(str){
	var theForm = document.dbSession
	if(confirm(str)){
		if (theForm.syntax.checked||(!theForm.failsafe.disabled && theForm.failsafe.checked)) theForm.action = "dbmanager.asp"; else theForm.action = "dbmanager1.asp";
		return true;		
	}else{
		return false;
	}
}

function querydb(){
	var theform = document.dbSession
	if(confirm("Execute the queries against your database? \(Click &quot;OK&quot; to continue\) \n\nThis action cannot be undone by this software. \(Click &quot;Cancel&quot; to abort\)\n\nIf you use this software to run queries not supplied by ASPPlayground.NET, we will not provide any support to you.")){
		return true;
	}else{
		return false;
	}
}