function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}

function changeImages() {
	if (document.images && (preloadFlag == true)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}


function getLongDay(intDay) {
	var dayArray = new Array("Sunday", "Monday", "Tuesday", "Wednesday",
								 "Thursday", "Friday", "Saturday");
	return dayArray[intDay];
}

function getLongMonth(intMonth) {
	var monthArray = new Array("January", "February", "March",
								   "April", "May", "June",
								   "July", "August", "September",
								   "October", "November", "December");
	return monthArray[intMonth];
}

function getTodaysDate() {
	var today = new Date();
	var ld = today.getDay();
	var dayofweek = getLongDay(ld);
	var d = today.getDate();
	var day = (d < 10) ? '0'+d : d;
	var m = today.getMonth();
	var month = getLongMonth(m);
	var yy = today.getYear();
	var year = (yy < 2000) ? yy + 1900 : yy;
	
	var todayStr = dayofweek +",&nbsp;" + month + " " + day + ", " + year;
	
	return todayStr;
}

var bWinTiger = "0";

function popupTiger(){
  if(bWinTiger == 0){
  	hWinTiger = window.open('tiger.asp', 'hWinTiger', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=770,height=440,top=22,left=22');
    bWinTiger = 1;
  }
  else{
    if(hWinTiger.closed){
      hWinTiger = window.open('tiger.asp', 'hWinTiger', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=770,height=440,top=22,left=22');
    }
    else{
      hWinTiger.focus();
    }
  }
}

var bWinDragon = "0";

function popupDragon(){
  if(bWinDragon == 0){
  	hWinDragon = window.open('dragon.asp', 'hWinDragon', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=770,height=440,top=102,left=142');
    bWinDragon = 1;
  }
  else{
    if(hWinDragon.closed){
      hWinDragon = window.open('dragon.asp', 'hWinDragon', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=770,height=440,top=102,left=142');
    }
    else{
      hWinDragon.focus();
    }
  }
}

var bWinInterrupt = "0";

function popupInterrupt(){
  if(bWinInterrupt == 0){
  	hWinInterrupt = window.open('interrupt.htm', 'hWinInterrupt', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=150,top=10,left=10');
    bWinInterrupt = 1;
  }
  else{
    if(hWinInterrupt.closed){
      hWinInterrupt = window.open('interrupt.htm', 'hWinInterrupt', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=300,height=150,top=10,left=10');
    }
    else{
      hWinInterrupt.focus();
    }
  }
}

function popup(URL, w, h, t, l) {
   
  day = new Date();
  id = day.getTime();
 
  eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=" +w +",height=" +h +",top=" +t +",left=" +l +"');");
}

function showConcertIT(){
  window.open('http://www.progressiveimages.com/galleryitem.asp?clientname=Concert%20Information%20Technology&loadimage=images/logogallery/cit.gif','galleryimage','width=550,height=276,left=215,top=240,screenX=215,screenY=240,status=0,toolbar=0,location=0,scrollbars=0,resizable=0');
}

function showConcertIPMS(){
  window.open('http://www.progressiveimages.com/galleryitem.asp?clientname=Concert%20Inventory%20and%20Provisioning%20Management%20System&loadimage=images/logogallery/ipms.gif','galleryimage','width=550,height=276,left=215,top=240,screenX=215,screenY=240,status=0,toolbar=0,location=0,scrollbars=0,resizable=0');
}
