function yesno(message) {
  var Check = confirm(message);
 	if(Check == true) 
  	return true;
	else
 		return false;
} //function yesno(message)

function CtrlCheckbox(pslayer,hollayer,labelbss,labelps,labelsis,labelhol,checkedBss,checkedPs,checkedSis,checkedHol) {
	var mySelect = document.getElementById('layer');
	$('#checklayers').remove();
	$('#layerchoose').append('<span id="checklayers"></span>');
	if (mySelect.value == 'GW') {
		$('#checklayers').append('<input type="checkbox" id="cbxbss" name="only_bss" value="1" class="px12" '+checkedBss+' onclick=OnlyCheckbox("cbxbss");><label id="lblbss" class="bssspecialists" for="bssspecialists"><b>'+labelbss+'</b></label><br />');
		if(pslayer == true) {
			$('#checklayers').append('<input type="checkbox" id="cbxps" name="only_ps" value="1" class="px12" '+checkedPs+' onclick=OnlyCheckbox("cbxps");><label id="lblps" class="psspecialists" for="psspecialists"><b>'+labelps+'</b></label>');
		}
		if(targetUrlGW != "<ERROR>" && modeStatus == "standalone") {
			window.parent.location.href = targetUrlGW;
		}
		if(modeStatus != "standalone" && targetUrlGW != "<ERROR>") {
			window.opener.location.href = targetUrlGW;
			  window.close();
		}
	}
	else if (mySelect.value == 'HW') {
		$('#checklayers').append('<input type="checkbox" id="cbxsis" name="only_sis" value="1" class="px12" '+checkedSis+' ><label id="lblsis" class="bssspecialists" for="bssspecialists"><b>'+labelsis+'</b></label><br>');
		if(targetUrlHW != "<ERROR>" && modeStatus == "standalone") {
			window.parent.location.href = targetUrlHW;
		}
	}
	else if (mySelect.value == 'AC') {
		if(hollayer == true) {
			$('#checklayers').append('<input type="checkbox" id="cbxhol" name="only_hol" value="1" class="px12" '+checkedHol+' ><label id="lblhol" class="bssspecialists" for="bssspecialists"><b>'+labelhol+'</b></label><br>');		
		}
		if(targetUrlAC != "<ERROR>" && modeStatus == "standalone") {
			window.parent.location.href = targetUrlAC;
		}
		if(modeStatus != "standalone" && targetUrlAC != "<ERROR>") {
			window.opener.location.href = targetUrlAC;
			  window.close();
		}
	}else  if(mySelect.value == 'LG') {
		if(targetUrlLG != "<ERROR>" && modeStatus == "standalone") {
			window.parent.location.href = targetUrlLG;
		}
	}else  if(mySelect.value == 'ACDIY') {
		if(targetUrlACDIY != "<ERROR>" && modeStatus == "standalone") {
			window.parent.location.href = targetUrlACDIY;
		}
	}  
} //function CtrlCheckbox() 

function OnlyCheckbox(id) {
	if(document.getElementById(id).checked == true) {
		if(id == 'cbxps') {
			document.getElementById('cbxbss').checked = false;
		}
		if(id == 'cbxbss') {
			document.getElementById('cbxps').checked = false;
		}
	}
} //function OnlyCheckbox()


