// 7 DAY PUL DOWN
function prevdate() {
  var d = document.datechoice.date;
  var n = d.selectedIndex;
  document.location = "<pbs:prog>/section?Category=<pbs:category>&Date=" + d.options[n].value;
}


// GNS VARIABLE
    var gnsSite="poughkeepsiejournal";
    

// CLEAR TEXT FIELD
    function clearText(thefield){
    if (thefield.defaultValue==thefield.value)
    thefield.value = ""
    }
    

// NO FRAMES
function gotourl(form) {
		if (form.navig.options[form.navig.selectedIndex].value != "nogo"){
		location.href = (form.navig.options[form.navig.selectedIndex].value)
	}
}
<!-- hide // Copyright 1997 Los Angeles Times  travis.smith@latimes.com  All Rights Reserved - Used With Permission
	var caught = 0;
		if (top.frames.length != 0) {
        caught++;
        if (caught != 0) {
        alert ("Thank you for visiting! We prefer that Poughkeepsie Journal Online remains unframed.");
                top.location=self.document.location;
	}
}
// end hide -->


// ROLLOVER IMAGES
function SwapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function PreloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=PreloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function SwapImage() { //v3.0
var i,j=0,x,a=SwapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=FindObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}


// FONT SIZE MANAGEMENT 
function FindObj(n, d) { //v4.01
var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=FindObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function ChangeProp(objName,x,theProp,theValue) { //v6.0
var obj = FindObj(objName);
if (obj && (theProp.indexOf("style.")==-1 || obj.style)){
if (theValue == true || theValue == false)
eval("obj."+theProp+"="+theValue);
else eval("obj."+theProp+"='"+theValue+"'");
}
}


// FONT SIZE MANAGEMENT 

function LoadActualFontSize() {
tempArray = document.cookie.split(";");
for (tA = 0; tA < tempArray.length; tA++){
if (tempArray[tA].indexOf('fontSize') > -1){
fontSizeValue = tempArray[tA].split("=")
ACTUAL_FONTSIZE = parseInt(fontSizeValue[1]);
}
}
}

function SaveActualFontSize() {
var expire = new Date ();
expire.setTime (expire.getTime() + (6000 * 24 * 3600000));
expire = expire.toGMTString();
document.cookie="fontSize="+ACTUAL_FONTSIZE+"; path=/; expires="+expire;
}

function Bigger() {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE+1;
if (ACTUAL_FONTSIZE > LARGEST_FONTSIZE) { ACTUAL_FONTSIZE = LARGEST_FONTSIZE }
ChangeProp('text','','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

function Smaller() {
ACTUAL_FONTSIZE = ACTUAL_FONTSIZE-1
if (ACTUAL_FONTSIZE < SMALLEST_FONTSIZE) { ACTUAL_FONTSIZE = SMALLEST_FONTSIZE }
ChangeProp('text','','style.fontSize',ACTUAL_FONTSIZE,'SPAN');
SaveActualFontSize();
}

ACTUAL_FONTSIZE = 14;
SMALLEST_FONTSIZE = 12;
LARGEST_FONTSIZE = 20;


// POPUP
function Popup(url,name,width,height,resize,scroll) {
var dialogWin = new Object();
dialogWin.width = width;
dialogWin.height = height;
now = new Date();
var millis=now.getTime();
var mstr=""+millis;
if (navigator.appName == "Netscape") {
dialogWin.left = window.screenX + ((window.outerWidth - dialogWin.width) / 2);
dialogWin.top = window.screenY + ((window.outerHeight - dialogWin.height) / 2);
var attr = 'screenX=' + dialogWin.left + ',screenY=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
} else if (document.all) {
dialogWin.left = (screen.width - dialogWin.width) / 2;
dialogWin.top = (screen.height - dialogWin.height) / 2;
var attr = 'left=' + dialogWin.left + ',top=' + dialogWin.top + ',resizable=' + resize + ',width=' + dialogWin.width + ',height=' + dialogWin.height + ',scrollbars=' + scroll + ',menubar=no,location=no,toolbar=no,status=no,directories=no';
}
window.open(url,name,attr);
}


// BROWSER DETECTION
var BrowserName=navigator.appName;
var BrowserVersn = parseInt(navigator.appVersion);

if ((BrowserName == "Microsoft Internet Explorer") && (BrowserVersn >= 4)) {
//do nothing
}
else if ((BrowserName == "Netscape") && (BrowserVersn >= 5)) {
//do nothing
}
else if ((BrowserName == "Opera") && (BrowserVersn >= 5)) {
//do nothing
}
else if ((BrowserName == "Mozilla") && (BrowserVersn >= 4)) {
//do nothing
}
else {
Popup('/assets/v6/noncompliant.htm','noncompliant',400,350,'no','no');
// window.location.href="/assets/v6/noncompliant.htm";
}


// DATE
<!--  
var now = new Date();
var yr = now.getYear();
var mName = now.getMonth() + 1;
var dName = now.getDay() + 1;
var today = now.getDate();

var dayNr = now.getDate();
				    
if(dName==1) Day = "Sunday";
if(dName==2) Day = "Monday";
if(dName==3) Day = "Tuesday";
if(dName==4) Day = "Wednesday";
if(dName==5) Day = "Thursday";
if(dName==6) Day = "Friday";
if(dName==7) Day = "Saturday";

if(mName==1) Month="January";									
if(mName==2) Month="February";									
if(mName==3) Month="March";									
if(mName==4) Month="April";									
if(mName==5) Month="May";									
if(mName==6) Month="June";									
if(mName==7) Month="July";									
if(mName==8) Month="August";									
if(mName==9) Month="September";									
if(mName==10) Month="October";									
if(mName==11) Month="November";									
if(mName==12) Month="December";

// --------- The following is a patch to fix Y2K problems with date. -----

if (yr < 2000)
{
    yr = yr + 1900;
}

// -------------------------- End fix ------------------------------------
										


