<!--

var overImg = null;
var normImg = null;

var loadDone = false;


////////////////////////////////////////////////////////////////////////
/* bookmark function for numeruos browsers  */

function bookmarkinit() {
var IE = navigator.appName.match(/(Microsoft Internet Explorer)/gi), 
    NS = navigator.appName.match(/(Netscape)/gi), 
    OP = navigator.appName.match(/(Opera)/gi), 
    BK = document.getElementById("bookmark");



    BK.onmouseout = function(){ 
       window.status = ''; 
       return true; 
    } 

    if(IE && document.uniqueID){ 
       BK.onclick = function(){ 
          window.external.AddFavorite(location.href,document.title); 
       } 
       BK.onmouseover = function(){ 
          window.status='Click to add this page to your '+RegExp.$1+' favorites'; 
          return true; 
       } 
    } 

    else if(OP || IE && !document.uniqueID){ 
       BK.onclick = function(){ 
          alert('Your '+RegExp.$1+' browser requires that you\nPress Ctrl & D to Bookmark this page.'); 
       } 
       BK.onmouseover = function(){ 
          window.status='Your '+RegExp.$1+' browser requires that you Press Ctrl & D to Bookmark this page.'; 
          return true; 
       } 
    } 

    else if(NS){ 
       BK.onclick = function(){ 
          alert('Your '+RegExp.$1+' browser requires that you\nPress Ctrl & D to Bookmark this page.'); 
       } 
       BK.onmouseover = function(){ 
          window.status='Your '+RegExp.$1+' browser requires that you press Ctrl & D to Bookmark this page.'; 
          return true; 
       } 
    } 

    else{ BK.innerHTML = '' }

}

///////////////////////////////////////////////////////////////////////////////////////////////

function setObjHeight(objone, objtwo, ival){
	var objoneHeight = 0;	
	var objtwoHeight = 0;
	
	if(objone != 'null'){
		objoneHeight = objone.clientHeight;	
	}
	if(objtwo != 'null'){
		objtwoHeight = objtwo.clientHeight;
	}
	
	if (parseInt(objoneHeight) > parseInt(objtwoHeight + ival) ) {
		var dif = objoneHeight - objtwoHeight - ival;
		if(objtwo != 'null'){
			objtwo.style.paddingBottom = String(dif) + "px";
		}		
	} 
}

////////////////////////////////////////////////////////////////////////

/* function for body.onLoad */

function initPage() {
	preloadMenu(8);
	loadDone = true;
}

////////////////////////////////////////////////////////////////////////

/* functions for menu and other images */
function preloadMenu(count) {
	overImg = new preloadImages(count, "/data/images/design/menu/menu-", "-on.gif");
	normImg = new preloadImages(count, "/data/images/design/menu/menu-", "-off.gif");
}

function preloadImages(length, path, type) {
    for(var i = 2; i <= length; i++) {
	this[i]= new Image();
	this[i].src= path + i + type;
    }
    return this;
}

function rollOn(num) {
    if(loadDone && document.images) { 
	document.images["m-" + num].src = overImg[num].src;
    }
}

function rollOff(num) {
    if(loadDone && document.images){
	document.images["m-" + num].src = normImg[num].src;
    }
}

function sizeImg(obj, _width) {
    var tmpImg = new Image();
    tmpImg.src = obj.src;
    if (tmpImg.width > _width) { obj.width = _width; }
}

////////////////////////////////////////////////////////////////////////

/* function to open print\email window */

function PrinterFriendly(url) {
    var width = 700,
        height = 550;

    remote = window.open("http://" + getDomainName() + url, "opener", "scrollbars=1,resizable=1,toolbar=1,left=" + ((screen.availWidth  - width) / 2) + ",top=" + ((screen.availHeight  - height) / 2) + ",width=" + width + ",height=" + height);

    if (remote.opener == null) remote.opener = window;
}

function getDomainName() {
	/*var url = window.location.href;
	var end = url.indexOf("/", 7);
	if (end == -1) { end = url.length; }
	return url.substring(7, end);*/
	return "www.firegrantshelp.com";
}

/* function that show tip on your status bar when you take mouse over print\email link */

function showText(obj) {
    obj.onmouseout = function() { window.status = ""; }
    window.status = obj.innerText;
}



function addLoadEvent(func) {
        var oldonload = window.onload;
        if (typeof window.onload != 'function') {
                window.onload = func;
        }
        else {
                window.onload = function() {
                        oldonload();
                        func();
                }
        }
}

////////////////////////////////////////////////////////////////////////

/* functions that check different forms for correct information */



//-->
