﻿<!--
//
/*
 *	(C) 2000-2005 Heimer Engineering, P.C., 2171 Jericho Tpke, Ste 230, Commack, NY 11725.
 *	All rights reserved.
 */
/*
 *	Declarations:
 */
function dynAnimation() {}	/* Used elsewhere */
function clickSwapImg() {}	/* Used elsewhere */

/*
 *	Global variables:
 */
var dateNow;
var ImageDir;	/* Directory for preloading images */
var TopDir = "../";
/*
 *	Check if a PDA and jump if true:
 */
function CheckPDA()
{
	if ( (screen.width <= 400) || (screen.height <= 400) ) { 	/* Typical PDA dimensions in 2007		*/
		if ( (screen.width >= 20) || (screen.height >= 20) ) {	/* A very small screen must be an error */
			top.location.href = "http://www.heimer.com/mobile/index.html";
		}
	}
}
/*
 *	Various actions on loading of the home page:
 */
function NotCheckHomePage()
{
	if ( window.location.href == "http://go.heimer.com/" ) {
		top.location.href = "http://www.heimer.com/go/agreements.html";
	}
	if ( window.location.href == "http://mobile.heimer.com/" ) {
		top.location.href = "http://www.heimer.com/mobile/index.html";
	}
	if ( window.location.href == "http://epay.heimer.com/" ) {
		top.location.href = "http://www.heimer.com/epay/index.html";
	}
	if ( window.location.href == "http://team.heimer.com/" ) {
		top.location.href = "https://secure.bcentralhost.com/heimer.com/teamsite/index.html";
	}
	if ( window.location.href == "http://owa.heimer.com/" ) {
		top.location.href = "https://webmail.heimer.com/owa/";
	}

/*
 *	Check for PDA:
 */
	if ( (screen.width <= 400) || (screen.height <= 400) ) { 	/* Typical PDA dimensions in 2007		*/
		if ( (screen.width >= 20) || (screen.height >= 20) ) {	/* A very small screen must be an error */
			top.location.href = "http://www.heimer.com/mobile/index.html";
		}
	}
}

/*
 *	Move to a URL:
 */
function GoTo(Url)
{
/*
 *	Go to a URL
 */
	NewWindow = window.top;	/* Get the topmost windows (in case we are in a frame)	*/
	/*window.location.href = TopDir+Url;*/
	NewWindow.location.href = TopDir+Url;	/* Go to the topmost frame				*/
	return;
}
/*
 *	PopDir() tells GoTo() to go up one level:
 *	NoPopDir tells GoTo() to stay at the current level:
 */

function PopDir()
{
	TopDir = "../";
	return;
}
function NoPopDir()
{
	TopDir = "";
	return;
}
function GoFull(Url)
{
/*
 *	Go to a fully expanded URL
 */
	window.location.href = Url;
	return;
}

/*
 *	Write the Date and set the status:
 */
function WriteDate()
{
var theDay = new Array(	"Sunday", "Monday", "Tuesday","Wednesday",
						"Thursday", "Friday", "Saturday");
var theMonth = new Array(	"January", "February", "March", "April",
							"May", "June", "July", "August",
							"September", "October", "November", "December");
dateNow = new Date();
whichDay = theDay[dateNow.getDay()];
whichMonth = theMonth[dateNow.getMonth()];
whichDate = dateNow.getDate();
whichYear = dateNow.getYear();
/*
 *	Prevent errors from showing up:
 */
window.onerror = null;
/*
 *	Adjust date for	Netscape (Y2K version):
 */
if ( whichYear < 2000 ) {
	whichYear = whichYear + 1900;
}
whichYear = "" + whichYear;
/*
 *	Write the date:
 */

document.writeln(whichDay + ", " + whichMonth + " " + whichDate + ", " + whichYear);
/*
 *	Set the status to telephone number when we write the date:
 */
window.defaultStatus = "Call Heimer Engineering, P.C. at (800) 640-8090";

/*
 *	Return
 */
	return;
}
/*
 *	Print date at bottom:
 */
function BottomDate() {
document.write("This page was loaded:  " + dateNow + ".<br>\
Document URL:  <b><a class=\"bottomsize\" href=\"" + document.URL +"\">" + document.URL +"</a></b>.<br>");
if (document.referrer != '') {
	document.write("Referred by:  <b><a class=\"bottomsize\" href=\"" + document.referrer +"\">" + document.referrer +"</a></b>.<br>");
}
/*
 *
 */

}

/*
 *	mouse in and out:
 */
function MouseIn(Obj)
{
	Obj.style.color = '#FF0000';
	Obj.style.textDecoration = 'underline';
	return;
}
function MouseOut(Obj)
{
	Obj.style.color = '#000000';
	Obj.style.textDecoration = 'none';
	return;
}
/*
 *	Button Mouse in and out:
 */
function ButtonMouseIn(Obj1)
{
	Obj1.style.color = '#FF0000';		/* Color Object	*/
	return;
}
function ButtonMouseOut(Obj1)
{
	Obj1.style.color = '#000000';		/* Color Object	*/
	return;
}
function ButtonMouseGrey(Obj1)
{
	Obj1.style.color = '#808080';		/* Color Object	*/
	return;
}
/*
 *	Bottom mouse in and out:
 */
function BottomMouseIn(Obj1)
{
	Obj1.style.color = '#FF0000';		/* Color Object	*/
	return;
}
function BottomMouseOut(Obj1)
{
	Obj1.style.color = '#0000FF';		/* Color Object	*/
	return;
}
/*
 *	Nav Mouse in and out:
 */
function NavMouseIn(Obj1,Obj2)
{
	Obj1.style.color = '#FF0000';		/* Color Object	*/
	Obj2.style.visibility="visible";	/* See Object	*/
	return;
}
function NavMouseOut(Obj1,Obj2)
{
	Obj1.style.color = '#0000FF';		/* Color Object	*/
	Obj2.style.visibility="hidden";		/* See Object	*/
	return;
}
/*
object.style.borderBottomColor=; (Top, Left, Right);
 */
/*
 *	Menu Mouse in and out:
 */
function MenuMouseIn(Link,Cell)
{
	Link.style.color = '#FF0000';		/* Color Object		*/
	Cell.bgColor='FFFFCC';				/* Color Background	*/
	Cell.style.borderTopColor='#CC9900';
	return;
}
function MenuMouseOut(Link,Cell)
{

/*	Cell.style.borderTopColor='';*/
	Link.style.color = '#0000FF';		/* Color Object		*/
	Cell.bgColor='';					/* Clear Background	*/
	Cell.style.borderTopColor='#C7E3FF';
	return;
}

/*
 *	Cookie Support:
 */
function getCookieVal(offset) {  
	var endstr = document.cookie.indexOf (";", offset);  
	if (endstr == -1)    
		endstr = document.cookie.length;  
	return unescape(document.cookie.substring(offset, endstr));
}
/*
 *	Get a cookie:
 */
function GetCookie(name) {  
	var arg = name + "=";  
	var alen = arg.length;  
	var clen = document.cookie.length;  
	var i = 0;  
	while (i < clen) {    
		var j = i + alen;    
		if (document.cookie.substring(i, j) == arg)      
			return getCookieVal (j);    
		i = document.cookie.indexOf(" ", i) + 1;    
		if (i == 0) break;   
	}  
	return null;	/* Not found */
}
/*
 *	Set a Cookie:
 */
function SetCookie (name, value) {  
	var argv = SetCookie.arguments;  
	var argc = SetCookie.arguments.length;  
	var expires = (argc > 2) ? argv[2] : null;  
	var path = (argc > 3) ? argv[3] : null;  
	var domain = (argc > 4) ? argv[4] : null;  
	var secure = (argc > 5) ? argv[5] : false;  
	document.cookie = name + "=" + escape (value) + 
		((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + 
		((path == null) ? "" : ("; path=" + path)) +  
		((domain == null) ? "" : ("; domain=" + domain)) +    
		((secure == true) ? "; secure" : "");
}
/*
 *	Delete a cookie:
 */
function DeleteCookie (name) {  
	var exp = new Date();  
	exp.setTime (exp.getTime() - 1);  
	var cval = GetCookie (name);  
	document.cookie = name + "=" + cval + "; expires=" + exp.toGMTString();
}
/*
 *	Convert a boolean to a text:
 */
function BoolToString(Data)
{
	if ( Data ) {
		return "1";
	}
	else {
		return "0";
	}
}
/*
 *	Write pe at heimer dot com:
 */
function WritePE()
{
	document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,112,101,64,104,101,105,109,101,114,46,99,111,109,63,115,117,98,106,101,99,116,61,81,117,101,115,116,105,111,110,32,102,111,114,32,72,101,105,109,101,114,174,32,69,110,103,105,110,101,101,114,105,110,103,44,32,80,46,67,46,34,62,112,101,64,104,101,105,109,101,114,46,99,111,109,60,47,97,62))
	return;
}
/*
 *	Write webmaster with name:
 */
function WriteWM()
{
	document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,119,101,98,109,97,115,116,101,114,64,104,101,105,109,101,114,46,99,111,109,63,115,117,98,106,101,99,116,61,81,117,101,115,116,105,111,110,32,102,111,114,32,116,104,101,32,72,101,105,109,101,114,174,32,69,110,103,105,110,101,101,114,105,110,103,44,32,80,46,67,46,32,87,101,98,109,97,115,116,101,114,34,62,87,101,98,109,97,115,116,101,114,58,32,72,97,114,111,108,100,32,75,114,111,110,103,101,108,98,45,72,101,105,109,101,114,44,32,80,69,44,32,78,65,66,73,69,44,32,78,83,80,69,60,47,97,62))
	return;
}
/*
 *	Write webmaster with email address:
 */
function WriteWME()
{
	document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58,119,101,98,109,97,115,116,101,114,64,104,101,105,109,101,114,46,99,111,109,63,115,117,98,106,101,99,116,61,81,117,101,115,116,105,111,110,32,102,111,114,32,116,104,101,32,72,101,105,109,101,114,174,32,69,110,103,105,110,101,101,114,105,110,103,44,32,80,46,67,46,32,119,101,98,109,97,115,116,101,114,34,62,119,101,98,109,97,115,116,101,114,64,104,101,105,109,101,114,46,99,111,109,60,47,97,62))
	return;
}
/*
 *	Make sure we are not part of someone else's window:
 */

/*function TopWindow()
{
if ( window != top ) {
	top.location.href = location.href;
	return;
}*/

/*
 *	Email this page:
 */
function MailPage() 
{ 
	var mail_string;
	mail_string = "mailto:?subject= Heimer Engineering: " + document.title; 
	mail_string += "&body=I thought you might find the following Heimer Engineering web page interesting: " + document.title + ".  "; 
	mail_string += "Please visit this page at: " + location.href; 
	location.href = mail_string; 
	return;
} 

/*
 *	Print this page:
  */
function PrintPage()
{
	window.print();
	return;
}
/*
 *	Bookmark the page
 */
 function BookmarkPage()
 {
 	if (window.external)   {
		window.external.AddFavorite(window.location,document.title)
	}
	else { 
		alert("Sorry! Your browser doesn't support this function.");
	}
	return;
}

// End -->
