//function jumpTo(URL_List)
//{
//var URL = URL_List.options[URL_List.selectedIndex].value;
//window.location.href = URL;            
//}

function jumpTo(Option_List) {
    var GCxx = Option_List.options[Option_List.selectedIndex].value;   // asssumes 4 characters like GC01
    var URL = window.location.href;

    window.location.href = replaceGCNumber(URL, GCxx);
}

// URL example: http://www.iaea.org/About/Policy/GC/GC53/Documents/index.html 
// purpose : replace GC53 with GCXX passed as a parameter. If not, returns the same URL
function replaceGCNumber(URL, GCXX) {
    var pos2;
    var ln = URL.length;
    var pos1 = URL.indexOf("GC/GC");
    //alert(GCXX + " : " + URL);
    if (pos1 > 0) {
        pos1 = pos1 + 3;
        pos2 = pos1 + 4;
        URL = URL.substr(0, pos1) + GCXX + URL.substr(pos2, ln);
    }
    //alert("--->" + pos1 + "," + pos2 + " : " + URL);
    return (URL);
}

function setSelectedGC() {
    var URL = window.location.href;
    var pos1 = URL.indexOf("GC/GC");

    var GCxx = URL.substr(pos1 + 3, 4);
    //var optionList = document.body.getElementsByName("gcCode");
    var optionList = document.body.getElementsByTagName("option");

    //	alert("optionList=" + optionList.length);
    //	var out = GCxx + ": ";

    for (var i in optionList) {
        //  out = out + "->" + optionList[i].value;
        if (optionList[i].value == GCxx) {
            optionList[i].selected = true;
            break;
        };
    }

    //	alert(out);

    return (0);
}


