function ConDel(){
	if(confirm('Delete Content Page')){
		return true;
	}else{
		return false;
	}
}

function OpenWindow(URL,WIDTH,HEIGHT){
	windowA = window.open(URL,"windowA","toolbar=no,width="+WIDTH+",height="+HEIGHT+",toolbar=no,menubar=no,status=no,scrollbars=yes,resizable=no");
}

function UsernameTaken(){
	document.getElementById('divError').className='ErrorShow';
	document.getElementById('divError').innerHTML = document.getElementById('divError').innerHTML + '<li>Username already taken</li>';
}

function ConfirmDelete(URL){
	if(confirm('Delete selected item?')){
		window.location.href=URL;
		window.navigate(URL);
	}
}

function ConfirmGrpDelete(URL, CONTENT){
	if(confirm(CONTENT + ' content(s) are associated with this group. Do you still want to delete?')){
		window.location.href=URL;
		window.navigate(URL);
	}
}

function openSubCategory(n, nn) {
    var i = 0
    for(i=1;i<n+1;i++) {
    var sel = document.getElementById('insideSubCategory'+i);
    sel.style.display = 'none';
    }
    var sel = document.getElementById('insideSubCategory'+nn);
    sel.style.display = 'block';
}
function openInsideSubCategory(n, nn) {
    var i = 0
    for(i=1;i<n+1;i++) {
    var sel = document.getElementById('showProducts'+i);
    sel.style.display = 'none';
    }
    var sel = document.getElementById(nn);
    sel.style.display = 'block';
}