function goPage (newURL) {
    // This function is called from the pop-up menus to transfer to
    // a different page. Ignore the value returned is a null string
//alert('HEY ,'+newURL+' !');    
    if (newURL != "") {                
        // skip the menu dividers and reset the menu selection to default
        if (newURL == "-" ) {
            resetMenu();                    
        } else {  
            // send page to designated URL                  
            document.location.href = newURL;
        }
    }
}

function goLanguage (newURL) {
    // This function is called from the pop-up menus to transfer to
    // a different page. Ignore the value returned is a null string
    var length=newURL.indexOf("-");
    var endstring=newURL.substring(length+1);
    var string=newURL.substr(0,length);

    var question_mark=string.indexOf("?");

    if (question_mark== -1){
        var sessionValue = '?language_cookie=';
    }else{
        var lang_mark_1=string.indexOf("?language_cookie");
        if (lang_mark_1 == -1){
            var lang_mark_2=string.indexOf("&language_cookie");
            if (lang_mark_2 == -1){
            }else{
                string=string.substr(0,lang_mark_2);
            }
            var sessionValue = '&language_cookie=';
        }else{
            string=string.substr(0,lang_mark_1);
            var sessionValue = '?language_cookie=';
        }            
    }        

    if (string != "") {              
        // skip the menu dividers and reset the menu selection to default
        if (string == "-" ) {
            resetMenu();                    
        } else {  
            // send page to designated URL
            sessionValue += endstring; 
            document.location.href = string+sessionValue;
        }
    }
}

function resetMenu() {
    // resets the menu selection upon entry to this page
    document.gomenu.selector.selectedIndex = 2;
}

/*************************************
*       Counter for characters in text box
**************************************/

function taLimit() {
    var taObj=event.srcElement;
    if (taObj.value.length==taObj.maxLength*1) return false;
}

function taCount(visCnt) { 
    var taObj=event.srcElement;
    if (taObj.value.length>taObj.maxLength*1) taObj.value=taObj.value.substring(0,taObj.maxLength*1);
    if (visCnt) visCnt.innerText=taObj.maxLength-taObj.value.length;
}

/*************************************
*       End JAVASCRIPTS
*************************************/
