//Gather Browser details
var agt = navigator.userAgent.toLowerCase()+" ";
var ie4 = (document.all && !document.getElementById) ? true : false;
var ns4 = (document.layers) ? true : false;
var ie5 = (document.all && document.getElementById) ? true : false;
var ns6 = (document.getElementById && !document.all) ? true : false;
var mac = (agt.indexOf("mac")!=-1);


//Handle the Primary Navigation rollover effects...
function pNavOn(cell_id) {
	a$ = "pNavCell_" + cell_id;
	document.getElementById(a$).style.background="#e5e5e5";
}

function pNavOff(cell_id) {
	a$ = "pNavCell_" + cell_id;
	document.getElementById(a$).style.background="#f2f2f2";
}

function pNavOff2(cell_id) {
	a$ = "pNavCell_" + cell_id;
	document.getElementById(a$).style.background="#e5e5e5";
}

//Handle the Secondary Navigation rollover effects...
function sNavOn(cell_id) {
	a$ = "sNavCell_" + cell_id;
	document.getElementById(a$).style.background="#d9d9d9";

}

function sNavOff(cell_id) {
	a$ = "sNavCell_" + cell_id;
	document.getElementById(a$).style.background="#e5e5e5";
}

function sNavOn2(cell_id) {
	a$ = "sNavCell_" + cell_id;
	document.getElementById(a$).style.background="#d9d9d9";
}

function sNavOff2(cell_id) {
	a$ = "sNavCell_" + cell_id;
	document.getElementById(a$).style.background="#d9d9d9";
}

	
//Show the required layer, given whicheverr platform it is being used on 
function showLayer(n) {
	initialiseLayers();
	if (ns4) {document.layers[n].visibility = "show";}
	if (ie4 || ie5){document.all[n].style.visibility = "visible";}
	if (ns6){document.getElementById(n).style.visibility = "visible";}
}

//Hide the required layer, given whicheverr platform it is being used on 
function resetLayer(layerToHide) {
	if (ns4) {document.layers[layerToHide].visibility = "hide";}
	if (ie4 || ie5) {document.all[layerToHide].style.visibility = "hidden";}
	if (ns6) document.getElementById(layerToHide).style.visibility = "hidden";
}

//Initialise all the layers (i.e. hide them all)
function initialiseLayers(){
	resetLayer('layer_1');
	resetLayer('layer_2');
	resetLayer('layer_3');
}

//Performs the RESIZE and MOVE function for a window. PLace one of the following lines in the SCRIPT at the top of the page.
//tmt_winManage('self','resizeTo','800','600');		TO RESIZE
//tmt_winManage('self','moveTo','0','0');   TO MOVE
function tmt_winManage(id,c,x,y){
	var d=eval(id)==null||eval(id+".closed");
	if(!d){eval(id+"."+c+"("+x+","+y+")");}
}



function textNav () {
document.write("<DIV CLASS='textNav'>[1] <A HREF='../index.htm' CLASS='textNav'>home</A> | <A HREF='../about.htm' CLASS='textNav'>about</A> | <A HREF='../portraiture.htm' CLASS='textNav'>portraiture</A> | <A HREF='../weddings.htm' CLASS='textNav'>weddings</A> | <A HREF='../misc.htm' CLASS='textNav'>miscellaneous</A> | <A HREF='../contact.htm' CLASS='textNav'>contact</A> </DIV>");
}

function textSubNav1 () {
document.write("<DIV CLASS='textSubNav'>[2] <A HREF='../about_1.htm' CLASS='textSubNav'>background</A> | <A HREF='index.htm' CLASS='textSubNav'>kktour</A> | <A HREF='../about_3.htm' CLASS='textSubNav'>new media</A> |  <A HREF='../about_4.htm' CLASS='textSubNav'>downloads</A></DIV>");
}

function textTerNav11 () {
document.write("<DIV CLASS='textSubNav'>[3] <A HREF='index.htm' CLASS='textSubNav'>kktour</A> | <A HREF='mexico.htm' CLASS='textSubNav'>mexico</A> | <A HREF='brazil.htm' CLASS='textSubNav'>brazil</A> | <A HREF='paraguay.htm' CLASS='textSubNav'>paraguay</A> | <A HREF='argentina.htm' CLASS='textSubNav'>argentina</A> | <A HREF='bolivia.htm' CLASS='textSubNav'>bolivia</A> | <A HREF='peru.htm' CLASS='textSubNav'>peru</A> | <A HREF='ecuador.htm' CLASS='textSubNav'>ecuador</A> | <A HREF='chile.htm' CLASS='textSubNav'>chile</A> | <A HREF='easterisland.htm' CLASS='textSubNav'>easter island</A> | <A HREF='newzealand.htm' CLASS='textSubNav'>new zealand</A> | <A HREF='australia.htm' CLASS='textSubNav'>australia</A> | <A HREF='thailand.htm' CLASS='textSubNav'>thailand</A></DIV>");
}


function textNavb () {
document.write("<DIV CLASS='textNav'>[1] <A HREF='../../../index.htm' CLASS='textNav'>home</A> | <A HREF='../../../about.htm' CLASS='textNav'>about</A> | <A HREF='../../../portraiture.htm' CLASS='textNav'>portraiture</A> | <A HREF='../../../weddings.htm' CLASS='textNav'>weddings</A> | <A HREF='../../../misc.htm' CLASS='textNav'>miscellaneous</A> | <A HREF='../../../contact.htm' CLASS='textNav'>contact</A> </DIV>");
}

function textSubNav1b () {
document.write("<DIV CLASS='textSubNav'>[2] <A HREF='../../../about_1.htm' CLASS='textSubNav'>background</A> | <A HREF='../../index.htm' CLASS='textSubNav'>kktour</A> | <A HREF='../../../about_3.htm' CLASS='textSubNav'>new media</A> |  <A HREF='../../../about_4.htm' CLASS='textSubNav'>downloads</A></DIV>");
}

function textTerNav11b () {
document.write("<DIV CLASS='textSubNav'>[3] <A HREF='../../index.htm' CLASS='textSubNav'>kktour</A> | <A HREF='../../mexico.htm' CLASS='textSubNav'>mexico</A> | <A HREF='../../brazil.htm' CLASS='textSubNav'>brazil</A> | <A HREF='../../paraguay.htm' CLASS='textSubNav'>paraguay</A> | <A HREF='../../argentina.htm' CLASS='textSubNav'>argentina</A> | <A HREF='../../bolivia.htm' CLASS='textSubNav'>bolivia</A> | <A HREF='../../peru.htm' CLASS='textSubNav'>peru</A> | <A HREF='../../ecuador.htm' CLASS='textSubNav'>ecuador</A> | <A HREF='../../chile.htm' CLASS='textSubNav'>chile</A> | <A HREF='../../easterisland.htm' CLASS='textSubNav'>easter island</A> | <A HREF='../../newzealand.htm' CLASS='textSubNav'>new zealand</A> | <A HREF='../../australia.htm' CLASS='textSubNav'>australia</A> | <A HREF='../../thailand.htm' CLASS='textSubNav'>thailand</A></DIV>");
}

