var date = new Date()
var mm = date.getMonth()+1;
var dd = date.getDate();
var yy = date.getYear();

function launchApp(url,windowname) {
	var xOffset = 0;
    var yOffset = 0;
	var xWidth = (screen.width) - 10;
	var yHeight = (screen.height) - 77;
    newWindow = window.open(url,windowname,'left=' + xOffset + ',top=' + yOffset + 'toolbar=no,menu=yes,resizable=yes,location=no,scrollbars=no,status=yes,width='+ xWidth +',height=' + yHeight);
	newWindow.focus();
}

function launchReg(who,windowname) {
	var xOffset = ((screen.width) - 800) / 2;
    var yOffset = ((screen.height) - 600) / 3;
	var xWidth = 800;
	var yHeight = 600;
    newWindow = window.open('../account/wizard_' + who + '.html',windowname,'left=' + xOffset + ',top=' + yOffset + 'toolbar=no,menu=yes,resizable=yes,location=no,scrollbars=no,status=yes,width=800,height=600');
	newWindow.focus();
}

var randomImg = new Array('brandOne.html','brandTwo.html');
function whichImage() {
	if (document.images) {
		randomNum = Math.floor((Math.random() *10)) % 6;
		document.brandIframe.src = randomImg[randomNum];
		}
	}

var randomTip = new Array(
	'The NextGen online help contains step-by-step instruction and explanations of NextGen components.\<br \/\>\<br \/\>To access the help, click \"?\" on the application\'s navigation bar.',
	'The NextGen tutorial provides a simulated environment in which you can practice using the application.\<br \/\>\<br \/\>To access the tutorial, select Tutorial from the Support menu tab.',
	'NextGen suppliers can be notified automatically through email when their buyers publish demand. Set up the email notifications in the Document Profile from the Communications menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'Email alerts keep you connected to your NextGen account even when you\'re not logged in. You can subscribe to be alerted of NextGen events by selecting Alerts from the Setup menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'You can configure your personal Event Management Console to display in a way that better fits your work. You can choose which events display as priority items, which events display as category items, and how the layout is arranged. To configure your EMC, select EMC Configuration from the Setup menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'Through NextGen security, the admin can create user accounts for each NextGen user at your site. With their own account, each of your employees can configure their EMC and alerts to better fit their position.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'The schedule is used to establish periodic pulls from and pushes to your ERP\/MRP. You can establish a schedule for each computer defined in a Computer Profile by selecting Schedule from the Communications menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'You can receive Material Releases as email attachments in various formats, including PDF. Set up the email notifications in the Document Profile from the Communications menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'NextGen reports convert demand data in the NextGen database into a formatted PDF. The PDF can be viewed and printed through Adobe Acrobat Reader, saved to your computer, and emailed to others in your organization.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'When setting up part information, suppliers can select default containers and packaging for each part. When creating shippers, the packaging is automatically pulled from these defaults, streamlining shipper creation.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'Shippers can be created manually or automatically generated based on demand. When creating from demand, enter the coverage days and select the parts.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'The Demand Summary provides a quick glimpse at demand due within the next 7 days. To view the summary, select Demand Summary from the Demand menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'You can adjust the NextGen color scheme by selecting a different theme in your User Profile, located under the Setup menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'To complete the NextGen set up, you can restart the Registration Wizard at any time from under the Setup menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'Through NextGen security, admins may restrict a user or group of users to a particular set of data, such as specific facilities or ship tos. Users restricted to a specific facility can view demand only for that facility. Users who do not have a restriction group can access all NextGen data.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'Once a shipper is created, it is automatically saved to the database. Suppliers can return to saved shippers to edit, publish, or delete them. From the Shipments menu tab, select Open.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'After a shipper has been published, suppliers can send a cancellation ASN. To access a published \(closed\) shipper, select Closed from the Shipments menu tab.\<br \/\>\<br \/\>For more information, read the help by clicking the \"?\" on the application\'s navigation bar.',
	'In addition to communicating with NextGen suppliers, NextGen can also be used to communicate with suppliers using select Value Added Networks \(VANs\) through the NextGen secure FTP.'
	);
function whichTip() {
	randomNum = Math.floor((Math.random() *10)) % 18;
	document.getElementById("tipHolder").innerHTML = randomTip[randomNum];
	}

function randomize() {
	whichImage();
	whichTip();
}