// creating a button-like motion

function but_dwn(id)
{
var nodeObj = document.getElementById(id);
nodeObj.style.border = '2px inset #999999';
}
function but_up(id)
{
var nodeObject = document.getElementById(id);
nodeObject.style.border = '2px outset #EAE4B4';
}
function but_delay(id)
{
eval("setTimeout(\"but_up('" + id +"')\",100)");
}

//**** Bring object into or out of view!

function view(id,v)
	{
		var nodeObj =  window.top.document.getElementById(id);
		nodeObj.style.visibility = v;
	}

//**** Change background color

function chg_bc(id,c)
	{
		var nodeObj = document.getElementById(id);
		nodeObj.style.backgroundColor = c;
	}

//**** Control display of object!

function show(id,v)
	{
		var nodeObj = document.getElementById(id);
		nodeObj.style.display = v;
	}

//**** Change text size!

function chg_txt(id,ts)
	{
		var nodeObj = document.getElementById(id);
		var t = ts + 'em';
		nodeObj.style.fontSize = t;
	}

//***** Changing text size as screen size changes.

function txt_sz(id,t,tx,txt)
	{
		var w = find_wid('bar1');
		var nodeObj = document.getElementById(id);
		if ((w >= 450))
			{
		nodeObj.style.fontSize = t + 'em';
			}
		else if ((w >= 300) && (w <= 450))
			{
		nodeObj.style.fontSize = tx + 'em';
			}
		else if ((w >= 60) && (w <= 300))
			{
		nodeObj.style.fontSize = txt + 'em';
			}
	}
// **** Makes changes to text size to suit window size

function adj_txt()
	{
	  txt_sz('wel','3','2.8','2.4');
	  txt_sz('site','3','2.8','2.4');
	  txt_sz('own','3','2.8','2.4');
	  txt_sz('m-call','1','0.9','0.8');
	  txt_sz('item1','0.9','0.8','0.7');
	  txt_sz('item2','0.9','0.8','0.7');
	  txt_sz('item3','0.9','0.8','0.7');
	  txt_sz('item4','0.9','0.8','0.7');
	  txt_sz('item5','0.9','0.8','0.7');
	  txt_sz('item6','0.9','0.8','0.7');
	  txt_sz('item7','0.9','0.8','0.7');
	  txt_sz('item8','0.9','0.8','0.7');
	  txt_sz('item9','0.9','0.8','0.7');
	  txt_sz('item21','0.8','0.7','0.6');
	  txt_sz('item22','0.8','0.7','0.6');
	  txt_sz('item23','0.8','0.7','0.6');
	  txt_sz('what','2.4','2.0','1.6');
	  txt_sz('shad1','2.4','2.0','1.6');
	  txt_sz('tip','0.9','0.8','0.6');
	  txt_sz('date','0.9','0.8','0.6');
	}

// **** Coordinating text size changes to title display etc

function display_it()
	{
	  adj_txt();
	  view('wel','visible');
	  view('site','visible');
	  view('own','visible');
	  show('wel','block');
	  show('site','block');
	  show('own','block');
	}


// *** Set up left movement and stop point of start up screen

function slide_acr(id,p)
	{	
		var pos = get_left_pos(id);
		var hp = eval(pos + '-' + p );
		var bp = hp + 'px';
		var nodeObj = document.getElementById(id);
		nodeObj.style.left = bp;
	}

function stop_trav(u)
{
clearTimeout(u);
}

function stop_cov(id,u)
	{
		var pp = get_left_pos(id);
		var h = get_width();
		var hlt = eval(h + '*' +  '- 0.98');
		if ( (pp <= hlt) )
			{
				stop_trav(u);
			}
	}
function cov_left()
		{
		      tim_A6 = setTimeout("slide_acr('cover','20')",1);
		      tim_B6 = setTimeout("cov_left()",2);
		      var tim_C6 = setTimeout("stop_cov('cover',tim_B6)",2);
		}

//**** Clearing progressively increasing width

function stop_wid(u)
{
clearTimeout(u);
}

//**** setting up an end position for width increase

function inc_stop_wid(id,p,u)
	{
		var ww = get_width(); 
		var wid = find_wid(id); 
		var nw = eval(ww + '*' + p);
		if ( (wid > nw) )
			{
				stop_wid(u);
			}
	}
//**** setting up an end position for height change

function inc_stop_hgt(id,u)
	{
//		var h = get_height();
//		var hi = eval(h + '* 0.08');
		var hgh = find_hght(id); 
		if ( ( hgh >= hi ) )
			{
				stop_wid(u);
			}
	}

//***** Increase object width

function inc_wid(id)
	{
		var wid = find_wid(id);
		var nw = eval(wid + '+16');
		var wd = nw + 'px';
		var nodeObj = document.getElementById(id);
		nodeObj.style.width = wd;
	}

//***** Change object height

function chg_hig(id,p)
	{
		var ht = find_hght(id);
		var hg = eval(ht + p);
		var hgt = hg + 'px';
		var nodeObj = document.getElementById(id);
		nodeObj.style.height = hgt;
	}

//***** Progressively change object height

function pro_chg1()
	{
		tim_la = setTimeout("chg_hig('bar1','+8')",1);
		tim_ma = setTimeout("pro_chg1()",2);
		var tim_n = setTimeout("inc_stop_hgt('bar1',tim_ma)",2);
	}
function pro_chg2()
	{
		tim_lb = setTimeout("chg_hig('bar2','+8')",1);
		tim_mb = setTimeout("pro_chg2()",2);
		var tim_n = setTimeout("inc_stop_hgt('bar1',tim_mb)",2);
	}
function pro_chg3()
	{
		tim_lc = setTimeout("chg_hig('bar3','+8')",1);
		tim_mc = setTimeout("pro_chg3()",2);
		var tim_n = setTimeout("inc_stop_hgt('bar1',tim_mc)",2);
	}


//***** Bringing down bars - part of "shrinking" in height

function slide_dwn(id,p)
	{	
		var pos = get_top_pos(id);
		var hp = eval(pos + p );
		var bp = hp + 'px';
		var nodeObj = window.top.document.getElementById(id);
		nodeObj.style.top = bp;
	}

function trav_stop_dwn(id,u)
	{
		var pp = get_top_pos(id);
//		var h = get_height();
		var hlt = eval(h + '* 0.04');
		var np = eval(op + '- ' + hlt)
		if ( (pp <= np) )
			{
				stop_trav(u);
			}
	}

function pl_dwn1()
	{
		tim_le = setTimeout("slide_dwn('bar1','-4')",1);
		tim_lia = setTimeout("pl_dwn1()",2);
		var tim_lh = setTimeout("trav_stop_dwn('bar1',tim_lia)",2);
	}
function pl_dwn2()
	{
		tim_lf = setTimeout("slide_dwn('bar2','-4')",1);
		tim_lib = setTimeout("pl_dwn2()",2);
		var tim_lh = setTimeout("trav_stop_dwn('bar1',tim_lib)",2);
	}
function pl_dwn3()
	{
		tim_lg = setTimeout("slide_dwn('bar3','-4')",1);
		tim_lic = setTimeout("pl_dwn3()",2);
		var tim_lh = setTimeout("trav_stop_dwn('bar1',tim_lic)",2);
	}

//***** Set up commencement of bar height change

function chg_it()
	{
		var wd = get_width(); 
		var wi = find_wid('bar3'); 
		var gw = eval(wd + '*' + '0.48');
		if ( (wi >= gw) )
			{
				setTimeout("pro_chg1()",1);
				setTimeout("pl_dwn1()",1);
				setTimeout("pro_chg2()",2);
				setTimeout("pl_dwn2()",2);
				setTimeout("pro_chg3()",3);
				setTimeout("pl_dwn3()",3);
			}
	}

//***** Set up stop point of bar height change

function stop_call(id,pp,u)
	{
		var wd = get_width(); 
		var fd = find_wid(id); 
		var fw = eval(wd + '*' + pp);
		if ( (fd >= fw) )
			{
				stop_wid(u);
			}
	}

//***** Set in motion bar height change

function chg_pt()
		{
		      tim_o = setTimeout("chg_it()",1);
		      tim_p = setTimeout("chg_pt()",2);
		      var tim_q = setTimeout("stop_call('bar3','0.48',tim_p)",2);
		}

//***** Progressively shift left position of object to the left

function left_mov(id)
	{
		var lf = get_left_pos(id);
		var lft = eval(lf + '- 8');
		var lftpx = lft + 'px';
		var nodeObj = document.getElementById(id);
		nodeObj.style.left = lftpx;
	}

//***** Set objects (bars) in motion until desired condition is reached

function exp_wid1()
		{
		      tim_a1 = setTimeout("inc_wid('bar1')",1);
		      tim_a1i = setTimeout("left_mov('bar1')",1);
		      tim_b1 = setTimeout("exp_wid1()",2);
		      var tim_c1 = setTimeout("inc_stop_wid('bar1','0.48',tim_b1)",2);
		}

function exp_wid2()
	{
		tim_a2 = setTimeout("inc_wid('bar2')",1);
		tim_a2i = setTimeout("left_mov('bar2')",1);
		tim_b2 = setTimeout("exp_wid2()",2);
		var tim_c2 = setTimeout("inc_stop_wid('bar2','0.48',tim_b2)",2);
	}
function exp_wid3()
	{
		tim_a3 = setTimeout("inc_wid('bar3')",1);
		tim_a3i = setTimeout("left_mov('bar3')",1);
		tim_b3 = setTimeout("exp_wid3()",2);
		var tim_c3 = setTimeout("inc_stop_wid('bar3','0.48',tim_b3)",2);
	}


// **** Display content of 'center stage'

function dis_con()
	{
		var pp = get_left_pos('cover');
		var h = get_width();
		var hlt = eval(h + '*' +  '-' + '0.85');
		if ( (pp <= hlt) )
			{
				show('content-frm','block');
				show('i-promo','block');
				cen_obj('submenu');
			}
	}

function show_con()
	{
		tim_A7 = setTimeout("dis_con()",1);
		tim_B7 = setTimeout("show_con()",2);
		var tim_C7 = setTimeout("stop_cov('cover',tim_B7)",2);
	}

// ***** Displaying start up screen text 

function show_me(id)
	{
		var hgh = find_hght(id); 
		if  ( hgh >= hi )
			{
				setTimeout("display_it()",1);
				setTimeout("show_con()",1000);
				setTimeout("load_frame('i-promo','promo.html')",1800);
				setTimeout("chg_bc('cover','transparent')",2000);
				setTimeout("cov_left()",2000);
				setTimeout("call_m()",7500);
				setTimeout("view('m-call','hidden')",7500);
			}
	} 

function show_now()
	{
		tim_aa4 = setTimeout("show_me('bar1')",1);
		tim_bb4 = setTimeout("show_now()",2);
		var tim_cc4 = setTimeout("inc_stop_hgt('bar1',tim_bb4)",2)
	}

function splash()
	{
		op = get_top_pos('bar1');
		h = get_height();
		hi = eval(h + '* 0.08');
		cook_match();
		exp_wid1();
		exp_wid2();
		exp_wid3();
		chg_pt();
		show_now();
	}

// **** Ensuring browser has run start dhtml to completion

function chk_run()
{
		var wd = get_width(); 
		var wi = find_wid('bar1'); 
		var gw = eval(wd + '*' + '0.11');
		if ( (wi < gw) )
{
window.location.reload( false );
}
}


