<!-- 

function popUp(URL, width, height) {
 day = new Date();
 id = day.getTime();
 eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width="+width+",height="+height+",left=50%,top=50%');");
}

var hide  = true;

function turnOn (obj) {
	document.getElementById(obj).style.display = 'table-row'
}

function turnOff (obj) {
	document.getElementById(obj).style.display = 'none'
}


function showECard (id, start, end) {
	for (i=start; i <= end; i++) {
		document.getElementById("cardPreview"+i).style.display = 'none';
	}
	document.getElementById("cardPreview"+id).style.display = 'block';

}

function hideECard (obj) {
	document.getElementById(obj).style.display = 'none'
}


function showhide(obj, objId) {
	var x = new getObj(objId);
	hide = !hide;
	/* x.style.visibility = (hide) ? 'hidden' : 'visible'; */
	x.style.display = (hide) ? 'none' : 'block';
	setLyr(obj,objId);
}

function setLyr(obj,objId) {
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	newY += 15;
	var x = new getObj(objId);
	x.style.top = newY + 'px';
	x.style.left = newX + 'px';
}

function findPosX(obj) {
	var curleft = 0;
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj) {
	var curtop = 0;
	var printstring = '';
	if (obj.offsetParent) {
		while (obj.offsetParent) {
			printstring += ' element ' + obj.tagName + ' has ' + obj.offsetTop;
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	window.status = printstring;
	return curtop;
}


function getObj(name) {
	if (document.getElementById) {
	   this.obj = document.getElementById(name);
	   this.style = document.getElementById(name).style;
	} else if (document.all) {
	   this.obj = document.all[name];
	   this.style = document.all[name].style;
 	} else if (document.layers) {
		if (document.layers[name]) {
			this.obj = document.layers[name];
			this.style = document.layers[name];
	   	} else {
			this.obj = document.layers.objId.layers[name];
			this.style = document.layers.objId.layers[name];
	   }
 	}
}


function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.value = limitNum - limitField.value.length;
	}

	if (limitField.value.match(/\n{21}/)) {
		alert('You have reached the maximum amount of lines')
	}
}

-->

