
// Bookmark English


function setBookmark(url,str){
if(str=='')str=url;
if (document.all)window.external.AddFavorite(url,str);
else alert('Please press CTRL and D to add a bookmark to:\n"'+url+'".');
} 



// Bookmark  Welsh


function setBookmarkW(url,str){
if(str=='')str=url;
if (document.all)window.external.AddFavorite(url,str);
else alert('Pwyswch CTRL a D i ychwanegu nod tudalen i:\n"'+url+'".');
} 





// Language Swap to Welsh



    function switchURL(){

    var endPart = "";
    var url = location.href;
    if (url.indexOf('#') > -1){
    endPart = url.substr(url.indexOf('#'),url.length);
    url = url.substr(0,url.indexOf('#'));

    }


    if (url.substr(url.length-1,1) == '/'){
            location.href = url + 'index-w.shtml' + endPart;
            return 0;
    }

    if (url.substr(url.length-13,13) == 'index-w.shtml'){

            location.href = url.replace('index-w.shtml','') + endPart ;
            return 0;
    }


    if (url.indexOf('-w.') == -1){
            location.href = url.replace('.shtml','-w.shtml') + endPart;
            return 0;
    }else{
            location.href = url.replace('-w.shtml','.shtml') + endPart;
            return 0;

    }

    }




// Language Swap to English


function switchURLW(){

var url = location.href;

if (url.indexOf('-w.') == -1){
	url = url.replace('.shtml','-w.shtml');
}else{
	url = url.replace('-w.shtml','.shtml');

}
location.href = url;
}




// POPUPS

function goImgWin(myImage,myWidth,myHeight,
origLeft,origTop) {
myHeight += 50;
myWidth += 30;
TheImgWin = window.open(myImage,'image','height=' +
myHeight + ',width=' + myWidth +
',toolbar=no,directories=no,status=no,' +
'menubar=no,scrollbars=no,resizable=no');
TheImgWin.resizeTo(myWidth+2,myHeight+30);
TheImgWin.moveTo(origLeft,origTop);
TheImgWin.focus();
}



//  Drop Down Menus


startList = function() {
if (document.all&&document.getElementById) {
navRoot = document.getElementById("navlist");
for (i=0; i<navRoot.childNodes.length; i++) {
node = navRoot.childNodes[i];
if (node.nodeName=="LI") {
node.onmouseover=function() {
this.className+=" over";
  }
  node.onmouseout=function() {
  this.className=this.className.replace(" over", "");
   }
   }
  }
 }
}
window.onload=startList;
