var isIe4=false, isDom=false, isMac=false, isNs4=false, isWin=false, isLoaded=false, isIe=false;
var resortList = new Array('li12','li13','li14','li15','li16','li17','li18','li19','li20','li21','li22','li23');
function init()
{
	if (isDom)
	{
		isLoaded=true;
		randomiseResorts();
	}
}

function showMe(divID)
{
	if (isLoaded) document.getElementById(divID).style.display='block';
}

function hideMe(divID)
{
	if (isLoaded) document.getElementById(divID).style.display='none';
}


function randomiseResorts()
{
    useArray = [];
    for(i=0;i<resortList.length;i++)
    {
        hideMe(resortList[i]);
    }
    
    rNum = Math.floor(Math.random()* resortList.length);
    useArray.push(resortList[rNum]);
    resortList.splice(rNum,1);
    
    rNum1 = Math.floor(Math.random()* resortList.length);
    useArray.push(resortList[rNum1]);
    resortList.splice(rNum1,1);

    rNum2 = Math.floor(Math.random()* resortList.length);
    useArray.push(resortList[rNum2]);
    resortList.splice(rNum2,1);   

    //convert LIs to absolute positioning based on position in useArray
    
    document.getElementById(useArray[0]).style.left='0px';
    document.getElementById(useArray[1]).style.left='210px';
    document.getElementById(useArray[2]).style.left='420px';
    
    for(i=0;i<useArray.length;i++)
    {
        showMe(useArray[i]);
    }    
}

isMac=(navigator.platform=="MacPPC")? true:false;
isWin=(navigator.appVersion.indexOf("Win")!=-1)? true:false;
isIe=(navigator.appName=="Microsoft Internet Explorer")? true:false;
isIe4=(document.all)? true:false;
isDom=(document.getElementById)? true:false;
if ((parseInt(navigator.appVersion)==4) && (navigator.appName=="Netscape"))
{
	isNs4 = true;
	isImg = true;
}
window.onload=init;
