// BPG JavaScript File





// Status Bar Message

function Flash() {

	var message="click the BPG title bar to go home!";
	window.status=message;

        checkbg();

        if (top.frames.length != 0 ) {
          top.location = document.location;}
}






// On Mouse Over

// Preloads the images

if (document.images)
    {
    img1on = new Image(200, 28);          
    img1on.src = "/images/menus/menu-about-us-on.gif";
    img2on = new Image(200, 28); 
    img2on.src = "/images/menus/menu-tour-sug-on.gif";
    img3on = new Image(200, 28);          
    img3on.src = "/images/menus/menu-enquiries-on.gif";
    img4on = new Image(200, 28); 
    img4on.src = "/images/menus/menu-booking-on.gif";
    
    img1off = new Image(200, 28);          
    img1off.src = "/images/menus/menu-about-us-off.gif";
    img2off = new Image(200, 28); 
    img2off.src = "/images/menus/menu-tour-sug-off.gif";
    img3off = new Image(200, 28);          
    img3off.src = "/images/menus/menu-enquiries-off.gif";
    img4off = new Image(200, 28); 
    img4off.src = "/images/menus/menu-booking-off.gif";
    
    }


// Swaps target image with alternative target src on mouse over

function imgAct(imgName,action)
    {
    if (document.images)
        document.images[imgName].src = eval(imgName + action + ".src");
    }




// Cookie For Background Colour

var x;
var tob=0;

var d=new Date();
d.setTime(d.getTime()+(1000*60*60*24*30));
var thecookie;
var fgcookie;

function checkbg()
{
if(document.cookie.indexOf("bgcolor")!=-1)
	{
	thecookie=document.cookie;
	var cut=thecookie.indexOf("bgcolor=");
	var color=thecookie.substring(cut+8,cut+15);
	document.bgColor=color;
	}
}

function create(x)
{
createbg(x)
}

function createbg(x)
{
if(document.cookie.indexOf("bgcolor")==-1 && tob==0)
	{
	document.cookie="bgcolor="+x+";expires="+d.toGMTString();
	document.bgColor=x;
	}
else if(tob==0)
	{
	document.cookie="bgcolor="+x+";expires="+d.toGMTString();
	thecookie=document.cookie;
	document.bgColor=x;
	}
}