<!--//hidden

////////////////////////////////////////////////////////
// Coded by Jesse Knowles | http://www.jesseknowles.com
// description: Common functions used in most websites
// Author: jesse@jesseknowles.com
// Last Modified: 07-09-03
////////////////////////////////////////////////////////

//////////////////////
// Status Bar Message
//////////////////////

window.defaultStatus="TRIPLE CROWN STOCKS";

////////////////////////////////////
// Popup window in center of screen
////////////////////////////////////

var popupDir = null; // this is to tell the popup that we are in the root dir

function popupWin(thisLink,popWidth,popHeight){
	var winleft = (screen.width - popWidth) / 2;
	var winUp = (screen.height - popHeight) / 2;
	window.open(thisLink, 'popup','toolbar=no, scrollbars=no, resizable=yes,width='+popWidth+',height='+popHeight+',left='+winleft+',top='+winUp);
}

function popupPrint(thisLink){
	popWidth = 510;
	popHeight = 480;
	var winleft = (screen.width - popWidth) / 2;
	var winUp = (screen.height - popHeight) / 2;
	window.open(thisLink, 'popup','toolbar=no, scrollbars=yes, resizable=yes,width='+popWidth+',height='+popHeight+',left='+winleft+',top='+winUp);
}


//////////////////
// show or hide id
//////////////////

function showHide(ctrl){
	if(document.getElementById(ctrl).style.display == "none"){ document.getElementById(ctrl).style.display = ""; }
	else{ document.getElementById(ctrl).style.display = "none"; }
}

//////////////////////////////////////////////////
// sets onblur and onfocus values of form elements
//////////////////////////////////////////////////

function formFocus(ctrl, initVal){
	if(ctrl.value == '' || ctrl.value == initVal){ 
		ctrl.className = "focus";
		if(initVal != ''){
			ctrl.value = '';
		}
	}
}

function formBlur(ctrl, initVal){
	if(ctrl.value == '' || ctrl.value == initVal){ 
		ctrl.className=''; 
		if(initVal != ''){
			ctrl.value = initVal;
		}
	}		
}

//////////////////////////////////////////////////
// cookie functions
//////////////////////////////////////////////////

function setCookie(cookieName,cookieValue,nDays) {
 	var today = new Date();
 	var expire = new Date();
 	if (nDays==null || nDays==0) nDays=1;
 	expire.setTime(today.getTime() + 3600000*24*nDays);
 	document.cookie = cookieName+"="+escape(cookieValue) + ";expires="+expire.toGMTString()+";path=/";
}

function readCookie(cookieName) {
 	var theCookie=""+document.cookie;
 	var ind=theCookie.indexOf(cookieName);
 	if (ind==-1 || cookieName=="") return ""; 
 	var ind1=theCookie.indexOf(';',ind);
 	if (ind1==-1) ind1=theCookie.length; 
 	return unescape(theCookie.substring(ind+cookieName.length+1,ind1));
}

function killCookie(cookieName){
 	var today = new Date();
 	var expire = new Date();
	nDays=-1;
 	expire.setTime(today.getTime() + 3600000*24*nDays);
 	document.cookie = cookieName+"=0;expires="+expire.toGMTString()+";path=/";
}

// -->