var headTimeOn = null;
if (document.images){

}
function rollTab(id,dir){

    eval('$(\''+id+'\').style.background = "#ffffff url(\'../images/tab_on.jpg\') top left no-repeat";');
}

function roll(sname,rname){
    sname.src = rname.src;
}
function id2elem(id) {
	if (typeof(id) != 'string') {
		return id;
	}
	if (document.getElementById) {
		id = document.getElementById(id);
	} else if (document.all) {
		id=document.all[id];
	} else {
		id = null;
	}
	return id;
}
function popup(url,width,height){
    nw = window.open(url,"newwindow","width="+width+",height="+height+",status=0,toolbar=0,menubar=0,scrollbars=1,resizable=1,location=0");
    nw.focus();
}
function hideAllMenus(){
    $('dm2').style.display = 'none';
    $('dm3').style.display = 'none';
    $('dm4').style.display = 'none';

}
function dropMenu(n,dir){
    hideAllMenus();
    lTop = getElementTop('dl'+n);
    lLeft = getElementLeft('dl'+n);
    lHeight = getElementHeight('dl'+n);
    xpos = lLeft;
    ypos = lTop + lHeight;

    moveXY('dm'+n,xpos,ypos);
    $('dm'+n).style.display = 'block';
}
function clearHeadDropDelay(n) {
	headTimeOn = setTimeout("clearHeadDrop("+n+")", 500);
}
function clearHeadDrop(n){
    $('dm'+n).style.display = "none";
}
function dropMaintain(n){
    clearTimeout(headTimeOn);
    $('dm'+n).style.display = "block";

}

