// BUILD LAYERS/OBJECTS 

function register()
{	var siteGuide = GetCookie ("SiteGuide");
	if (siteGuide.indexOf("site")>-1)
	{	popup=window.open (siteGuide,'','resizable=yes,scrollbars=yes,toolbar=no,status=yes,height=440,width=360');
		SetCookie ("firstvisit","done");
		window.opener.top.close();
	}
	else
	{	var firstVisit = GetCookie ("firstvisit");
		if (firstVisit == "donte") {} //don't be annoying 
		else 
		{	cbShow("welcome");
			TimeoutID = setTimeout("scroll()",1000);
			SetCookie ("firstvisit","done");
		}
	}
}

function preLoad()
{	var htmlStr = ""
		+ cbObject("tooltip",0,0)
		+ '<div CLASS="toolTip"></div>'
		+ cbObjEnd
		+ cbObject("scroll",130,34)
		+ '<div CLASS="scroll">'
		+ '<div align="center">'
		+ '<img src="infosystems/images/space.gif" WIDTH="220" HEIGHT="1"><br>'
		+ 'Thanks for visiting.<br>To see a portfolio<br>or an overview of this site<br>visit the<br>'
		+ '<a href="javascript://" onClick="Showcase('
		+ "'site/showcase/index.htm'"
		+ ');return false">Showcase</a> or<br>'
		+ '<a href="javascript://" onClick="SiteGuide('
		+ "'site/guide/sitecontents.htm'"
		+ ');return false">Web Site Guide</a><br><br>'
		+ 'See working demos of the latest<br>online projects '
		+ 'completed<br>by H.James Company:<br>'
		+ "<a href='http://www.myinteraccess.com/cgi-bin/catalogue/catalogue.cgi'>"
		+ 'Photo catalogue</a><br>'
		+ "<a href='http://www.myinteraccess.com/'>"
		+ 'Product order form</a><br>'
		+ "<a href='http://www.myinteraccess.com/'>"
		+ 'Blackberry data feed</a><br>'
		+ "<a href='http://www.myinteraccess.com/'>"
		+ 'Sports league registrations</a><br>'
		+ '<p><p><a href="javascript://" onClick="closeScroll();">'
		+ '<img src="infosystems/images/bnclose.gif" border="0" width="16" height="14" alt="click to close"></a><br><br><p><p>'
		+ '<img src="infosystems/images/space.gif" WIDTH="220" HEIGHT="60"><br>'
		+ '</div></div>'
		+ cbObjEnd
		+ cbObject("roll",124,34)
		+ '<div CLASS="roll">'
		+ '<img src="infosystems/images/roll.gif" WIDTH="260" HEIGHT="20">'
		+ '</div>'
		+ cbObjEnd
	document.write(htmlStr);
	cbSet("tooltip",cbBgColor,"FFFFDF");
	cbHide("tooltip");
	cbHide("scroll");
	cbHide("roll");
	scroll();
} 

function closeScroll()
{	cbHide("scroll");
	cbHide("roll");
}

function newCloseButton(objName,width)
{		width-=16;
		var htmlStr = ''
		+ '<img src="infosystems/images/space.gif" width="'
		+ width + '" height="1">'
		+ '<a href="javascript://)" onClick="cbHide'
		+ "('" + objName + "')"
		+ ';">'
		+ '<img src="bnclose.gif" border="0" width="16" height="14" align="right" alt="click to close"></a><br>';
	return htmlStr;
}

function inner()
{	if (IE)
	{	document.all['tidbit'].innerHTML = htmlStr;
	}
	else
	{	document.layers['tidbit'].document.write (htmlStr);
		document.layers['tidbit'].document.close ();
	}
}

function scroll()
{	bottom = 10;
	cbClipBottom("scroll",bottom);
	cbShow("scroll");
	cbShow("roll");
	TimeoutID = setTimeout("unroll()",2);
}

function unroll()
{	if (cbProp("roll",cbTop)< 320)
	{	eval(cbObj + cbLB + "roll" + cbRB + cbTop + "+=10;");
		bottom+=10;
		cbClipBottom("scroll",bottom);
		TimeoutID = setTimeout("unroll()",50);
	}	
}

function toolTip(tip) { if (!NoScripts)
{	var htmlStr = ""
	htmlStr += cbObjectR("guide",0,0)
		+ "welcome"
		+ cbObjEndR;
	document.write(htmlStr);
}}

function welcome() { if (!NoScripts)
{	var htmlStr = ""
	htmlStr += cbObjectR("guide",0,0)
		+ "welcome"
		+ cbObjEndR;
	document.write(htmlStr);
}}

function freesia() { if (!NoScripts)
{	popup=window.open ('guide/contents.htm','','resizable=yes,scrollbars=no,toolbar=no,height=40,width=40');
}}