<!--

// VERTEX GLOBAL METHODS


function adjust_content_container()
{
	var dots = document.getElementById('dots');

	if ( parseInt(SID) == 0 )
	{
		if ( ! document.all || window.opera )
		{
			var flash_text = document.getElementById('flash_text');
		
			flash_text.style.width = '400px';
			
			if ( screen.width > 1024 )
			{
				dots.style.width = '960px';
			}
			else if ( screen.width <= 800 )
			{
				dots.style.width = '778px';
			}
			else
			{
				dots.style.width = '960';
			}
		}
		else
		{
			dots.style.width = '960';
		}
			 
		
		var mainTbl = document.getElementById('mainTblContainerHome');

		if ( screen.width > 1024 )
		{
			 mainTbl.style.width = '960px';
		}
		else if ( screen.width <= 800 )
		{
			 document.body.style.overflow = 'auto';
			 mainTbl.className = 'mainTblContainerHomeSm';
		}
		else
		{
			 mainTbl.style.width = '100%';
		}
	}
	else
	{
		var mainDiv = document.getElementById('mainDivContainer');
		var right_panel_copy = document.getElementById('right_panel');
		
		if ( screen.width < 800 )
			 mainDiv.style.width = '778px';
		
		dots.style.width = '960';
		
		if ( window.opera )
		{
			right_panel_copy.style.width = '350px';
			
		}
	}
}

// right header navigation
// mouseovers
function initHdrNavBehaviors()
{
	var imgObj;

	for ( var i = 0; i <= 3; i++ )
	{
		imgObj = document.getElementById('hdrNav' + i);
		
		if ( imgObj )
		{
			imgObj.label = i;
	
			imgObj.onmouseover = function ()
								 {
									 var imgObjThumb = document.getElementById('hdrNavTn');
									 imgObjThumb.src = 'images/image_tn' + this.label + '.jpg';
									 
									 this.src = this.src.toLowerCase().replace('_out',  '_over');
	
									 return window.defaultStatus = this.alt;
								 }
	
			imgObj.onmouseout  = function ()
								 {
									 this.src = this.src.toLowerCase().replace('_over', '_out');
	
									 return window.defaultStatus = '';
								 }
		}
	}
}

// footer links
function initFooterNavBehaviors()
{
	var footerObj;
	
	for ( var i = 0; i <= 4; i++ )
	{
		footerObj = document.getElementById('footer_btn' + i);
		footerObj.onmouseover = function () { return window.status = this.alt; }
		footerObj.onmouseout  = function () { return window.status = '';	   }
		
		if ( parseInt(footerObj.name) == parseInt(SID) )
			footerObj.src = footerObj.src.toLowerCase().replace(/(.*)\.(.*)/, '$1_over.$2');
	}
}

function buildMainSubNav(which,action)
{
	var subDivObj;
	var imgObj;
	
	for ( var x = 0; x < 7; x++ )
	{
		subDivObj = document.getElementById('mainSubNav'    + which + '_' + x);
		imgObj 	  = document.getElementById('mainSubNavImg' + which + '_' + x);
		
		if ( subDivObj  )
		{
			if ( parseInt(imgObj.name) == parseInt(SID) && action == 1 )
				return true;

			subDivObj.onmouseover = function ()
									{
										this.className = 'mainSubNavOver';

										return window.defaultStatus = this.title;
									}

			subDivObj.onmouseout  = function ()
									{
										this.className = 'mainSubNav';

										return window.defaultStatus = '';
									}
		}
	}
}

function initMainNavBehaviors()
{	
	var divObj;
	var imgObj;
	var subImgObj;
	var action = 0;
	
	for ( var i = 0; i <= 5; i++ )
	{
		divObj = document.getElementById('mainNavContainer' + i);
		divObj.style.cursor = 'hand';
		divObj.label = i;
		imgObj = document.getElementById('mainNavImg' + i);
		
		subImgObj = buildMainSubNav(i,1);

		if ( divObj )
		{
			if ( parseInt(imgObj.name) == 15 && parseInt(SID) == 16 )
			{
				
			}
			else
			{
				if ( parseInt(imgObj.name) == parseInt(SID) || subImgObj == true )
				{
					imgObj.src  = imgObj.src.toLowerCase().replace('_out', '_over');
					divObj.name = 'click';
				}
			}

			divObj.onmouseout  = function ()
								 {
									 var mainDivObj = document.getElementById('mainNav'	   + this.label);
									 var imgObj 	= document.getElementById('mainNavImg' + this.label);

									 mainDivObj.className = 'mainNavOut';
									 
									 if ( this.name != 'click' )
										imgObj.src = imgObj.src.toLowerCase().replace('_over', '_out');

									 return window.status = '';
								 }
	
			divObj.onmouseover = function ()
								 {
									 var mainDivObj = document.getElementById('mainNav'    + this.label);
									 var imgObj 	= document.getElementById('mainNavImg' + this.label);
	
									 mainDivObj.className  = 'mainNavOver';
									 
									 if ( this.name != 'click' )
										imgObj.src = imgObj.src.toLowerCase().replace('_out', '_over');

									 buildMainSubNav(this.label,0);
	
									 //return window.status = imgObj.alt;
								 }
		}
	}
}

function call_to_action(which)
{
	var callDiv = document.getElementById('call_to_action' + which);
	callDiv.style.display = 'block';
}

function BuildEmail(email,dom)
{
	switch (email) 
	{
		case 'newsletter' :
			window.open('mailto:' + email + '@' + 'vertexsoftware' + '.com' + '?subject=Vertex Newsletter&body=' + 'Please provide us with the following information:%0D%0A%0D%0AName: %0D%0A%0D%0ACompany Name: %0D%0A%0D%0ATitle: %0D%0A%0D%0AMailing Address: %0D%0A%0D%0ACity: %0D%0A%0D%0AState: %0D%0A%0D%0AZIP Code: %0D%0A%0D%0APhone Number:');
			break;
		default:
			window.open('mailto:' + email + '@' + 'vertexsoftware' + '.com');
			break;
		
	}
}

function BuildEmail2(email,dom)
{
	window.open('mailto:' + email + '@' + 'vertexsoftware' + '.com' + '?subject=Vertex Newsletter&body=' + 'Please provide us with the following information:%0D%0A%0D%0AName: %0D%0A%0D%0ACompany Name: %0D%0A%0D%0ATitle: %0D%0A%0D%0AMailing Address: %0D%0A%0D%0ACity: %0D%0A%0D%0AState: %0D%0A%0D%0AZIP Code: %0D%0A%0D%0APhone Number:');
}

// initialize
window.onload = function ()
				{
					adjust_content_container();
					initHdrNavBehaviors();
					initMainNavBehaviors();
					initFooterNavBehaviors();
				};

//-->
