﻿//This function is being used as the A tag URL, 
//to include the CMC regExp indentification - when redirection is not relevant
function ignore(cmc_param) {}
//This function is being used as the A tag URL, 
//to include the CMC regExp indentification - when redirection is relevent
function loadURL (url, cmc_param, newWindow)
{
  if (newWindow)
    window.open(url, "_blank"); 
  else
    window.location.href = url;
}

function toggleNode(cmc_param, img, treeClientID, level, expandImagePath, collapseImagePath)
{
    if (img.title=='Expand') 
	{
		img.title = 'Collapse';
		img.src = expandImagePath;
	}
	else
	{
		img.title = 'Expand';
		img.src = collapseImagePath;
	}
	
	
	var script = 'TreeView_ToggleNode(' + treeClientID + '_Data,1,document.getElementById(\'' + treeClientID + 'n' + level + '\'),\' \',document.getElementById(\'' + treeClientID + 'n' + level + 'Nodes\'))';
	if (window.execScript)
        window.execScript(script,"JavaScript");
    else
        window.eval(script,"JavaScript");

}