// JavaScript Document
function sendEmail(to,msg){
	if (msg == undefined) msg = "";
	document.location.href = "mailto:" + to + "@" + "lcfd.com" + "?subject=" + msg;}

function sendEmail2(to,thedomain,msg){
	if (msg == undefined) msg = "";
	document.location.href = "mailto:" + to + "@" + thedomain + "?subject=" + msg;}
	
function emailWebmaster(){
	theLocation = "/contact_us_popup.shtml";
	theWindow = window.open(theLocation,'500x300','width=500,height=300,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	theWindow.focus();
}
					
function hidestatus(message){
	window.status = "Welcome to the Lake Carmel Fire Department Website.";
	return true;
}
hidestatus();

function add2Favs(){
	if (document.all)
		window.external.AddFavorite("http://www.lcfd.com","Lake Carmel FD");
	else 
		alert("This feature is only available for those with the latest version of Microsoft Internet Explorer.");
}

function makeHomepage(){
document.body.style.behavior='url(#default#homepage)';
document.body.setHomePage('http://www.LCFD.com');
}

function NextYear(){
	//Used in Footer.html
	tempYear = new Date();
	tempYear = tempYear.getYear();
	if (tempYear < 1000) 
		tempYear += 1900;
	return tempYear + 1;
}

function emailThisPage(){
	theLocation = "/cgi/emailFriend/emailFriend.cgi?URL=" + window.location + "&title=" + document.title;
	theWindow = window.open(theLocation,'550x350','width=550,height=350,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
	//center_popup();
	theWindow.focus();
}
function imThisPage(){
	self.location = "aim:goim?message=%3ca+href=%22" + window.location + "%22%3eYou+have+to+see+this+website%21%3c%2fa%3e";
}
function printThisPage(){
	//Display a Printer-Friendly version of this page
	theLocation = "/cgi/PrinterFriendly.cgi?doc=" + window.location;
	theWindow = window.open(theLocation,'800x600','width=800,height=600,toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=no');
	theWindow.moveTo(0,0);
	theWindow.focus();
}

function openNewWindow(theURL,winName,features) {
  window.open(theURL,winName,features);
}

// Script Source: CodeLifter.com
// Copyright 2003
// Do not remove this notice.

// SETUPS:
// ===============================

// Set the horizontal and vertical position for the popup

PositionX = 100;
PositionY = 100;

// Set these value approximately 20 pixels greater than the
// size of the largest image to be used (needed for Netscape)

defaultWidth  = 500;
defaultHeight = 500;

// Set autoclose true to have the window close automatically
// Set autoclose false to allow multiple popup windows

var AutoClose = true;

// Do not edit below this line...
// ================================
	if (parseInt(navigator.appVersion.charAt(0))>=4){
		var isNN=(navigator.appName=="Netscape")?1:0;
		var isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}
		var optNN='scrollbars=no,status=no,width='+defaultWidth+',height='+defaultHeight+',left='+PositionX+',top='+PositionY;
		var optIE='scrollbars=no,status=no,width=150,height=100,left='+PositionX+',top='+PositionY;
		function popupPic(imageURL,imageTitle){
			if (isNN){imgWin=window.open('about:blank','',optNN);}
			if (isIE){imgWin=window.open('about:blank','',optIE);}
			with (imgWin.document){
				writeln('<html><head><title>Loading...</title><style>body{margin:0px;}</style>');writeln('<sc'+'ript>');
				writeln('var isNN,isIE;');writeln('if (parseInt(navigator.appVersion.charAt(0))>=4){');
				writeln('isNN=(navigator.appName=="Netscape")?1:0;');writeln('isIE=(navigator.appName.indexOf("Microsoft")!=-1)?1:0;}');
				writeln('function reSizeToImage(){');writeln('if (isIE){');writeln('window.resizeTo(100,100);');
				writeln('width=100-(document.body.clientWidth-document.images[0].width);');
				writeln('height=100-(document.body.clientHeight-document.images[0].height);');
				writeln('window.resizeTo(width,height);}');writeln('if (isNN){');       
				writeln('window.innerWidth=document.images["picWindow"].width;');writeln('window.innerHeight=document.images["picWindow"].height;}}');
				writeln('function doTitle(){document.title="'+imageTitle+'";}');writeln('</sc'+'ript>');
			if (!AutoClose) 
				writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()">')
			else 
				writeln('</head><body bgcolor=000000 scroll="no" onload="reSizeToImage();doTitle();self.focus()" onblur=setTimeout("self.close()",2000)>');
			writeln('<a href="#" onclick="javascript:self.print();" title="Click To Print Picture"><img name="picWindow" src='+imageURL+' style="display:block" border="0"></a></body></html>');
			close();		
	}
}