/*
 * The software code and documents supplied with this notice ("the Programs") are
 * the property and copyright of Taylor Paice Associates. All intellectual property and related rights,
 * whether registrable or otherwise, in any country are hereby reserved.
 * The Programs may not be copied, modified or re-sold without the express permission
 * of Taylor Paice Associates. Taylor Paice Associates reserve the right to withdraw or modify the Terms and Conditions
 * of Use at any time and without prior notification.
 *
 * Copyright (c) 2007, Taylor Paice Associates. All Rights Reserved.
 */


sfHover = function() {
	var nav = document.getElementById("nav");
	var sfEls = nav.getElementsByTagName("LI");
	for (var i=0; i<sfEls.length; i++) {
		sfEls[i].onmouseover=function() {
			this.className+=" sfhover";
		};
		sfEls[i].onmouseout=function() {
			this.className=this.className.replace(new RegExp(" sfhover\\b"), "");
		};
	}
};
if (window.attachEvent) {window.attachEvent("onload", sfHover);}

function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}

//pop-up window
function popup(url,name){
window.open (url,name,"toolbar=no,location=no,scrollbars=yes,directories=no,status=no,resizable=yes,width=480,height=300");
}

function openmap(url,name){
window.open (url,name,"toolbar=no,location=no,scrollbars=yes,directories=no,status=no,resizable=yes,width=480,height=300");
}

function popupQuote(url,name){
window.open (url,name,"toolbar=no,location=no,scrollbars=yes,directories=no,status=no,resizable=yes,width=800,height=800");
}

function setCurrent(name)  {
	var ele = document.getElementById(name);
	ele.className="current";
}

function processing() {
	var answer = confirm("We will now apply for payment\nClick on OK to continue.");
	if (answer)	{
	    var el1 = document.getElementById('formDiv');
	    el1.style.display = 'none';
	    var el2 = document.getElementById('processingDiv');
	    el2.style.display = 'block';
	    return true;
    } else {
    	return false;
    }
}

function popupSeal() {
	window.open("https://www.digi-sign.com/digi-seal/siteseal.pl?id=D30DBB0","newWin","scrollbars=no,status=yes,width=400,height=460");
}

var counter = 1;

function animate() {
	var el1 = document.getElementById('i' + counter);
	el1.src = '../common/images/orange.gif';
	if (++counter == 8) {
		counter = 1;
	}	
	var el2 = document.getElementById('i' + (counter));
	el2.src = '../common/images/white.gif';
    setTimeout(animate, 500);
}

