var numOfItems = null;
var itemArray = new Array();
var more = null;
var readMore = null;
var readLess = null;

function setMore(){
	readMore = new makeObjects('readMore');
	readLess = new makeObjects('readLess');
	more = new makeObjects('more');
//end setMore
}

function load(num){
	numOfItems = num;
	for(i=1; i <= numOfItems; i++){
		itemArray[i] = new makeObjects('itemNum' + i);
		itemArray[i].hideItem();
	}
//end load
}

function toggleItem(s){
	if(itemArray[s].css.display == 'none'){
		itemArray[s].showItem();
		for(i=1; i <= numOfItems; i++){
			if(i != s){ itemArray[i].hideItem(); }
		}
	}else{ itemArray[s].hideItem(); }
//end toggleItem
}

function makeObjects(obj){
	this.dom = getDOM(obj,0);
	this.css = this.dom.style;
	this.hideItem = hideItem;
	this.showItem = showItem;
	return this;
//end makeObjects
}

function openPrint(){
	for(i=1; i <= numOfItems; i++){
		itemArray[i].showItem();
	}
	window.print();
	setTimeout('closeAll()',2500);
//end openPrint
}

function openAll(){
	for(i=1; i <= numOfItems; i++){
		itemArray[i].showItem();
	}
//end closeAll
}

function closeAll(){
	for(i=1; i <= numOfItems; i++){
		itemArray[i].hideItem();
	}
//end closeAll
}

function showMore(){
	if(more.css.display == 'block'){ more.hideItem(); }
	else{ more.showItem(); }
}

function hideMore(){
	if(more.css.display == 'none'){ more.showItem(); }
	else{ more.hideItem(); }
}

//method functions
function hideItem(){ this.css.display = 'none'; } 
function showItem(){ this.css.display = 'block'; }
