// JavaScript Document

// State the global variables			
var xSlidein = 0;	
var leftStopPoint =  -999;  // -999;
var rightStopPoint = (screen.availWidth/2)-120;
	
// setMove activates the movement that slides in from the left side.
// Move gets the 'div' that moves onto the visible screen
// and slide in from the left.	
function setMove() {			
	if (xSlidein < rightStopPoint){		
		var n = document.getElementById('Christmas');
		xSlidein += 33;
		n.style.left = xSlidein + "px";
		window.setTimeout("setMove();",10);
		window.setTimeout("dismissMove();",10000);
	}			
}
// dismissMove activates the movement that slides in to the left side '-999px'.
// dismissMove doesn't hide the 'div', but instead it moves it
// to a negative number of pixel off the visible screen.
function dismissMove() {
	do {
			
		var elem = document.getElementById('Christmas');		
		xSlidein -= 33;
		elem.style.left = xSlidein + "px";	
		setTimeout("dismissMove();",10);		
		c_link=document.getElementsByTagName('A');
		if(c_link.id=="url") {
			getNewURL();
		}else {			
		return false;		
		}		
	}while(xSlidein >= leftStopPoint);
}	
// Opens the URL
function getNewURL() {	location.replace(document.getElementById('url').href);	}
function Activate() {setTimeout("setMove();",5000);}
function holidayNote() {
	document.write('<div id="Christmas"><img src="http://www.keystonecapitalonline.com/images/quickquote-popup2.gif" alt="" width="285" height="164" border="0" usemap="#quoteMap" />')
	document.write('<div style="position:relative;margin:0px;padding:0px;left:0px;top:-162px;width:285px;height:22px;text-align:center;" align="center"><p style="margin:0px;padding:0px;"><a href="javascript:void(0);" style="color:#0b0f84;" onClick="dismissMove();"><img src="images/quickquote-popup-close.gif" alt="close" border="0"></a></p></div>')
	document.write('<map name="quoteMap"><area shape="rect" coords="59,60,237,103" href="quote.asp" id="url" onClick="dismissMove();" alt="QUICK QUOTE">')
	document.write('</map></div>')
}
