function GetSourceElement(event)
{
    return event.srcElement ? event.srcElement : event.target;
}

function noenter(event) 
{
	return !(event && event.keyCode == 13); 
}

function resetif(event, text) 
{
	if(event.srcElement && event.srcElement.value==text)
		event.srcElement.value = "";
	
	if(event.target && event.target.value==text)
		event.target.value = "";
}


function AbsUrl(sAbsUrl)
{
	if(sAbsUrl.length==0 || sAbsUrl.indexOf(":")>=0)
		return sAbsUrl;
		
	var sLocation = location.pathname.toLowerCase().split("\\").join("/");
	var iIndex    = -1;
		
	if(sAbsUrl.substr(0,1)!='/')
		iIndex = sLocation.lastIndexOf("/")+1;

/*	if(iIndex==-1)	iIndex = sLocation.indexOf("/help/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/pilot/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/toolkit_homepage/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/mod1/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/mod2/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/mod3/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/mod4/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/mod5/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/toolkit/");
	if(iIndex==-1)	iIndex = sLocation.indexOf("/default.aspx-pid=318.htm");*/

	var sRoot = location.pathname.substr(0, iIndex);

	return sRoot+sAbsUrl;
}

function GotoUrl(sUrl)
{
	window.location = AbsUrl(sUrl);
}

function IsOffline()
{
    return typeof(IS_OFFLINE)!="undefined" && IS_OFFLINE;
}

function GetRoot()
{
    if(typeof(OFFLINE_ROOT_DIR)!="undefined")
        return OFFLINE_ROOT_DIR;

    //OFFLINE_ROOT_DIR -->  from <!-- @ROOTDIR --> of page template
    return "/";
}

function Popup(url, width, height)
{
	if(width==null) width=650;
	if(height==null) height=550;
	
	var wnd = window.open(AbsUrl(url),"","toolbar=no,width="+width+",height="+height+",directories=no,status=no,scrollbars=yes,resize=yes,menubar=no");
        
    if(wnd!=null)	wnd.focus();
    else			alert("Popup window cannot be opened.");
}

function PopupBig(url)
{
	var wnd = window.open(AbsUrl(url),"","toolbar=no,width=800,height=600,directories=no,status=no,scrollbars=yes,resize=yes,menubar=no");
        
    if(wnd!=null)	wnd.focus();
    else			alert("Popup window cannot be opened.");
}

function _CO(OptionList) 
{
   for (x = OptionList.length; x >= 0; x--) 
   {
      OptionList[x] = null;
   }
}

function _RO(OptionList)
{
	_CO(OptionList);
	for(var i=0; i<8; ++i) _AO1(OptionList,"");
}

function _AO1(OptionList, OptionText) 
{
   // Add option to the bottom of the list
   OptionList[OptionList.length] = new Option(OptionText, OptionText);
}

function _AO2(OptionList, OptionText, OptionValue) 
{
   // Add option to the bottom of the list
   OptionList[OptionList.length] = new Option(OptionText, OptionValue);
}

// MENU FUNCTIONS

function _MUrl(sUrl)
{
    if(IsOffline()) 
    {
        if(sUrl.indexOf("/") == 0)
            sUrl = GetRoot() + sUrl.substr(1);
    
        if(sUrl.lastIndexOf("/") == sUrl.length-1)
            sUrl+= "default.html"
        sUrl = sUrl.replace(/.shtml/g, ".html");
        sUrl = sUrl.replace(/.aspx/g,  ".html");
    }
    
    return sUrl.toLowerCase();
}


function _ML()
{
	document.writeln("<tr><td colspan=2><img src='"+GetRoot()+"images/ms.gif' height=2 width=150></td></tr>")
}

function _MIO(sTitle, sUrl)
{
	_ML()
	document.writeln("<tr><td><img src='"+GetRoot()+"images/ab.gif'></td><td height=18 width=135><a href='"+_MUrl(sUrl)+"' class=mlink>"+sTitle+"</a></td></tr>")
}

function _MIC(sTitle, sUrl)
{
	_ML()
	document.writeln("<tr><td><img src='"+GetRoot()+"images/ar.gif'></td><td height=18 width=135><a href='"+_MUrl(sUrl)+"' class=mlink>"+sTitle+"</a></td></tr>")
}

function _MIS(sTitle, sUrl)
{
	document.writeln("<tr bgcolor=FAFCF8><td>&nbsp;</td><td height=18 width=135><a href='"+_MUrl(sUrl)+"' class=mlink>"+sTitle+"</a></td></tr>")
}

function _MS(sTitle)
{
	_ML()
	document.writeln("<tr><td colspan=2 height=18 width=135><span class=mlinkb>&nbsp;&nbsp;"+sTitle+"</span></td></tr>")
}


function _DelWarning()
{
	return _Confirm('You are about to delete this item. Are you sure you wish to continue?');
}

function _ConvertWarning()
{
	return _Confirm('You are about to convert this module. '  
	+ 'The conversion may not be successful and you cannot undo this action.' 
	+ '\n\nAre you sure you wish to continue?');
}

function _Confirm(message)
{
	var bResult = confirm(message);
	
	if(document.all && event!=null)
		event.returnValue = bResult;
		
	return bResult;	
}


function _DisableControl(event)
{
    if(event.target==null)
        event.target = event.srcElement;

    if(event.target!=null)
        event.target.disabled=true;
}



function EditList_Init(sID)
{
	var oList  = document.forms[0].elements[sID+":CSelection"];
	var oValue = document.forms[0].elements[sID+":CValue"];
	
	var sValues = oValue.value.split(";");
	
	for(var i=0; i!=sValues.length; ++i)
	{
		var sValue = sValues[i].replace(/&s/g, ";").replace(/&a/g, "&");
	
		if(sValue!="")
			oList.options[oList.options.length] = new Option(sValue, sValue);
	}
}

function EditList_Add(sID)
{
	var oVoc   = document.forms[0].elements[sID+":CVocabulary"];
	var oText  = document.forms[0].elements[sID+":COther"];
	var oValue = document.forms[0].elements[sID+":CValue"];
	var oList  = document.forms[0].elements[sID+":CSelection"];
	
	var sNew = oText.value;
	
	if(sNew=="")
		sNew = oVoc.options[oVoc.selectedIndex].text;
	
	oList.options[oList.options.length] = new Option(sNew, sNew);

	oText.value = "";
	oVoc.value = "";
	
	EditList_Rebuild(sID);
}

function EditList_Rebuild(sID)
{
	var oValue = document.forms[0].elements[sID+":CValue"];
	var oList  = document.forms[0].elements[sID+":CSelection"];
	
	oValue.value = "";
	
	for(var i=0; i!=oList.options.length; ++i)
	{
		var sText  = oList.options[i].text;
		var sValue = sText.replace(/&/g, "&a").replace(/;/g, "&s");
		
		oValue.value += sValue + ";";
	}
}

function EditList_Del(sID)
{
	var oList  = document.forms[0].elements[sID+":CSelection"];
	
	if(oList.selectedIndex>=0)
		oList.options[oList.selectedIndex] = null;
	
	EditList_Rebuild(sID)
}

var IsPrinterFriendly = false;
var FontSize = 0;

function OnPrint()
{
	IsPrinterFriendly = !IsPrinterFriendly;
		
	if(GetElementByID("CHeaderRow"    )!=null) GetElementByID("CHeaderRow"    ).style.display = IsPrinterFriendly ? "none" : "";
	if(GetElementByID("CFooterMenu"   )!=null) GetElementByID("CFooterMenu"   ).style.display = IsPrinterFriendly ? "none" : "";
	if(GetElementByID("CLeftSeparator")!=null) GetElementByID("CLeftSeparator").style.display = IsPrinterFriendly ? "none" : "";
	if(GetElementByID("CLeftHolder"   )!=null) GetElementByID("CLeftHolder"   ).style.display = IsPrinterFriendly ? "none" : "";
	if(GetElementByID("CRightCell"    )!=null) GetElementByID("CRightCell"    ).style.display = IsPrinterFriendly ? "none" : "";

	if(GetElementByID("CPageLeft"     )!=null) GetElementByID("CPageLeft"     ).style.display = IsPrinterFriendly ? "none"  : "";
	if(GetElementByID("CPageContent"  )!=null) GetElementByID("CPageContent"  ).style.width   = IsPrinterFriendly ? "920px" : "740px";
}

function FontInc(sizeOffset)
{
    $(".cmsText,.cmsBold,.hlite,.hliteb,.cmsH1,.cmsH2,.cmsH3,.cmsH4,.cmsH5").each(function(i)
    {
        var iSize = null;
        var sSize = $(this).css("font-size").toLocaleLowerCase();
        
        var sSuffix = "";
        var iSuffix = -1;
        
        if(iSuffix<0) iSuffix = sSize.indexOf("px");
        if(iSuffix<0) iSuffix = sSize.indexOf("pt");
        if(iSuffix>0) 
        {
            sSuffix = sSize.substr(iSuffix);
            sSize   = sSize.substr(0, iSuffix)
        }
        
        iSize = new Number(sSize);
        
        if(isNaN(iSize)) return;
        
        iSize += sizeOffset;
        
        if(iSize<8)  return;
        if(iSize>24) return;
        
        $(this).css("font-size", ""+iSize+sSuffix);        
    });
}

function OnFontInc()
{
    FontInc(1);
}

function OnFontDec()
{
    FontInc(-1);
}


function mie()
{
	event.srcElement.obc = event.srcElement.style.backgroundColor;
	event.srcElement.style.backgroundColor = "#C5C5B1";
}

function mil()
{
	event.srcElement.style.backgroundColor = event.srcElement.obc;
}

function mic()
{
	GotoUrl(event.srcElement.url);
}

function GetRadioValue(element) 
{
    var theRadio = element;

    if(typeof(theRadio)!="undefined") 
    {
        if(typeof(theRadio.length)=="undefined")
            theRadio = new Array(theRadio);

        for(var i=0; i<theRadio.length; i++) 
        {
            if(theRadio[i].checked) 
            {
                return theRadio[i].value;
            }
        }
	}
	return null;
}

//==================================================
//
// Call specified function only if defined
//
//==================================================
function GetElementByID(id)
{
	return document.all ? document.all[id] : document.getElementById(id);
}


//==================================================
//
// Call specified function only if defined
//
//==================================================
function SafeCall(func)
{
    //set func == to its named value
    try
    {
        if(typeof(func)=="string")
            eval("func = "+ func +";");
    }
    catch(e) {}

    if(typeof(func)=="function")
    {
        if(arguments.length==1 ) return func();
        if(arguments.length==2 ) return func(arguments[1]);
        if(arguments.length==3 ) return func(arguments[1], arguments[2]);
        if(arguments.length==4 ) return func(arguments[1], arguments[2], arguments[3]);
        if(arguments.length==5 ) return func(arguments[1], arguments[2], arguments[3], arguments[4]);
        if(arguments.length==6 ) return func(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5]);
        if(arguments.length==7 ) return func(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6]);
        if(arguments.length==8 ) return func(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7]);
        if(arguments.length==9 ) return func(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8]);
        if(arguments.length==10) return func(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9]);
        if(arguments.length==11) return func(arguments[1], arguments[2], arguments[3], arguments[4], arguments[5], arguments[6], arguments[7], arguments[8], arguments[9], arguments[10]);
    }
}

//==================================================
//
// Enable Robot trap feature
//
//==================================================
function AddRobotTrap()
{
    document.write("<INPUT type=\"hidden\" name=\"RobotTrap\" value=\"RobotTrap\" />");
}

//== CMS FUNCTIONS ================

var gCmsDragData   = null;
var gCmsDropTarget = null;

function IsCmsDragging()
{
    return GetCmsDragData()!=null;
}

function SetCmsDragData(data)
{
    gCmsDragData = data;
}

function GetCmsDragData()
{
    return gCmsDragData;
}

function CmsDragStart(event, args)
{
    
    SetCmsDragData(args);
    document.body.onmouseup   = CmsDragStop;
    document.body.onmousemove = CmsDragScroll;
}

function CmsDragStop(event)
{
    CmsDragLeave(event);
    
    document.body.onmouseup   = null;
    document.body.onmousemove = null;
    
    SetCmsDragData(null);
}

function CmsDragScroll(event)
{
    if(!IsCmsDragging()) return;
    
    var oInfo = GetClientAreaInfo(event);
    
    var iScrollX = 0;
    var iScrollY = 0;
    
    var iSpaceX = oInfo.ClientWidth  / 20; // 5% of space
    var iSpaceY = oInfo.ClientHeight / 20; // 5% of space
    
    if(oInfo.ClientMouseX < iSpaceX)                      iScrollX = -iSpaceX;
    if(oInfo.ClientMouseX > oInfo.ClientWidth  - iSpaceX) iScrollX =  iSpaceX;
    
    if(oInfo.ClientMouseY < iSpaceY)                      iScrollY = -iSpaceY;
    if(oInfo.ClientMouseY > oInfo.ClientHeight - iSpaceY) iScrollY =  iSpaceY;
    
    if(iScrollX!=0 || iScrollY!=0)
        window.scrollBy(iScrollX, iScrollY);
   
  
}

function CmsDragEnterOver(event)
{
    if(!IsCmsDragging()) return;
	
	if(GetCmsDragData().match("^WebContent,[0-9]+,[0-9]+,[0-9]+$"))
	{
	    gCmsDropTarget = GetSourceElement(event);
	    gCmsDropTarget.style.cursor = "move";
		gCmsDropTarget.style.backgroundColor = "#ff8100";
	}
}

function CmsDragLeave(event)
{
    if(gCmsDropTarget)
    {
	    gCmsDropTarget.style.cursor = "default";
    	gCmsDropTarget.style.backgroundColor = "#E0E0E0";
    }

    gCmsDropTarget=null;
}

function CmsDrop(event, clientID)
{
    if(IsCmsDragging())
    	__doPostBack(clientID, GetCmsDragData());
    	
    CmsDragStop(event);
}

function ShowDialog(url, width, height)
{	

	url = url + "&dt=" + new Date().valueOf();

	window.showModalDialog(url, '', 'dialogHeight: '+height+'px; dialogWidth: '+width+'px; edge: Raised; center: Yes; help: No; resizable: No; status: No;');
}

function GetClientAreaInfo(e) 
{
    var oClientAreaInfo = new Object();
    
    oClientAreaInfo.ClientWidth  = 0;
    oClientAreaInfo.ClientHeight = 0;

    if( typeof( window.innerWidth ) == 'number' ) 
    {
        //Non-IE
        oClientAreaInfo.ClientWidth  = window.innerWidth;
        oClientAreaInfo.ClientHeight = window.innerHeight;
    } 
    else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) 
    {
        //IE 6+ in 'standards compliant mode'
        oClientAreaInfo.ClientWidth  = document.documentElement.clientWidth;
        oClientAreaInfo.ClientHeight = document.documentElement.clientHeight;
    } 
    else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) 
    {
        //IE 4 compatible
        oClientAreaInfo.ClientWidth  = document.body.clientWidth;
        oClientAreaInfo.ClientHeight = document.body.clientHeight;
    }

    oClientAreaInfo.ScrollX = 0;
    oClientAreaInfo.ScrollY = 0;
    
    if( typeof( window.pageYOffset ) == 'number' ) 
    {
        //Netscape compliant
        oClientAreaInfo.ScrollY = window.pageYOffset;
        oClientAreaInfo.ScrollX = window.pageXOffset;
    }
    else if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
    {
        //DOM compliant
        oClientAreaInfo.ScrollY = document.body.scrollTop;
        oClientAreaInfo.ScrollX = document.body.scrollLeft;
    }
    else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
    {
        //IE6 standards compliant mode
        oClientAreaInfo.ScrollY = document.documentElement.scrollTop;
        oClientAreaInfo.ScrollX = document.documentElement.scrollLeft;
    }
    
    
    oClientAreaInfo.MouseX = 0;
    oClientAreaInfo.MouseY = 0;

    if(!e && window.event )
        e = window.event;
        
    if(e)
    {
        if( typeof( e.pageX ) == 'number' ) 
        {
            //most browsers
            oClientAreaInfo.MouseX = e.pageX;
            oClientAreaInfo.MouseY = e.pageY;
        } 
        else if( typeof( e.clientX ) == 'number' ) 
        {
            //Internet Explorer and older browsers
            //other browsers provide this, but follow the pageX/Y branch
            oClientAreaInfo.MouseX = e.clientX;
            oClientAreaInfo.MouseY = e.clientY;
            
            var badOldBrowser = ( window.navigator.userAgent.indexOf( 'Opera' ) + 1 ) || ( window.ScriptEngine && ScriptEngine().indexOf( 'InScript' ) + 1 ) || ( navigator.vendor == 'KDE' )

            if( !badOldBrowser ) 
            {
                  if( document.body && ( document.body.scrollLeft || document.body.scrollTop ) ) 
                  {
                    //IE 4, 5 & 6 (in non-standards compliant mode)
                    oClientAreaInfo.MouseX += document.body.scrollLeft;
                    oClientAreaInfo.MouseY += document.body.scrollTop;
                  } 
                  else if( document.documentElement && ( document.documentElement.scrollLeft || document.documentElement.scrollTop ) ) 
                  {
                    //IE 6 (in standards compliant mode)
                    oClientAreaInfo.MouseX += document.documentElement.scrollLeft;
                    oClientAreaInfo.MouseY += document.documentElement.scrollTop;
                  }
            }
        }
    }    
    
    oClientAreaInfo.ClientMouseX = oClientAreaInfo.MouseX - oClientAreaInfo.ScrollX;
    oClientAreaInfo.ClientMouseY = oClientAreaInfo.MouseY - oClientAreaInfo.ScrollY;
    
    if(oClientAreaInfo.ClientMouseX < 0 ) oClientAreaInfo.ClientMouseX = 0;
    if(oClientAreaInfo.ClientMouseY < 0 ) oClientAreaInfo.ClientMouseY = 0;

    if(oClientAreaInfo.ClientMouseX > oClientAreaInfo.ClientWidth ) oClientAreaInfo.ClientMouseX = oClientAreaInfo.ClientWidth;
    if(oClientAreaInfo.ClientMouseY > oClientAreaInfo.ClientHeight) oClientAreaInfo.ClientMouseY = oClientAreaInfo.ClientHeight;

    
    return oClientAreaInfo;
}

/*============================================================*/

//============================================================//
//============================================================//

var MenuTimeOut = 0;
var gDynamicMenu      = null;
var gDynamicMenuClass = null;

function GetDynamicMenu()
{
    if(gDynamicMenu == null)
    {
        gDynamicMenu      = document.getElementById("DynamicMenu");
        
        if(gDynamicMenu!=null)
            gDynamicMenuClass = gDynamicMenu.className;
    }
        
    return gDynamicMenu;
}

function ShowDynamicMenu(event, className, xOffset, yOffset)
{
    var oSrcElement = GetSourceElement(event);

    var oMenu = GetDynamicMenu();
    
    if(typeof(xOffset)!="number") xOffset   = 0;
    if(typeof(yOffset)!="number") yOffset   = oSrcElement.offsetHeight;
    
    if(typeof(className)!="string") className       = gDynamicMenuClass;
    if(typeof(className)=="string") oMenu.className = className;

    oMenu.style.left = "" + (GetWindowX(oSrcElement)-document.body.offsetLeft + xOffset) + "px";
    oMenu.style.top  = "" + (GetWindowY(oSrcElement)-document.body.offsetTop  + yOffset) + "px";
    
    var iRight = oMenu.offsetLeft+oMenu.offsetWidth+9;
    var iWidth = document.body.offsetWidth;
    
    if(iRight>iWidth)
        oMenu.style.left = oMenu.offsetLeft-(iRight-iWidth);
    
    jQuery(oMenu).show();
    jQuery(oMenu).stop().fadeTo(1, 1);
    
    DynamicMenuClearTimeout();
}

function DynamicMenuClearTimeout()
{
    if(MenuTimeOut>0) 
        window.clearTimeout(MenuTimeOut);

    MenuTimeOut = 0;
}

function DynamicMenuExit(delay)
{
    DynamicMenuClearTimeout();
       
    MenuTimeOut = window.setTimeout("HideDynamicMenu()", delay);
}

function HideDynamicMenu()
{
    DynamicMenuClearTimeout();
    
    jQuery(GetDynamicMenu()).stop().fadeTo(250, 0, function() 
    { 
        jQuery(GetDynamicMenu()).hide(); 
    });
    //GetElementByID("DynamicMenu").style.display = "none";
}

function GetWindowX(el)
{
    return el.offsetLeft + (el.offsetParent!=null ? GetWindowX(el.offsetParent) : 0);
}

function GetWindowY(el)
{
    return el.offsetTop + (el.offsetParent!=null ? GetWindowY(el.offsetParent) : 0);
}

function MenuClear()
{
    while(GetElementByID("DynamicMenu1").rows.length)
        GetElementByID("DynamicMenu1").deleteRow(0);

    while(GetElementByID("DynamicMenu2").rows.length)
        GetElementByID("DynamicMenu2").deleteRow(0);
       
    GetElementByID("DynamicMenu2").style.display = "none";
}

function MenuAddSection(column, title, url, imageSource)
{
    MenuAdd("cms_menu_top", column, title, url, imageSource)
}

function MenuAddItem(column, title, url, imageSource)
{
    MenuAdd("cms_menu_top_item", column, title, url, imageSource)
}

function MenuAdd(className, column, title, url, imageSource)
{
    var Menu = column==1 ? GetElementByID("DynamicMenu2") : GetElementByID("DynamicMenu1");
    var Row  = Menu.insertRow(-1);
    var Cell = Row.insertCell(-1);
    
    var sImgHtml = ""
    if(typeof(imageSource)=="string" && imageSource!="")
        sImgHtml = " <img border=\"0\" src=\""+imageSource+"\" />";
    
    var sHtml = title;
    
    if(typeof(url)=="string" && url!="")
        sHtml = "<a class=\""+className+"\" href=\""+url+"\">"+title + sImgHtml+"</a>";
    
    Cell.className = className;
    Cell.innerHTML = sHtml;
    
    if(GetElementByID("DynamicMenu2").rows.length)
        GetElementByID("DynamicMenu2").style.display = "";
}

function MenuAddLine(column)
{
    var Menu = column==1 ? GetElementByID("DynamicMenu2") : GetElementByID("DynamicMenu1");
    var Row  = Menu.insertRow(-1);
    var Cell = Row.insertCell(-1);
    
    var HTML = "<hr/>";
    
    Cell.className = "cms_menu_top_item";
    Cell.innerHTML = HTML;
    
    if(GetElementByID("DynamicMenu2").rows.length)
        GetElementByID("DynamicMenu2").style.display = "";
}

function Menu_Edit(ctl)
{
    MenuClear();
    MenuAddItem(0, "Check Out and Edit"             , "javascript:__doPostBack('"+ctl+"$BCheckOut')");
    MenuAddItem(0, "Check In"                       , "javascript:__doPostBack('"+ctl+"$BCheckIn')");
    MenuAddItem(0, "Check In and Submit"            , "javascript:__doPostBack('"+ctl+"$BSubmit')");
    MenuAddItem(0, "Undo Check Out (cancel changes)", "javascript:__doPostBack('"+ctl+"$BUndoCheckOut')");
    MenuAddLine(0);
    MenuAddItem(0, "View History"                   , "javascript:__doPostBack('"+ctl+"$BViewHistory')");
    MenuAddItem(0, "Request deletion"               , "javascript:__doPostBack('"+ctl+"$BDelete')");
}

function Menu_EditSimple(ctl)
{
    MenuClear();
    MenuAddItem(0, "Edit"         , "javascript:__doPostBack('"+ctl+"$BCheckOut')");
    MenuAddLine(0);
    MenuAddItem(0, "View History" , "javascript:__doPostBack('"+ctl+"$BViewHistory')");
    MenuAddItem(0, "Delete"       , "javascript: if(_DelWarning()) { __doPostBack('"+ctl+"$BDeleteDirect'); }");
}

function Menu_BasicSkin(ctl)
{
    MenuClear();
    MenuAddItem(0, "Properties"   , "javascript:__doPostBack('"+ctl+"$BEdit')");
    MenuAddLine(0);
    MenuAddItem(0, "Delete"       , "javascript: if(_DelWarning()) { __doPostBack('"+ctl+"$BDelete'); }");
}


