function trace(arg){
	alert(arg);
}
function clearInput(targ, string, color){
	if(targ.value == string){
		targ.value = "";
	}
	targ.style.color = color;
}
function fillInput(targ, string, color){
	if(targ.value == ""){
		targ.value = string;
	}
	targ.style.color = color;
}
function getElementsByClass(searchClass,node,tag) {
	var classElements = new Array();
	if (node == null)
		node = document;
	if (tag == null)
		tag = '*';
	var els = node.getElementsByTagName(tag);
	var elsLen = els.length;
	var pattern = new RegExp("(^|\\s)"+searchClass+"(\\s|$)");
	for (i = 0; i < elsLen; i++) {
		if (pattern.test(els[i].className) ) {
			classElements.push(els[i]);
		}
	}
	return classElements;
}
function changeBg(list, color){
	for(i in list){
		list[i].style.backgroundColor = color;
	}
}
function activateNews(){
	holders = document.getElementsByTagName("div");
	current = 0;
	for(i in holders){
		if(holders[i].className == "news_stretch"){
			holders[i].id = "newsEntry"+current;
			holders[i].getElementsByTagName("a")[0].href = "javascript:expandNews("+current+")";
			group = holders[i].getElementsByTagName("div");
			group[0].className = "news_visible";
			group[1].className = "news_hidden";
			holders[i].getElementsByTagName("a")[0].className = "link_contracted";
			current++;
		}
	}
}
function expandNews(num){
	group = document.getElementById("newsEntry"+num).getElementsByTagName("div");
	lin = document.getElementById("newsEntry"+num).getElementsByTagName("a")[0];
	snipe = group[0];
	bod = group[1];
	lin.blur();
	if(snipe.className == "news_visible"){
		lin.className = "link_expanded";
		snipe.className = "news_hidden";
		bod.className = "news_visible";
	} else {
		lin.className = "link_contracted";
		snipe.className = "news_visible";
		bod.className = "news_hidden";
	}
}
/*
function activateTour(){
	holders = document.body.getElementsByTagName("div");
	current = 0;
	for(i in holders){
		if(holders[i].className == "tour_holder"){
			holders[i].id = "tour_holder"+current;
			holders[i].childNodes[1].href = "javascript:showTour("+current+")";
			holders[i].childNodes[1].id = "link"+current;
			holders[i].childNodes[3].className = "tour_hidden";
			current++;
		}
	}
}
function showTour(num){
	d = document.getElementById("tour_holder"+num).getElementsByTagName("div")[0];
	lin = document.getElementById("link"+num);
	lin.blur();
	if(d.className == "tour_hidden"){
		d.className = "tour_visible";
		lin.className = "tour_selected";
		if(num == 0) lin.style.marginTop = "0px";
	} else {
		d.className = "tour_hidden";
		lin.className = num/2 == Math.round(num/2) ? "tour_white" : "tour_gray";
	}
}
*/
function resizeMovie(num){
	document.getElementById('albums').height = num;
}