// date and time javascript
var isnMonths=new Array("1","2","3","4","5","6","7","8","9","10","11","12");
var isnDays= new Array("Sun","Mon","Tue","Wed","Thr","Fri","Sat","Sun");
today=new Date();
var now = new Date();
var day = now.getDay();
var hour = now.getHours();
var minutes = now.getMinutes();
var year = now.getFullYear();
var whathour;
	if (hour == 13) whathour = "1";
	if (hour == 14) whathour = "2";
	if (hour == 15) whathour = "3";
	if (hour == 16) whathour = "4";
	if (hour == 17) whathour = "5";
	if (hour == 18) whathour = "6";
	if (hour == 19) whathour = "7";
	if (hour == 20) whathour = "8";
	if (hour == 21) whathour = "9";
	if (hour == 22) whathour = "10";
	if (hour == 23) whathour = "11";
	if (hour == 0)  whathour = "12";
	if (hour >0 && hour <=12) whathour = hour
var whatminutes;
	if (minutes >=10) whatminutes = minutes
	else whatminutes = ("0" + minutes)
var houraorp = now.getHours();
var amorpm
	if (houraorp <=11) amorpm = "am";
	else amorpm = "pm"


// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::			     Mega Popup Window Script       	  :::
// :::::			   Created by Justin Stephenson   		  :::
// :::::			 6/29/01; last revised 06/29/01 		  :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

var megaPopupWin = null;
lastName = null;

function megaPopup(URL,flexType,windowType,width,height,screenHorizPosition,screenVertPosition,stackOrder,temporaryName) {
	if	(screenHorizPosition == 'center')	{ leftPosition = (screen.width) ? (screen.width - width)/2:100; }
		else { leftPosition = screenHorizPosition; }
	if	(screenVertPosition == 'center')	{ topPosition = (screen.height) ? (screen.height - height)/2:100; }
		else { topPosition = screenVertPosition; }
	if (windowType == 'full') { styleAttributes = "toolbar=yes,location=yes,directories=yes,menubar=yes,status=yes"; } else if (windowType == 'basic') { styleAttributes = "toolbar=yes,location=no,directories=no,menubar=no,status=no"; } else if (windowType == 'bare') { styleAttributes = "toolbar=no,location=no,directories=no,menubar=no,status=no"; } else { styleAttributes = "toolbar=yes,location=yes,directories=yes,menubar=yes,status=yes"; }
	if (flexType == 'frozen') { flexAttributes = "scrollbars=no,resizable=no"; } else if (flexType == 'rigid') { flexAttributes = "scrollbars=yes,resizable=no"; } else if (flexType == 'loose') { flexAttributes = "scrollbars=yes,resizable=yes"; } else { flexAttributes = "scrollbars=yes,resizable=yes"; }
	if (width == 'total') { width = screen.width; }
	if (height == 'total') { height = screen.height; }
	// *** consider a browser sniff to serve screenX and screenY to Navigator 4 ***
	windowAttributes = 'width=' + width + ',height=' + height + ',top=' + topPosition + ',left=' + leftPosition + ',' + styleAttributes + ',' + flexAttributes;
	// if the temporary and last names match, the popup is repopulating an existing window; the existing window must be closed to allow its replacement to use new and different style, flexibility, and position attributes
	if (temporaryName == lastName) { if (megaPopupWin != null && !megaPopupWin.closed) { oldWin = megaPopupWin; oldWin.name = "oldWin"; oldWin.close(); } }
	lastName = temporaryName;
	megaPopupWin = window.open(URL,temporaryName,windowAttributes);
	if (stackOrder == 'top') { megaPopupWin.focus(); megaPopupWin.location = URL; }
		else if (stackOrder == 'bottom') { megaPopupWin.blur(); megaPopupWin.location = URL; megaPopupWin.blur(); self.focus(); }
}


// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::			   Picture Popup Window Script            :::
// :::::			  Created by Justin Stephenson            :::
// :::::			 09/21/01; last revised 09/21/01          :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

var picPopupWin = null;

function picPopup(URL) {
	width=420;
	height=425;
	leftPosition = (screen.width) ? (screen.width - width)/2:100;
	topPosition = (screen.height) ? (screen.height - height)/2:100;
	picPopupWin = window.open(URL,'photo_loading','width=' + width + ',height=' + height + ',top=' + topPosition + ',left=' + leftPosition + ',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
}



var picPopupWin2 = null;

function picPopup2(URL) {
	width=684;
	height=470;
	leftPosition = (screen.width) ? (screen.width - width)/2:100;
	topPosition = (screen.height) ? (screen.height - height)/2:100;
	picPopupWin2 = window.open(URL,'photo_loading','width=' + width + ',height=' + height + ',top=' + topPosition + ',left=' + leftPosition + ',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
}
var picPopupWin3 = null;

function picPopup3(URL) {
	width=770;
	height=530;
	leftPosition = (screen.width) ? (screen.width - width)/2:100;
	topPosition = (screen.height) ? (screen.height - height)/2:100;
	picPopupWin3 = window.open(URL,'photo_loading','width=' + width + ',height=' + height + ',top=' + topPosition + ',left=' + leftPosition + ',toolbar=no,location=no,directories=no,menubar=no,status=no,scrollbars=no,resizable=no');
}



// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::				  Closewindow Script		          :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

function closeWin()
	{
		this.close();
		PrintWindow = null;
	}

// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::	      Random Masthead Assignment Script           :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
var rand1 = 0;
var useRand = 0;
images = new Array;
images[1] = new Image();
images[1].src = "/images/masthead/photos.jpg";
images[2] = new Image();
images[2].src = "/images/masthead/photos2.jpg";
images[3] = new Image();
images[3].src = "/images/masthead/photos3.jpg";

function swapMasthead() {
	var imgnum = images.length - 1;

	do {
		var randnum = Math.random();
		rand1 = Math.round((imgnum - 1) * randnum) + 1;
	}
	while (rand1 == useRand);

	useRand = rand1;
	document.masthead.src = images[useRand].src;
}


// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::				  Preload - Rollover		          :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


imagesPreloaded = false;

function rollOver(imageName) {
	overImage = '/images/nav/lit/' + imageName + '.gif';
	changeImages(imageName, overImage);
	return true;
}

function rollOff(imageName) {
	offImage = '/images/nav/def/' + imageName + '.gif';
	changeImages(imageName, offImage);
	return true;
}

function newImage(theSource) {
	if (document.images) {
		theImage = new Image();
		theImage.src = theSource;
		return theImage;
	}
}

function changeImages() {
	if (document.images && (imagesPreloaded)) {
		for (var i=0; i<changeImages.arguments.length; i+=2) {
			document[changeImages.arguments[i]].src = changeImages.arguments[i+1];
		}
	}
}





var newwindow;
function poptasticx(url)
{
	newwindow=window.open(url,'name','height=600,width=800,left=100, top=100,resizable=yes,scrollbars=yes,toolbar=no,status=no');

	if (window.focus) {newwindow.focus()}
}

function targetopener(mylink, closeme, closeonly)
{
if (! (window.focus && window.opener))return true;
window.opener.focus();
if (! closeonly)window.opener.location.href=mylink.href;
if (closeme)window.close();
return false;
}




// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
// :::::				  Filmstar Windown Pop Scrip		  :::
// :::::				  Hardcodede Pages           		  :::
// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


function buildArray() {
  var a = buildArray.arguments;
  for (i=0; i<a.length; i++) {
    this[i] = a[i];
  }
  this.length = a.length;
}

var urls1 = new buildArray("",
"min0.html","min1.html","min2.html","min3.html","min4.html","min5.html","min6.html","min7.html","min8.html","min9.html","min10.html",
"min11.html","min12.html","min13.html","min14.html","min15.html","min16.html","min17.html","min18.html","min19.html","min20.html",
"min21.html","min22.html","min23.html","min24.html","min25.html","min26.html","min27.html","min28.html","min29.html","min30.html",
"min31.html","min32.html","min33.html","min34.html","min35.html","min36.html","min37.html","min38.html","min39.html","min40.html",
"min41.html","min42.html","min43.html","min44.html","min45.html","min46.html","min47.html","min48.html","min49.html","min50.html",
"min51.html","min52.html","min53.html","min54.html","min55.html","min56.html","min57.html","min58.html","min59.html","min60.html",
"min61.html","min62.html","min63.html","min64.html","min65.html","min66.html","min67.html","min68.html","min69.html","min70.html",
"min71.html");


function doClock(){ // By Paul Davis - www.kaosweaver.com
  var t=new Date(),a=doClock.arguments,str="",i,a1,lang="1";
  var month=new Array('January','Jan', 'February','Feb', 'March','Mar', 'April','Apr', 'May','May', 'June','Jun', 'July','Jul', 'August','Aug', 'September','Sep', 'October','Oct', 'November','Nov', 'December','Dec');
  var tday= new Array('Sunday','Sun','Monday','Mon', 'Tuesday','Tue', 'Wednesday','Wed','Thursday','Thr','Friday','Fri','Saturday','Sat');
  for(i=0;i<a.length;i++) {a1=a[i].charAt(1);switch (a[i].charAt(0)) {
  case "M":if  ((Number(a1)==3) && ((t.getMonth()+1)<10)) str+="0";
  str+=(Number(a1)>1)?t.getMonth()+1:month[t.getMonth()*2+Number(a1)];break;
  case "D": if ((Number(a1)==1) && (t.getDate()<10)) str+="0";str+=t.getDate();break;
  case "Y": str+=(a1=='0')?t.getFullYear():t.getFullYear().toString().substring(2);break;
  case "W":str+=tday[t.getDay()*2+Number(a1)];break; default: str+=unescape(a[i]);}}return str;
}

function abrir_janela_popup(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

<!-- Begin

// End -->

function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function popUp(URL) {
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=250,height=325,left = 287,top = 84');");
}

function popUpcd(URL) {
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=330,height=490,left = 787,top = 184');");
}
