// ****************** PLATFORM DETECTION FOR STYLE SHEET SELECTION ****************** //
/*
	var ver = navigator.appVersion.toLowerCase();

	if (ver.indexOf("mac") != -1) {

	// platform is Macintosh
		document.write('<LINK REL="stylesheet" HREF="/styles/styleSheetMac.css" TYPE="text/css">');
		} else 
				{
	// platform is Windows
		document.write('<LINK REL="stylesheet"  HREF="/styles/styleSheetWindows.css" TYPE="text/css">');
		}
*/
// ****************** POPUP WINDOW CODE ****************** //
function displayWindow(ImageName,string) 
{
	WinTop = 100;  
	WinLeft = 150;
	winFeatures = "toolbar=0,location=0,directories=0,status=0";
	winFeatures += ",menubar=0,scrollbars=0,resizable=yes";
	winFeatures += ",screenX="+WinLeft+",screenY="+WinTop;
	winFeatures += ",left="+WinLeft+",top="+WinTop;
	winFeatures += ",height=320,width=270";
	PopUpWindow=window.open("","PopUpWindow",winFeatures);
	PopUpWindow.document.writeln('<html>');
	PopUpWindow.document.writeln('<head>');
	PopUpWindow.document.writeln('<title>Infotonics Technology Center: Images</title>');
	PopUpWindow.document.writeln('</head>');
	if (navigator.appName == "Microsoft Internet Explorer")
		  PopUpWindow.document.writeln('<body topmargin="4" leftmargin="0" marginwidth="0" bgcolor="#EEEEEE" marginheight="10" onLoad="window.resizeTo(document.images[0].width+20,document.images[0].height+100)">');
	else
		    PopUpWindow.document.writeln('<body topmargin="4" leftmargin="0" marginwidth="0" marginheight="10" onLoad="window.resizeTo(document.images[0].width+20,document.images[0].height+80)">');
	PopUpWindow.document.writeln('<center><img  src="'+ImageName+' " border="1" ></center>');
	PopUpWindow.document.writeln("<br><center><a href='javascript:self.close();'><img src='/images/closeWindow.gif' alt='Close Window' border='0' width='100' height='21'><center>");
	PopUpWindow.document.writeln('</body>');
	PopUpWindow.document.writeln('</html>');
	PopUpWindow.document.close();
	PopUpWindow.focus();
}

// ****************** IE3 SAFE IMAGE SWITCHING CODE ****************** //
	var goodBrowser = 0;

	if(document.images){
			// enable rollovers
			goodBrowser = 1;
			
			//image preloading stuff
			//put your images that will be used into a comma delimited
			//list on the next line... follow the example =)
			var preLoad = new Array('/images/navigation/aboutInfotonics_in.gif','/images/navigation/doingBusiness_in.gif','/images/navigation/learningCenter_in.gif','/images/navigation/ourCompetencies_in.gif','/images/navigation/newsroom_in.gif','/images/navigation/researchProjects_in.gif','/images/navigation/home_over.gif','/images/navigation/contactUs_over.gif','/images/navigation/findUs_over.gif','/images/navigation/sitemap_over.gif','/images/navigation/employment_over.gif');

			//don't touch this (it does the pre-loading for you)
			for(var i = 0; i < preLoad.length;i++){
					var k = new Image();
					k.src = preLoad[i];
			}
			
	}

	function rollover(){
			if(goodBrowser == 1){
					for(var i = 0; i < rollover.arguments.length; i += 2){
					document.images[rollover.arguments[i]].src = rollover.arguments[i+1];
					}
			}

	}


// ****************** DATE CODE ****************** //
	var _arrDays = new Array("Sunday", "Monday", "Tuesday",	"Wednesday", "Thursday", "Friday", "Saturday");

	var _arrMonths = new Array("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December");

	// getLongDate is in the following format: Thursday, January 2, 2003. 
		function getLongDate(date) {
			var strOutput;
			return _arrDays[date.getDay()] + ", " + _arrMonths[date.getMonth()] + " " + date.getDate () + ", " + getFullYear(date);
		}

	// getShortDate is in the following format: January 2, 2003. 
		function getShortDate(date) {
			var strOutput;
			return _arrMonths[date.getMonth()] + " " + date.getDate () + ", " + getFullYear(date);
		}

	// getIntlDate is in the following format: 2 January 2003.  This would be used mainly for international date formats.
		function getIntlDate(date) {
			var strOutput;
			return date.getDate () + " " + _arrMonths[date.getMonth()] + " " + getFullYear(date);
		}

	// getFullYear is in the following format: 2003 (displays the current year only).
		function getFullYear(date) {
			if (date.getYear() > 1900) {
				return date.getYear();
			} else {
				return date.getYear() + 1900;
			}
		}

		function showSubsection(mySubsection){
			document.getElementById(mySubsection).style.display="block";
		}