var currentSubMenu=null; 
function showSubMenu(objCell,menuId){
	if(currentSubMenu!=null) currentSubMenu.style.visibility='hidden';
	var objMenu=document.getElementById(menuId);
	with(objMenu.children(1).style){
		height=objMenu.offsetHeight;
		zIndex=-1;		
	}
	objMenu.filters.revealTrans.transition=5;
	objMenu.filters.revealTrans.apply();		
	with(objMenu.style){
		top=objCell.offsetTop+objCell.offsetHeight+2;
		left=objCell.offsetLeft;		
	}		
	objMenu.style.visibility='visible';		
	objMenu.filters.revealTrans.play(0.1);
	currentSubMenu=objMenu;		
}
document.onmousemove=function(){ 
	if(currentSubMenu!=undefined && currentSubMenu!=null){
		if(event.clientX<currentSubMenu.offsetLeft || event.clientX>(currentSubMenu.offsetLeft+currentSubMenu.offsetWidth) || event.clientY+document.body.scrollTop<(currentSubMenu.offsetTop - 50) || event.clientY+document.body.scrollTop>(currentSubMenu.offsetTop+currentSubMenu.offsetHeight)){
			currentSubMenu.style.visibility='hidden';
		}
	}    		
}
function newWindow(url,newWidth,newHeight,winName){
	var features="toolbar=no,status=yes,resizable=no,scrollbars=yes";
	var standardWidth=window.screen.availWidth==800?800:1024;
	var standardHeight=window.screen.availHeight==600?600:738;
	var posX=(window.screen.availWidth/2-standardWidth/2);
	var posY=(window.screen.availHeight/2-standardHeight/2);
	if(window.screen.availWidth<=1024) posX=0;
	if(window.screen.availheight<=738) posY=0;
	features=features+",width="+(standardWidth-8)+",height="+(standardHeight-50)+",top="+posY+",left="+posX;	
	var objNewWin=window.open(url,winName,features);	
	try{
		objNewWin.moveTo(window.screen.availWidth/2- standardWidth/2,window.screen.availHeight/2-standardHeight/2);
		objNewWin.resizeTo(standardWidth,standardHeight);
		objNewWin.focus();
	}
	catch(e){}
	return objNewWin;
}
