/*
New window link for /pages/mrnate.html
replaces | pipes with & ampersands
*/
function newWindow(newlink) {
	var arrNewWinLink = newlink.split('|');
	var newWinLink = '';
	var ampersand = '';
	if (arrNewWinLink.length > 1) {
		for (var i=0;i<arrNewWinLink.length;i++) {
			newWinLink = newWinLink+ampersand+arrNewWinLink[i];
			ampersand = '&';
		}
	} else {
		newWinLink = newlink;
	}
	var newWin = window.open();
	newWin.location.href = newWinLink;
}

// hilights with a color
function hilight(that,color) {
	that.style.backgroundColor=color;
}
// changes the class name of an object
function changeClass(that,className) {
	that.className = className;
}

function getObj(objID) {
	var obj = '';
	if(document.all){
		obj=document.all[objID];
	}else if(document.getElementById){
		obj=document.getElementById(objID);
	}else{
		obj=window[objID];
	}
	return obj;
}

function popBlogComments(entry) {
	var u='o';var o=(4!=4*4).toString().charAt((0==0).toString().length-1);
	var w=eval('wind'+u+'w');var t='';
	var oo=u+'p'+o+'n';
	blogComments=null;
	if (!blogComments||blogComments.closed) {
		blogComments = w[oo+t]('comment.cfm?entry='+entry,'comment','width=340,h'+o+'ight=380');
	} else {
		blogComments.focus();
	}
}

/* set of functions to provide hints on inputs */
function inputFocus(that,txt) {
	if(that.value==txt){
		that.value='';
	}
}
function inputBlur(that,txt) {
	if(that.value.length==0){
		that.value=txt;
	}
}


// for cfeclipse table of contents
function partialCollapse(ltr,that) {
	obj = getObj('toc'+ltr)
	if (obj.className=='expand') {
		obj.className = '';
		that.innerHTML='+';
	} else {
		obj.className = 'expand';
		that.innerHTML='-'
	}
}
