function ShowProperty(pid)
		{
		var result  = null;
			if (pid == 0)
			{
				 result = window.showModalDialog('../SharedReports/Security.aspx?t='+new Date(),null,'scroll:no;status:no;help:no;dialogHeight:460px;dialogWidth:520px');
			}
			else
			{
					result = window.showModalDialog('../SharedReports/FolderProperty.aspx?iid='+pid+'&name=ddd&t='+new Date(),null,'scroll:no;status:no;dialogHeight:460px;dialogWidth:520px');
			}
			if (result )
			window.location = window.location ;
		}
		function ChangeViewType(obj)
		{
			var table = obj.document.getElementById("titleTable");
			var trF = FindChildElement(table,"TR");
			var trTitle = trF.nextSibling;
			var trShow = trTitle.nextSibling;
			var trL = trShow.nextSibling;
			trF.style.display  = "none";
			trTitle.style.display  = "none";
			trL.style.display  = "none";
			
			var tableABIS = FindChildElement(trShow,"TABLE");
			var tdABIS = FindChildElement(tableABIS,"TD");
			tdABIS.style.display  = "none"; 
			var tdList =tdABIS.nextSibling;
			var span = FindChildElement(tdList,"SPAN");
			var titleT = FindChildElement(span,"TABLE");
			tdT = FindChildElement(titleT,"TD");
			//titleT.style.display="none";
			var all = tdT.all;
			for (var j =0;j< all.length;j++)
			{
				if (all[j].user_type == null)
				all[j].style.display = "none";
			}
			divT = titleT.nextSibling;
			contentT = divT.nextSibling;
			var tds = contentT.all.tags("TD");
			for (var i = 0;i<tds.length;i++)
			{
				if (tds[i].user_type != null )
				{
					tds[i].style.display = "none";
				}
			}
		}
		function LoadCheck(obj)
		{
		//debugger
			try
			{
				if (top.location.href != window.location.href)
				{
					ChangeViewType(obj);
				}
			}
			catch(e)
			{
				ChangeViewType(obj);
			}
		}
		function ViewParent(obj)
		{
			var id =  obj.document.getElementById("txtGrand");
			if (id.value != "")
				obj.href = "../SharedReports/SharedReportsListView.aspx?pid="+id.value;
			else
				obj.href = "../SharedReports/SharedReportsListView.aspx";
		}
		function __doPostBack(eventTarget, eventArgument) {
		var theform;
		if (window.navigator.appName.toLowerCase().indexOf("netscape") > -1) {
			theform = document.forms["Form1"];
		}
		else {
			theform = document.Form1;
		}
		theform.__EVENTTARGET.value = eventTarget.split("$").join(":");
		theform.__EVENTARGUMENT.value = eventArgument;
		theform.submit();
	}
	function getItemImage(itemType)
{
  if (itemType = "Folder")
  {
    return '../images/folder_s.gif';
  }
  else
  {
    return '../images/report_s.gif';
  }
}
function MoveItems(obj,requiredCheckText,confirmText,noItem)
{
	var value = GetValues(obj);
	if (value == -1)
	{
		alert(noItem);
		return;
	 }
	if (StringHelper.IsEmpty(value))
	{
		alert(requiredCheckText);
		//obj.href='#';
		return ;
	}
	//if( confirm(confirmText))
	//{
	var result = window.showModalDialog('../SharedReports/MoveItem.aspx?ids='+value+ '&t='+new Date(),null,'scroll:no;status:no;dialogHeight:390px;dialogWidth:580px');
if (result )
	{
		var str = window.location.href;
		str = str.replace('#','');
			   window.location.href = str;
	}
		
	//}
}
function ViewProperty(text,width,height)
{
	var result = window.showModalDialog(''+text + '&t='+new Date(),null,'scroll:no;status:no;help:no;dialogHeight:'+height+'px;dialogWidth:'+width+'px');
if (result )
	top.location  = top.location;
	window.location.reload();
}
function ViewProperty1(text,width,height)
{
	var result = window.showModalDialog(''+text + '&t='+new Date(),null,'scroll:no;status:no;help:no;dialogHeight:'+height+'px;dialogWidth:'+width+'px');
if (result )
	top.location  = top.location;
	window.location.reload();
	document.form1.submit();
}
function ViewProperty2(text,width,height,url)
{
window.showModalDialog(''+text + '&t='+new Date(),null,'scroll:no;status:no;help:no;dialogHeight:'+height+'px;dialogWidth:'+width+'px');
 location.replace(url);
}


function AddFolder(pid)
{
	var result = window.showModalDialog("../SharedReports/AddNewFolder.aspx?pid="+pid + "&t="+ new Date(),null,'scroll:no;status:no;dialogHeight:255px;dialogWidth:440px');
	if (result )
	top.location = top.location ;
}
function AddReport(pid)
{
	var result = window.showModalDialog("../SharedReports/CreateReportF.aspx?pid="+pid + "&t="+ new Date(),null,'scroll:no;status:no;dialogHeight:420px;dialogWidth:520px');
	if (result )
	top.location = top.location ;
}
function MoveItem(id)
{
	var result = window.showModalDialog('../SharedReports/MoveItem.aspx?ids='+id+ '&t='+new Date(),null,'scroll:no;status:no;dialogHeight:390px;dialogWidth:580px');
	if (result )
	top.location  = top.location;
}
function ViewProperty_WithScroll(text,width,height)
{
	var result = window.showModalDialog(''+text + '&t='+new Date(),null,'scroll:yes;status:no;dialogHeight:'+height+'px;dialogWidth:'+width+'px');
if (result )
	top.location  = top.location;
} 
function show(text,width,height)
{
	var result = window.showModalDialog(''+text + '&t='+new Date(),null,'scroll:no;status:no;help:no;dialogHeight:'+height+'px;dialogWidth:'+width+'px');

	window.location = window.location;
}