function open_new_window(url)
{ 
new_window = window.open(url,'window_name','toolbar=0,menubar=0,resizable=0,dependent=0,status=0,width=400,height=300,left=200,top=200')
}


function radio_active(radio_group) {

    // Run through the group
    for (counter = 0; counter < radio_group.length; counter++) {

        // When we find the activated button, return the index
        if (radio_group[counter].checked) {
            return counter
        }
    }
    // If no button is activated, return -1
    return -1
}


function get_radio_value(radio_group) {

    // Get the index of the activated button
    var radio_index = radio_active(radio_group)

    // If a button is activated, display its value in the text box
    if (radio_index >= 0) {
        return radio_group[radio_index].value
    }
}


if (document.getElementById){ //DynamicDrive.com change
document.write('<style type="text/css">\n')
document.write('.submenu{display: none;}\n')
document.write('</style>\n')
}

function SwitchMenu(obj){
	if(document.getElementById){
	var el = document.getElementById(obj);
	var ar = document.getElementById("masterdiv").getElementsByTagName("span"); //DynamicDrive.com change
		if(el.style.display != "block"){ //DynamicDrive.com change
			for (var i=0; i<ar.length; i++){
				if (ar[i].className=="submenu") //DynamicDrive.com change
				ar[i].style.display = "none";
			}
			el.style.display = "block";
		}else{
			el.style.display = "none";
		}
	}
}
