function goTo(s) {
document.location = s;
}

function selectFunction(s) {
	eval( s );
}

function deleteImage() {
    radioBtn = document.forms[0].par;
        oneSelected = false
        for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
            //if the last char is an = then you have no image
            bitofstring = valOfLink.substring(valOfLink.length-1)
            if (bitofstring=="=") {
                alert("No image associated with this Section...");
            } else {
            	reply = confirm("You really want to delete this image");
                if (reply == true) {
                    document.location = "imageEdit.asp?mode=delete&"+valOfLink;
                }
	            return false;
            }
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function deleteWordDoc() {
    radioBtn = document.forms[0].par;
    oneSelected = false
    for (i=0; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
            	reply = confirm("You really want to delete this document");
                if (reply == true) {
                    document.location = "docDeleteOK.asp?"+valOfLink;
                }
	            return false;
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function editImage() {
    radioBtn = document.forms[0].par;
	if (radioBtn.length == 2) {	// there is only one real button so selection is uneccessary...
			valOfLink = radioBtn[1].value;
			document.location = "imageEdit.asp?"+valOfLink;
			return false;
	}

        oneSelected = false
        for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
                document.location = "imageEdit.asp?"+valOfLink;
	            return false;
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function editImageLink() {
    radioBtn = document.forms[0].par;
        oneSelected = false
        for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
            //if the last char is an = then you have no image
            bitofstring = valOfLink.substring(valOfLink.length-1)
            if (bitofstring=="=") {
                alert("No image associated with this section...");
            } else {
                document.location = "imageEditURL.asp?"+valOfLink;
	            return false;
            }
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function editImageAlign() {
    radioBtn = document.forms[0].par;
        oneSelected = false
        for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
            //if the last char is an = then you have no image
            bitofstring = valOfLink.substring(valOfLink.length-1)
            if (bitofstring=="=") {
                alert("No image associated with this section...");
            } else {
                document.location = "imageEditAlign.asp?"+valOfLink;
	            return false;
            }
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function editImageSize() {
    radioBtn = document.forms[0].par;
        oneSelected = false
        for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
            //if the last char is an = then you have no image
            bitofstring = valOfLink.substring(valOfLink.length-1)
            if (bitofstring=="=") {
                alert("No image associated with this section...");
            } else {
                document.location = "imageEditSize.asp?"+valOfLink;
	            return false;
            }
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function deletePara() {
    radioBtn = document.forms[0].par;
    oneSelected = false
    for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
            	reply = confirm("You really want to delete this section");
                if (reply == true) {
                    document.location = "paraDeleteOK.asp?"+valOfLink;
                }
	            return false;
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function editPara() {
    radioBtn = document.forms[0].par;
    oneSelected = false
    for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
                document.location = "paraEdit.asp?"+valOfLink;
	            return false;
        }
    }
	if (radioBtn.length == 2) {	// there is only one real button so selection is uneccessary...
		        valOfLink = radioBtn[1].value;
                document.location = "paraEdit.asp?"+valOfLink;
	            return false;
	}
    else if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}


function attachWordDoc() {
    radioBtn = document.forms[0].par;
	if (radioBtn.length == 2) {	// there is only one real button so selection is uneccessary...
			valOfLink = radioBtn[1].value;
			document.location = "attachDoc.asp?"+valOfLink;
			return false;
	}

        oneSelected = false
        for (i=0; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
                document.location = "attachDoc.asp?"+valOfLink;
	            return false;
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}


function addNewPara(){
    radioBtn = document.forms[0].par;
    if (radioBtn.length == 2) {	// there is only one real button so selection is uneccessary...
		        valOfLink = radioBtn[1].value;
                document.location = "paraAdd.asp?"+valOfLink;
	            return false;
	}
	oneSelected = false
    for (i=1; i<radioBtn.length;i++){
        if (radioBtn[i].checked == true) {
            oneSelected = true
            valOfLink = radioBtn[i].value;
                document.location = "paraAdd.asp?"+valOfLink;
	            return false;
        }
    }
    if (!oneSelected) {
        alert("You must first select one of the sections by clicking one of the radio buttons.");
    }
}

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

