
	function PrintDocument() {
		newWindow = window.open('', '_printdocument', 'width=640,height=480,scrollbars=yes,resizable=yes,status=no,menubar=no');
		newWindow.document.open();
		newWindow.document.write('<html><head></head><body>Opening, please wait...</body></html>');
		newWindow.document.open();
		
		document.frmSearch.target = '_printdocument';
		document.frmSearch.action = 'print.asp';
		document.frmSearch.submit();
		document.frmSearch.target = '_self';
	
	}

	function OpenSubscription(strURL, strName) {
		var strProperties, intHeight, intWidth, intLeft, intTop, winBasket
		intHeight = 600;
		intWidth = 800;
		intLeft = (screen.width - intWidth) / 2;
		intTop = (screen.height - intHeight) / 2;
		strProperties = "toolbar=0,location=0,scrollbars=1,height=" + intHeight + ",width=" + intWidth + ",left=" + intLeft + ",top=" + intTop;
		Subscription = open(strURL,strName,strProperties);
		Subscription.focus();
	}
		
	function GetDocument(CatalogID,CategoryID,DocID) {
		document.frmSearch.CatalogId.value = CatalogID;
		document.frmSearch.CategoryId.value = CategoryID;
		document.frmSearch.DocId.value = DocID;
		document.frmSearch.action = "Default.asp";
		document.frmSearch.submit();
	}

	function SearchKeywords() {
	  	document.frmSearch.action='search.asp';
		document.frmSearch.formaction.value='keywordquery';
		document.frmSearch.searchID.value='';
		document.frmSearch.submit();
	}

	function GetCategory(CatalogID, DocID) {
		document.frmSearch.CatalogId.value = CatalogID;
		document.frmSearch.DocId.value = DocID;
		document.frmSearch.action = "Default.asp";
		document.frmSearch.CategoryId.value='';
		document.frmSearch.prevaction.value = "SEARCH";
		document.frmSearch.submit();
	}

	function AddFileToBasket(publicationName, tcmID,fileName,fileDesc,filePath) {
		var strIDs, strUrl
		strIDs = "###### DEVELOPER ALERTS ######\n\n";
		strIDs += "AddDocumentToBasket()\n\n";
		strIDs += "tcmID = " + tcmID + "\n\n";
		strIDs += "fileName = " + fileName + "\n\n";
		strIDs += "fileDesc = " + fileDesc + "\n\n";
		strIDs += "filePath = " + filePath + "\n\n";
		//alert(strIDs);
		strUrl = "/site_tools/basket.aspx?tcmID=" + tcmID + "&fileName=" + fileName + "&fileDesc=" + fileDesc + "&filePath=" + filePath;
		//alert(strUrl);
		openDownloadsBasket(strUrl,'DownloadBasket');
		
	}

	function openDownloadsBasket(strURL,strName) {
		var strProperties, intHeight, intWidth, intLeft, intTop, DownloadBasket
		intHeight = 380;
		intWidth = 604;
		intLeft = (screen.width - intWidth) / 2;
		intTop = (screen.height - intHeight) / 2;
		strProperties = "toolbar=0,location=0,scrollbars=1,height=" + intHeight + ",width=" + intWidth + ",left=" + intLeft + ",top=" + intTop;
		DownloadBasket = open(strURL,strName,strProperties);
		DownloadBasket.focus();
	}
