﻿document.write('<script type="text/javascript" src="/includes/submodal/submodal.js"></scr' + 'ipt>'); 

function expandFolder(objid, fieldid) {
	var el = document.getElementById('folder_' + objid + '_' + fieldid);
	if (el.lastChild.tagName == "UL") {
		var ul = el.lastChild;
		if (ul.style.display == 'block' || ul.style.display == '') {
			ul.style.display = 'none';
		}
		else {
			ul.style.display = 'block';
		}
		fixDivs("leftTable", "mainInnerRight");
	}
}

function EditDocument(objid) {
	window.parent.expWin = window;
	window.parent.showPopWin('/idocument/DocumentListing/Atom/edit_document.aspx?ObjectId=' + objid, 600, 250, null);
}

function AddObject(objid) {
	window.parent.expWin = window;
	window.parent.showPopWin('/idocument/DocumentListing/Atom/add_object.aspx?Mode=1&ParentId=' + objid, 600, 250, null);
}

function AddObject2(objid) {
	window.parent.expWin = window;
	window.parent.showPopWin('/idocument/DocumentListing/Atom/add_object.aspx?Mode=2&ParentId=' + objid, 600, 250, null);
}

function DeleteFolder(objid) {
	window.parent.expWin = window;
	window.parent.showPopWin('/idocument/DocumentListing/Atom/delete_container.aspx?ObjectId=' + objid, 600, 200, null);
}

function DeleteDocument(objid) {
	window.parent.expWin = window;
	window.parent.showPopWin('/idocument/DocumentListing/Atom/delete_document.aspx?ObjectId=' + objid, 600, 200, null);
}

function RefreshPage() {
	document.location = document.location;
}