
if (document.getElementById("container")) {
    addLoadEvent(ResizeWidth);
    addLoadEvent(OnmouseoverIE6);
    addLoadEvent(winOpen);
}

function winOpen() {
    if (document.getElementById("subNavMenu")) {
        var ins = document.getElementById("subNavMenu").getElementsByTagName("li");
        for(var i = 0; i < ins.length; i++) {
            if (ins[i].id.search('subMenuNotSel20_')!= -1) {
                var l20 = ins[i].getElementsByTagName("a");
                //reservation inquiries
                ins[i].onmouseover = function(){roll(this);popup(l20[0]);}
            }
            if (ins[i].id.search('subMenuNotSel29_')!= -1) {
                var l29 = ins[i].getElementsByTagName("a");
                //newsletter
                ins[i].onmouseover = function(){roll(this);popup(l29[0]);};
            }
	            if (ins[i].id.search('subMenuNotSel28_')!= -1) {
                var l28 = ins[i].getElementsByTagName("a");
                //contactus
                ins[i].onmouseover = function(){roll(this);popup(l28[0]);};
            }
        }
  
    }
}




function popup(o) {
   
    //if (o.href) {
   
        
        o.onclick = function () {
            window.open(o.href, "", "width=600, height=800, top=20, left=20, scrollbars=1");
            o.removeAttribute("href");
            o.setAttribute("href", o.href);
        }
      
        //o.setAttribute("onClick", 'window.open("' + o.href + '"," ", "width=600, height=800, top=20, left=20, scrollbars=1")');
        //o.removeAttribute("href");

    //}
}

function ResizeWidth() {
    var iWidth, clientWidth;
    if (document.documentElement.clientWidth){iWidth = document.documentElement.clientWidth;}
    else if (window.innerWidth){iWidth = window.innerWidth;}
    iWidth = Math.max(972, iWidth);
    if (iWidth>972) {iWidth = Math.min(1280, (iWidth));}
    document.getElementById("container").style.width = (iWidth - 526 + 469) + 'px';
    document.getElementById("right").style.width = (iWidth - 526) + 'px';     
} 

function OnmouseoverIE6() {
    
    if (document.getElementById("mainMenu")) {
        li = document.getElementById("mainMenu").childNodes;
        i=0;
        while(li[i]){
            li[i].onmouseover=function(){roll(this);};
            li[i].onmouseout=function(){roll(this);};
            i++;
        
        } 
    }
    if (document.getElementById("childNodes")) {
        var ins = document.getElementById("childNodes").getElementsByTagName("li");
        for(var i = 0; i < ins.length; i++) {
            ins[i].onmouseover=function(){rollChildNodes(this);};
            ins[i].onmouseout=function(){rollChildNodes(this);};
        }
    }
    if (document.getElementById("subNavMenu")) {
        var ins = document.getElementById("subNavMenu").getElementsByTagName("li");
        for(var i = 0; i < ins.length; i++) {
            
            ins[i].onmouseover=function(){roll(this);};

            
            ins[i].onmouseout=function(){roll(this);};
            
        }
    }
}

function roll(o) {
    var matchPos = o.className.search(o.id + '_hover');
    if(matchPos != -1) {
        o.className = o.className.replace(' ' + o.id + '_hover', '');
    } else {
        o.className += ' ' + o.id + '_hover';
    }
}

function rollChildNodes(o) {
    var matchPos = o.className.search(' subMenu_hover');
    if(matchPos != -1) {
        o.className = o.className.replace(' subMenu_hover', '');
    } else {
        o.className += ' subMenu_hover';
    }
}

if(typeof sIFR == "function"){
	sIFR.replaceElement(named({sSelector:"#fixed h1", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#FEFFFF", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", sWmode:"transparent", sFlashVars:""}));
    sIFR.replaceElement(named({sSelector:"#contentwo h1", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#FEFFFF", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", sWmode:"transparent", sFlashVars:""}));
    sIFR.replaceElement(named({sSelector:"#contentwo h2", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#E0C373", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", sWmode:"transparent", sFlashVars:""}));
    sIFR.replaceElement(named({sSelector:"#content h2", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#E0C373", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", sWmode:"transparent", sFlashVars:""}));
    sIFR.replaceElement(named({sSelector:"#fixed h2", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#E0C373", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", sWmode:"transparent", sFlashVars:""}));

    sIFR.replaceElement(named({sSelector:"#childNodes li", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#000000", sLinkColor:"#E4C372", sBgColor:"#000000", sHoverColor:"#E4C372", sWmode:"transparent", sFlashVars:""}));
	sIFR.replaceElement(named({sSelector:"#fixed #newsModHeadTitle", sFlashSrc:"/sIFR-2.0.7/clarendon.swf", sColor:"#FEFFFF", sLinkColor:"#000000", sBgColor:"#000000", sHoverColor:"#000000", sWmode:"transparent", sFlashVars:""}));
	sIFR.replaceElement(named({ sSelector: ".center h1", sFlashSrc: "/sIFR-2.0.7/clarendon.swf", sColor: "#FEFFFF", sLinkColor: "#000000", sBgColor: "#000000", sHoverColor: "#000000", sWmode: "transparent", sFlashVars: "" }));

};