var iwpath='',tsvpath;

function setIWpath(path)
{
	iwpath=path;
}

function showzone()
{
	if(iwpath != '')
	{
  		var al=arguments.length,a=arguments;
		if(al==2 && a[0] != undefined && a[1] != undefined)
		{
			var ref=iwpath+a[0],faceTxt=a[1];
			if(ref.indexOf('products.csv')>-1)
			{
				ref=ref.replace(/templatedata\/content/,'iw-web');faceTxt='products.csv';
			}
			document.write('<div class="showzone" OnMouseOver="this.style.backgroundColor=\'yellow\'" onMouseOut="this.style.backgroundColor=\'\'"><a href="'+ref+'" target="_blank" class="button" title="'+faceTxt+'"><span class="icon">Edit</span></a><span class="showzonelink">'+faceTxt+'</span><br>');
		} 
		else 
			if(al==1 && a[0] != undefined)
			{
				/* Note: this code is used only for 'showzone' feature backward compactivity. */
				if(tsvpath==undefined)
				{
					tsvpath=iwpath.replace(/templatedata/, "iw-web");
				}
			var re_content=/^\/.+?\/(\w+)\.jsp$/;
			document.write('<div class="showzone" OnMouseOver="this.style.backgroundColor=\'yellow\'" onMouseOut="this.style.backgroundColor=\'\'"><a href="'+tsvpath+a[0]+'" target="_blank" class="button" title="'+a[0].replace(re_content,'$1')+'"><span class="icon">Edit</span></a><span class="showzonelink">'+a[0].replace(re_content,'$1')+'</span><br>');
		} 
		else if(al == 0)
		{
			document.write('</div>');
		}
	}
}
