// JavaScript Document
function showDiv(id){
	getElementsByClass('quickBox',document,'div','show');
document.getElementById(id).style.visibility = 'visible';
document.getElementById(id).style.display = 'block';
}
function actBtn(id){
	getElementsByClass('quickItems',document,'div','class');
	document.getElementById(id).className = 'quickItems quickShow';
}
function getElementsByClass(searchClass,node,tag,type) {
	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, j = 0; i < elsLen; i++) {
		if ( pattern.test(els[i].className) ) {
			classElements[j] = els[i];
			if(type=="show"){
				els[i].style.display = 'none';
				els[i].style.visibility = 'hidden';
			}
			if(type=="class"){
				els[i].className = 'quickItems';
			}
			j++;
			
		}
	}
	return classElements;
}

/* ------------------------------------------------------------------------*/
/*  all other popups from http://www.alistapart.com/articles/popuplinks/   */
/* ------------------------------------------------------------------------*/

//var _POPUP_FEATURES = 'location=0, statusbar=0, menubar=0, width=400, height=300';
var _POPUP_FEATURES = '';

function raw_popup(url, target, features) {
	if (isUndefined(features)) {
		features = _POPUP_FEATURES;
	}
	if (isUndefined(target)) {
		target = '_blank';
	}
	var theWindow = window.open(url, target, features);
	theWindow.focus();
	return theWindow;
}

function link_popup(src, features) {
	return raw_popup(src.getAttribute('href'), src.getAttribute('target') || '_blank', features);
}

function isUndefined(v) {
	var undef;
	return v===undef;
}