function byClass(object, classname, limitToTagName){
var output=[];
if(typeof limitToTagName == "string"){
limitToTagName=limitToTagName.toUpperCase();
	for(var i=0; i<object.childNodes.length; i++){
		if(object.nodeName==limitToTagName && object.childNodes[i].className==classname){
		output.push(object.childNodes[i]);
		};
	}
}
else{
	for(var i=0; i<object.childNodes.length; i++){
		if(object.childNodes[i].className==classname){
		output.push(object.childNodes[i]);
		};
	}
};
return output;
}

function cloner(writeme, cloneme, display, visible){
writeme=(typeof writeme=="string")? document.getElementById(writeme): writeme;
cloneme=(typeof cloneme=="string")? document.getElementById(cloneme): cloneme;
if(writeme && cloneme){
	while(writeme.childNodes.length){
	writeme.removeChild( writeme.childNodes[0] );
	}
var clone=cloneme.cloneNode(true);
writeme.appendChild(clone);
clone.style.display=display||"block";
clone.style.visibility=visible||"visible";
return clone; /*allows further manipulation*/
};
return false;
}