function initPage()
{
	runSleight();
	MM_preloadImages('/images/layout/menu01o.gif','/images/layout/menu02o.gif','/images/layout/menu03o.gif','/images/layout/menu04o.gif');
	doFlashTitles();
	if (stopCorners != 1)
		doTabs();
}
  
var vesid = 0;
  
function show_div(tab, tap) {
	// hide all the divs
	for (x=1;x<6;x++)
	{
		if (document.getElementById('tab' + x))
		{
			document.getElementById('tab' + x).className = 'tab' + x;
		}
		if (document.getElementById('tap' + x))
		{
			document.getElementById('tap' + x).style.display = 'none';
		}
	}

	// show the requested div
	if (document.getElementById(tab) && document.getElementById(tap))
	{
		document.getElementById(tab).className = tab + 'Selected';
		document.getElementById(tap).style.display = 'block';
		if (tap == 'tap5') 
		{
			if(document.googlemaps)
			{
				document.googlemaps.location = '/googlemaps.asp?vesid=' + vesid;
			}
			else if (parent.googlemaps)
			{
				parent.googlemaps.location = '/googlemaps.asp?vesid=' + vesid;
			}
		}
		doFlashTitles();
	}
}

function checkClearField(t, f, val)
{
	field = document.getElementById(f);
	if (field)
	{
		if (t == 1)
		{
			if (field.value == "")
			{
				field.value = val;
				field.style.color = "#8c8b8b";
			}
		}
		else if(t == 0)
		{
			if (field.value == val)
			{
				field.value = "";
				field.style.color = "";
			}
		}
	}
}
