//Global Variable which enables and disables customer notice
var notifyFlag =0// 12 - Diplay pop, 1- Enable Customer Notice in All Products, 0 - Disable Customer Notice in All Products

//Global variable having the text that needs to be displayed in index/homepage of all the products
var pageDisplayText="<img src=http://www.startrak.com/corp/images/information.gif>&nbsp;Under Maintenance...&nbsp;<a href=# onclick=getNotificationPopup('notificationInformation') class=notifyLnks>Click here</a>";

//Variables having the text that needs to be displayed in the pop-up window
var contentHeading="Under Maintenance";
var paragraph1=" We are working on a significant expansion of our network capacity in order to further improve system performance to all of our users.  At this point, the new servers have been added into our data center and are undergoing final test.  The last step in the implementation of this upgrade is the cut-over which will take place on March 27 through March 29.";
var paragraph2="The maintenance window is scheduled to start at 6:00 PM EDT this Friday March, 27th 2009 and will last approximately 8 hours.<p>During this period there will be an outage not allowing access to StarTrak Websites.  All messages will be queued and delivered once the maintenance is complete.</p><p>We will be monitoring all our processes as we go back on-line after the maintenance is complete.</p>";
var paragraph3="We will make every effort to minimize the outage and the impact on our customers.  During the upgrade process, periodic status reports will be sent out to keep our customers fully appraised of the process.";
var paragraph4="For 10 years, StarTrak has been at the forefront of cold-chain transport management and we continue to be focused on offering the very best service to all of our customers.  You have rewarded our efforts with continued strong growth, and we are greatly appreciative of that.  We thank you for your patience and understanding while we carry out this important network expansion and upgrade.  <br>Please don't hesitate to contact our customer service group with any questions or support issues.<p>973-993-1761&nbsp;/&nbsp;62&nbsp;/&nbsp;63&nbsp;/&nbsp;64<br><br>We apologize for the inconvenience.";
var address="StarTrak Systems, LLC<br>408 The American Road<br>Morris Plains, NJ 07950<br>Tel: 973-993-1760<br>Fax: 973-993-1765<br><br>Customer Support: 973-993-5760<br>Sales: 888-808-0208";


//Function used to display the customer notice in pop-up window
function getNotificationPopup(divId)
{
	document.getElementById(divId).style.display="";
	document.getElementById(divId).style.position="absolute"
	document.getElementById(divId).style.top =95;
	document.getElementById(divId).style.left = 10;
	//Notice content
	document.getElementById("notifyContent").innerHTML = "<table><tr><td align=center><span class=boldText><h4>"+contentHeading+"</h4> </span></td></tr><tr><td align=left><p class=normalText>"+paragraph1+"</p> <p class=normalText>"+paragraph2+"</p><p class=normalText>"+paragraph3+"</p><p class=normalText>"+paragraph4+"</p> <p class=normalText>"+address+"</p></td></tr></table>"
}

function showLnk(spnId)
{
	
	if(document.getElementById(spnId)!=undefined || document.getElementById(spnId)!=null)
	{
		if(notifyFlag==1)//Notice enabled
		{
			document.getElementById(spnId).innerHTML = pageDisplayText;
		}
	}
	var divHtml;
	divHtml ="<div id=notificationInformation style=display:none >";
	divHtml =divHtml + "<table width=100% border=0 cellspacing=0 cellpadding=0 class=popupTbl  bgcolor=#FFFFFF>";
	divHtml =divHtml + "<tr>";
	divHtml =divHtml + "<td align=center>";
	divHtml =divHtml + "<div class=PopBox>";
	divHtml =divHtml + " <table width=67% border=0 cellspacing=0 cellpadding=1  class=popupborderClrTabClr>";
	divHtml =divHtml + "<tr>";
	divHtml =divHtml + "<td>";
	divHtml =divHtml + "<TABLE width=100% cellSpacing=0 cellpadding=1 bgcolor=#618BA2 border=0 class=popUpDisplay >";
	divHtml =divHtml + " <tr>";
	divHtml =divHtml + " <td>&nbsp;</td>";
	divHtml =divHtml + " <td align=right>";
	divHtml =divHtml + " <a href=# onclick=document.getElementById('notificationInformation').style.display='none'; style=text-decoration: none> <span class=notifyLnks>X Close</span></a>";
	divHtml =divHtml + " </td>";
	divHtml =divHtml + " </tr>";
	divHtml =divHtml + "<tr>";
	divHtml =divHtml + " <td colspan=2>";
	divHtml =divHtml + "<span id=notifyContent></span>";
	divHtml =divHtml + "</td>";
	divHtml =divHtml + "</tr>";
	divHtml =divHtml + " <td colspan=2>&nbsp;<td></tr>";
	divHtml =divHtml + "</table>";
	divHtml =divHtml + "</td></tr></table>";
	divHtml =divHtml + "</div>";
	divHtml =divHtml + "</td></tr></table>";
	divHtml =divHtml + "</div>";
	document.write(divHtml);

		if(document.getElementById(spnId)!=undefined || document.getElementById(spnId)!=null)
        {
                if(notifyFlag==1)
                {
					document.getElementById(spnId).innerHTML = pageDisplayText;
                }

				if(notifyFlag == 12){
						document.getElementById(spnId).innerHTML = pageDisplayText;
						getNotificationPopup('notificationInformation');
				}
        }

}
window.onload(showLnk('notifyLnk'));


