function onDDLClick(n) {
    if (document.getElementById) {
        n = document.getElementById(n);
        n.style.display = n.style.display == 'none' ? '' : 'none';
    } else {
        eval(n+".style.display = "+n+".style.display == 'none' ? '' : 'none'");
    }
    return false;
}
function onEditFocus(inp, def) {
    if (inp.value == def) {
        inp.value = '';
    }
}

function onEditBlur(inp, def) {
    if (inp.value == '') {
        inp.value = def;
    }
}


function openImage(url, w, h) {
    wnd = window.open("", 'image', 'dependent=1,directories=0,height='+h+',width='+w+',location=0,menubar=0,resizable=0,scrollbars=0,status=0,toolbar=0');
    wnd.document.write('<'+'style type=text/css>body { padding: 0px; margin: 0px;}<'+'/style><'+'img src='+url+' width='+w+' height='+h+'><'+'/img>');
    return false;
}


function getElementsByClass( searchClass, domNode, tagName)
{
	if (domNode == null) domNode = document;
	if (tagName == null) tagName = '*';
	var el = new Array();
	var tags = domNode.getElementsByTagName(tagName);
	var tcl = " "+searchClass+" ";
	for(i=0,j=0; i<tags.length; i++) {
		var test = " " + tags[i].className + " ";
		if (test.indexOf(tcl) != -1)
			el[j++] = tags[i];
	}
	return el;
}