var m_szCursor = "" ;

function utility_set_cursor( oWindow, szCursor) {
	var i = 0 ;
	var oWin = oWindow ;
	for( i=0; i<oWin.frames.length;i++) {
		if (szCursor == "") {
			oWin.frames[i].document.body.style.cursor = "default" ;
		}
		else {
			oWin.frames[i].document.body.style.cursor = "url(" + szCursor + ")" ;
		}	
		utility_set_cursor( oWin.frames[i], szCursor) ;
	}
	return 0 ;	
}

function utility_show_drag_channel_information( szID, szName, srcEvent ) {
	if (defSPN_DragChannelInfo.style.display == 'inline') return ;
	
	m_nDragChannel = szID ;
	defSPN_DragChannelInfo.innerHTML = szID + '-' + szName ;
	defSPN_DragChannelInfo.style.display = 'inline' ;

	m_szCursor = szFileBase + "customization\\images\\tree\\icon_drag.cur" ;

	utility_set_cursor( top, m_szCursor) ;

	utility_show_drag_channel_position( srcEvent ) ;
}

function utility_show_drag_channel_position( srcEvent ) {
	if (defSPN_DragChannelInfo.style.display == 'inline') {
		defSPN_DragChannelInfo.style.left = srcEvent.screenX + 15 ;
		defSPN_DragChannelInfo.style.top  = srcEvent.screenY - 20 ;
	}
}

function utility_show_drag_channel_position_over_control(offsetX, offsetY, x, y) {
	if (defSPN_DragChannelInfo.style.display == 'inline') {
		defSPN_DragChannelInfo.style.left = offsetX + x + 15 ;
		defSPN_DragChannelInfo.style.top  = offsetY + y + 90 ;
	}		
}

function utility_hide_drag_channel_information() {
	if ( m_nDragChannel != 0 ) {
		m_nDragChannel = 0 ;
		
		defSPN_DragChannelInfo.innerHTML = '' ;
		defSPN_DragChannelInfo.style.display = 'none' ;
		
		utility_set_cursor( top, "") ;
	}

    switch (top.m_szAppDefine) {
        case "ACTIVEMONITOR" :
        case "RPREVIEW.HTM" :
            if (defFRM_Main.prev_nActiveMedia >= 1) {
                szT = "top.Media" + defFRM_Main.prev_nActiveMedia + ".focus() ;"
                setTimeout( 'eval( szT ) ;', 300 ) ;
            }
            
            break ;
    }
}

function utility_hide_ie_manu(srcEvent) {
    return false ;
}