/**
*
* @file			LaunchSite.js
*
* @copyright 	(C) slp3D, Inc.  2006, 2008
* 
* @author		Neil Patterson
* @author		Terry Doll
* @date			01/30/2006
* @description	this is the global javascript file
*
* @revised		01/30/2006
* @notes		notes here
*
**/

/**
*******************************************************************************
* this function is used to switch show/hide elements on index.cfm and elsewhere
*******************************************************************************
**/
function switchID(tempElementID, off) {
var tempElement = document.getElementById(tempElementID).style;
if (off) {
	tempElement.visibility = 'hidden';
	tempElement.display = 'none';
} else {
	tempElement.visibility = 'visible';
	tempElement.display = 'inline';
}
}

/**
*******************************************************************************
* this function is used to maximize the browser window on clients screen
*******************************************************************************
**/
function maximizeWin() {
  if (window.screen) {
    var aw = screen.availWidth;
    var ah = screen.availHeight;
    window.moveTo(0, 0);
    window.resizeTo(aw, ah);
  }
}


/**
*******************************************************************************
* this function is used for the contact form pop-ups
*******************************************************************************
**/
var popUpWin=0;
function popUpWindowScroll(id)
{

if(popUpWin)
	{
		if(!popUpWin.closed) popUpWin.close();
	}

	windowURL = "contact.cfm?id="+id;
	if(id == 4) {
	windowWidth = 480;
	windowHeight = 300;
	windowLeft = 40;
	windowTop = 40;
	}
	
	else if (id == 5) {
	windowWidth = 480;
	windowHeight = 515;
	windowLeft = 40;
	windowTop = 40;
	}
	
	else {
	windowWidth = 480;
	windowHeight = 740;
	windowLeft = 40;
	windowTop = 40;
	}
	
	popUpWin = open(windowURL, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+windowWidth+',height='+windowHeight+',left='+windowLeft+', top='+windowTop+',screenX='+windowLeft+',screenY='+windowTop+'');
}

/**
*******************************************************************************
* this function is used for the alternate pop-ups
*******************************************************************************
**/
var popUpWin=0;
function popUpWindowScroll_alt(URLStr, left, top, width, height)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}
