// Set TextSize cookie, read by common_css.asp, with 30 day expiration date.
function ts1() {
var expires = new Date();
expires.setDate(expires.getDate() + 30); 
document.cookie = "TextSize=1; expires=" + expires.toGMTString() + "; path=/;";
window.location.reload();
}

function ts2() {
var expires = new Date();
expires.setDate(expires.getDate() + 30);
document.cookie = "TextSize=2; expires=" + expires.toGMTString() + "; path=/;";
window.location.reload();
}

function ts3() {
var expires = new Date();
expires.setDate(expires.getDate() + 30);
document.cookie = "TextSize=3; expires=" + expires.toGMTString() + "; path=/;";
window.location.reload();
}

// Clear Starting Text in Input Box

function clearDefault(el) {
  if (el.defaultValue==el.value) el.value = ""
}

// Standard Popup Functions
function popup1(url, width, height) {var Win = window.open(url,"window1_name",'width=' + width + ',height=' + height + ',resizable=0,scrollbars=no,menubar=no,left = 50,top = 50' )}
function popup2(url, width, height) {var Win = window.open(url,"window2_name",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=yes,left = 50,top = 50')}
function popup3(url, width, height) {var Win = window.open(url,"window3_name",'width=' + width + ',height=' + height + ',resizable=1,scrollbars=yes,menubar=yes,left = 50,top = 50')}
function popup4(url,w,h){LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;TopPosition = (screen.height) ? (screen.height-h)/2 : 0;settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',resizable=no,scrollbars=no';win = window.open(url,"window4_name",settings)}
function popup5(url,w,h){LeftPosition = (screen.width) ? (screen.width-w)/2 : 0;TopPosition = 10;settings ='height='+h+',width='+w+',top='+TopPosition+',left='+LeftPosition+',resizable=yes,scrollbars=yes,menubar=yes';win = window.open(url,"window4_name",settings)}
function fullScreen(theURL) {window.open(theURL, '', 'fullscreen,scrollbars,resizable')}

// Printer Friendly Function
function PrinterFriendly() { 
var content_vlue = document.getElementById("bodyprint").innerHTML; 
document.write('<html><head><title>Green Cay Village News - News Article</title>');
document.write('</head><body>');
document.write(content_vlue);
document.write('<br>Source <b><a href="http://www.greencayvillagenews.com">GreenCayVillageNews.com</a></b>');
var currentTime = new Date();
var month = currentTime.getMonth() + 1;
var day = currentTime.getDate();
var year = currentTime.getFullYear();
document.write(" - " + month + "/" + day + "/" + year);
document.write('</body></html>');
document.close();  
}

// Preload Standard Images

{
  pic1= new Image(25,25); 
  pic1.src="http://www.greencayvillagenews.com/images/bg_colors/corner_lt_7C952D.gif"; 

  pic2= new Image(25,25); 
  pic2.src="http://www.greencayvillagenews.com/images/bg_colors/corner_rt_7C952D.gif"; 

  pic3= new Image(25,25); 
  pic3.src="http://www.greencayvillagenews.com/images/bg_colors/corner_lb_7C952D.gif"; 

  pic4= new Image(25,25); 
  pic4.src="http://www.greencayvillagenews.com/images/bg_colors/corner_rb_7C952D.gif"; 

  pic5= new Image(2048,64); 
  pic5.src="http://www.greencayvillagenews.com/images/bg_colors/bg_2048_7C952D.gif"; 

}


