// ora.js

function getOraURL (p_url) {
	return 'http://www.oracle.com/' + (p_url == null ? '' : p_url);
}

function getOraSupportURL (p_url) {
	return getOraURL('support/' + (p_url == null ? 'index.html' : p_url));
}

function getOraPartnerURL() {
	return 'http://www.oracle.com/partners/index.html';
}

function getOraPartnerLink (p_type) {
	return EL('Oracle ' + p_type + ' Partner', getOraPartnerURL());
}

function getOraNOURL() {
	return 'http://www.oracle.com/global/no/index.html';
}

function getOraLink (p_extra) {
	return EL('Oracle', getOraURL(), p_extra);
}

function getOraNOLink (p_extra) {
	return EL('Oracle Norway', getOraNOURL(), p_extra);
}

function getOraEduLink (p_extra) {
	return EL('Oracle', getOraURL('no/education/'), p_extra);
}

function getOraAtLink (p_where, p_when) {
	return EL('Oracle', getOraNOURL())
	+	'@'
	+	p_where
	+	(p_when == null ? '' : ' ' + ILT(p_when))
	;
}

function getTrysilLink (p_year) {
	return getOraAtLink(EL('Trysil', 'www.skistar.com/trysil/'), p_year);
}

function getOraSubLink (p_text, p_url, p_extra) {
	return EL (
		(p_text == null ? 'Oracle' : p_text)
	,	getOraURL()
	+	(p_url == null ? '' : p_url)
	,	p_extra
	);
}

function getOTNURL (p_url) {
	return getOraURL() + 'technetwork/' + (p_url == null ? '' : p_url);
}

function getOTNProdURL (p_url) {
	return getOTNURL() + 'products/' + (p_url == null ? '' : p_url);
}

function getOTNSWURL (p_url) {
	return getOTNURL() + 'software/products/' + (p_url == null ? '' : p_url);
}

function getOTNSubLink (p_text, p_url, p_extra) {
	return EL (
		(p_text == null ? 'Oracle Technology Network' : p_text)
	,	getOTNURL(p_url)
	,	p_extra
	);
}

function getOTNLink (p_extra) {
	return getOTNSubLink('Oracle Technology Network', null, p_extra);
}

function getOramagURL (p_url) {
	return getOTNURL() + 'oramag/oracle/' + (p_url == null ? '' : p_url);
}

function getOramagLink (p_text, p_extra) {
	return EL((p_text == null ? 'Oracle Magazine' : p_text), 'www.oracle.com/oramag/index.html');
}

function getOramagSubLink (p_text, p_url, p_extra) {
	return EL (
		(p_text == null ? 'Oracle Magazine' : p_text)
	,	getOramagURL(p_url)
	,	p_extra
	);
}

function getPortalCenterLink (p_text, p_extra) {
	return EL (
		(p_text == null ? 'Portal Center' : p_text)
	,	getOTNProdURL() + 'ias/portal/index.html'
	,	p_extra
	);
}

function getPortalCenterSubLink (p_text, p_url, p_extra) {
	return EL (
		p_text
	,	'http://portalcenter.oracle.com/pls/ops/docs/'
	+	(p_url == null ? '' : p_url)
	,	p_extra
	);
}

function getiDeskLink() {
	return IL('iDesk', getHomeURL() + 'oracle/idesk/index.htm');
}

function getMetaLinkURL() {
	return 'https://metalink.oracle.com/';
}

function getMetaLinkSubLink (p_text, p_url, p_extra) {
	return EL (
		(p_text == null ? 'MetaLink' : p_text)
	,	getMetaLinkURL()
	+	(p_url == null ? '' : p_url)
	,	p_extra
	);
}

function getMetaLinkLink (p_extra) {
	return getMetaLinkSubLink('MetaLink', null, p_extra);
}

function writeMetaLinkLink (p_extra) {
	p(getMetaLinkLink(p_extra));
}

function getNoteURL (p_id) {
	return getServerHomeURL() + 'oracle/note.htm?id=' + p_id;
//	return getMetaLinkURL() + 'metalink/plsql/showdoc?db=NOT&id=' + p_id;
//	return getMetaLinkURL() + 'metalink/plsql/ml2_documents.showDocument?p_database_id=NOT&p_id=' + p_id;
//	return getMetaLinkURL() + 'CSP/main/showdoc?db=NOT&id=' + p_id;
//	return getMetaLinkURL() + 'CSP/main/article?cmd=show&type=NOT&id' + p_id;
}

function getNoteDesc (p_id) {
	if (p_id == '428960.1') {
		return 'OID Dependency Check Failing, &quot;ORA-28000: the account is locked&quot; or '
		+	'&quot;ORA-01017: invalid username/password; logon denied&quot; in Metadata Repository OPMN log'
		;
	} else {
		return 'Note ' + p_id;
	}
}

function getNoteLink (p_id, p_text, p_extra, p_on_metalink, p_note_prefix) {
	var l_no_prefix = (p_note_prefix == 0);
	return EL (
		(l_no_prefix ? '' : 'Note ' + p_id)
	+	(p_text == null || p_text == '' ? '' : (l_no_prefix ? '' : ': ') + p_text)
	//	(p_text == null || p_text == '' ? 'Note ' + p_id : p_text)
	,	getNoteURL(p_id)
	,	(p_on_metalink == 1 ? ' on ' + getMetaLinkLink() : '')
	+	(p_extra == null ? '' : p_extra)
	);
}

function writeNoteLink (p_id, p_text, p_extra, p_on_metalink) {
	p(getNoteLink(p_id, p_text, p_extra, p_on_metalink));
}

function getBugLink (p_id, p_text, p_extra) {
	return EL (
		'Bug ' + p_id
	+	(p_text == null ? '' : ': ' + p_text)
	,	getMetaLinkURL()
	+	'metalink/plsql/showdoc?db=Bug&id=' + p_id
	,	p_extra
	);
}

function writeBugLink (p_id, p_text, p_extra) {
	p(getBugLink(p_id, p_text, p_extra));
}

function getPatchURL (p_id) {
	return 'http://updates.oracle.com/download/' + p_id + '.html'
}

function getPatchLink (p_id, p_text, p_extra) {
	return EL (
		(p_text == null ? p_id : p_text)
	,	getPatchURL(p_id)
	,	p_extra
	);
}

function getPatchDownloadLink (p_id, p_text, p_extra) {
	return	'Download '
	+	getPatchLink (
			p_id
		,	(p_text == null ? 'patch ' + p_id : p_text)
		,	p_extra
		)
	+	' from '
	+	getMetaLinkLink()
	;
}

function getForumLink (p_id, p_text, p_extra) {
	return EL (
		(p_text == null ? p_id : p_text)
	,	getMetaLinkURL()
	+	'metalink/plsql/showdoc?db=Forum&id=' + p_id
	,	p_extra
	);
}

function writeForumLink (p_id, p_text, p_extra) {
	p(getForumLink(p_id, p_text, p_extra));
}

function getOraForumLink (p_id, p_text, p_extra) {
	return EL (
		(p_text == null ? 'Oracle Forum' + (p_id == null ? '' : ' ' + p_id) : p_text)
	,	'forums.oracle.com/'
	+	(p_id == null ? '' : 'forums/forum.jspa?forumID=' + p_id)
	,	p_extra
	);
}

function writeOraForumLink (p_id, p_text, p_extra) {
	p(getOraForumLink(p_id, p_text, p_extra));
}

function getAPEXLink (p_text, p_url) {
	return EL(p_text, getOTNProdURL('database/application_express/') + p_url);
}

function getAskTomURL (p_question_id) {
	return 'asktom.oracle.com/'
	+	(p_question_id == null ? '' : 'pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:' + p_question_id)
	;
}

function getAskTomLink (p_text, p_question_id, p_extra) {
	return EL (
		(p_text == null ? 'Ask Tom' : p_text)
	,	getAskTomURL(p_question_id)
	,	p_extra
	);
}

function PFL (p_text, p_path, p_extra) {
	return EL (
		(p_text == null ? 'Pete Finnigan' : p_text)
	,	'www.petefinnigan.com/' + (p_path == null ? '' : p_path)
	,	p_extra
	);
}

function getASLink (p_version, p_text, p_extra) {

	if ((p_version == '101202') || (p_version == '1012')) {
		return EL (
			(p_text == null ? 'OracleAS 10g Release 2 (10.1.2.0.2)' : p_text)
		,	getOTNURL()
		+	'middleware/ias/downloads/101202-095224.html'
		,	p_extra
		);
	} else if (p_version == '904') {
		return (p_text == null ? 'OracleAS 10g (9.0.4)' : p_text);
	} else if (p_version == '902') {
		return (p_text == null ? 'Oracle 9iAS Release 2 (9.0.2)' : p_text);
	} else {
		return 'unknown version';
	}
}

function writeASLink (p_version, p_text, p_extra) {
	p(getASLink(p_version, p_text, p_extra));
}

function getDBLink (p_version, p_text, p_extra) {

	if (p_version == '10201') {
		return EL (
			(p_text == null ? 'Oracle Database 10g Release 2 (10.2.0.1)' : p_text)
		,	getOTNSWURL()
		+	'database/oracle10g/htdocs/10201winsoft.html'
		,	p_extra
		);
	} else if (p_version == '101') {
		return EL (
			(p_text == null ? 'Oracle10g database' : p_text)
		,	getOTNSWURL()
		+	'database/oracle10g/htdocs/winsoft.html'
		,	p_extra
		);
	} else {
		return 'unknown version';
	}
}

function writeDBLink (p_version, p_text, p_extra) {
	p(getDBLink(p_version, p_text, p_extra));
}

function getDownloadLink (p_what, p_OTN_path) {
	return 'Download '
	+	p_what
	+	' from '
	+	getOTNSubLink(null, p_OTN_path)
	;
}

function getOraDocURL (p_path) {

	return 'http://download.oracle.com/docs/cd/' + (p_path == null ? '' : p_path);
}

function getOraDocLink (p_text, p_path, p_extra) {

	return EL (
		(p_text == null ? 'Online Documentation' : p_text)
	,	getOraDocURL(p_path)
	,	p_extra
	);
}

function writeOraDocLink (p_text, p_path, p_extra) {
	p(getOraDocLink(p_text, p_path, p_extra));
}

function getDocPath (p_path) {

	return (p_path == null ? 'index.htm' : p_path);
}

function getASDocPath (p_version, p_path) {

	if (p_version == '1111')
		return 'E14571_01/' + getDocPath(p_path);
	else if (p_version == '1014')
		return 'E10761_01/doc/oam.1014/' + getDocPath(p_path);
	else if (p_version == '1013')
		return 'B31017_01/' + getDocPath(p_path);
	else if (p_version == '101202' || p_version == '1012')
		return 'B14099_19/' + getDocPath(p_path);
	else if (p_version == '904')
		return 'B10464_05/' + getDocPath(p_path);
	else if (p_version == '902')
		return 'A97329_03/' + getDocPath(p_path);
	else return 'unknown version';
}

function getASDocURL (p_version, p_path) {

	return getOraDocURL(getASDocPath(p_version, p_path));
}

function getASDocLink (p_version, p_text, p_path, p_extra) {

	if (p_version == '1111') {
		return getOraDocLink (
			(p_text == null ? 'Oracle Application Server 11g Online Documentation' : p_text)
		,	getASDocPath(p_version, p_path)
		,	p_extra
		);
	} else if (p_version == '101202' || p_version == '1012' || p_version == '904') {
		return getOraDocLink (
			(p_text == null ? 'Oracle Application Server 10g Online Documentation' : p_text)
		,	getASDocPath(p_version, p_path)
		,	p_extra
		);
	} else if (p_version == '902' || p_version == '1013' || p_version == '1014') {
		return getOraDocLink (
			p_text
		,	getASDocPath(p_version, p_path)
		,	p_extra
		);
	} else {
		return 'unknown version';
	}
}

function writeASDocLink (p_version, p_text, p_path, p_extra) {
	p(getASDocLink(p_version, p_text, p_path, p_extra));
}

function ASL (p_text, p_path, p_extra) {
	return getASDocLink('1012', p_text, p_path, p_extra);
}

function getDBDocPath (p_version, p_path) {

	if (p_version == '112')		return 'E11882_01/' + getDocPath(p_path); // http://www.oracle.com/pls/db112/homepage
	else if (p_version == '111')	return 'B28359_01/' + getDocPath(p_path); // http://www.oracle.com/pls/db111/homepage
	else if (p_version == '102')	return 'B19306_01/' + getDocPath(p_path); // http://www.oracle.com/pls/db102/homepage
	else if (p_version == '101')	return 'B13789_01/' + getDocPath(p_path);
	else if (p_version == '92')	return 'B10501_01/' + getDocPath(p_path); // http://www.oracle.com/pls/db92/db92.homepage
	else if (p_version == '901')	return 'A91202_01/901_doc/' + getDocPath(p_path);
	else return 'unknown version';
}

function getDBDocURL (p_version, p_path) {

	return getOraDocURL(getDBDocPath(p_version, p_path));
}

function getDBDocLink (p_version, p_text, p_path, p_extra) {

	return getOraDocLink (
		p_text
	,	getDBDocPath(p_version, p_path)
	,	p_extra
	);
}

function writeDBDocLink (p_version, p_text, p_path, p_extra) {
	p(getDBDocLink(p_version, p_text, p_path, p_extra));
}

function DBL (p_text, p_path, p_extra) {
	return getDBDocLink('102', p_text, p_path, p_extra);
}

function getICLink (p_extra) {
	return EL('Oracle InterConnect', 'www.oracle.com/appserver/integration_home.html', p_extra);
}

function getPortalLink (p_extra) {
	return 'Oracle Portal';
}

function getPortalSubLink (p_text, p_path, p_extra) {
	return EL (
		(p_text == null ? 'Oracle Portal' : p_text)
	,	getOTNProdURL()
	+	'ias/portal/'
	+	(p_path == null ? 'index.html' : p_path)
	,	p_extra
	);
}

function getSQLDevURL() {
	return getOTNURL() + 'developer-tools/sql-developer/downloads/';
}

function getJDevURL() {
	return getOTNURL() + 'developer-tools/jdev/downloads/';
}

function getJDevLink (p_extra) {
	return EL('Oracle JDeveloper', getJDevURL(), p_extra);
}

function getJDevLink2 (p_text, p_path, p_extra) {
	return EL (
		(p_text == null ? 'Oracle JDeveloper' : p_text)
	,	getJDevURL()
	+	(p_path == null ? 'index.html' : p_path)
	,	p_extra
	);
}

function getBloggerLink (p_name, p_id, p_extra) {
	return EL(p_name, 'blogs.oracle.com/' + (p_id == null ? '' : p_id) + (p_id == null ? '' : '/'), p_extra);
}

function getDiscovererLink (p_extra) {
	return EL('Discoverer', getOTNSWURL() + 'ids/', p_extra);
}

function getBPELLink (p_version, p_version_text, p_extra) {

	if (p_version == '1012') {
		return 'Oracle BPEL PM (' + (p_version_text == null ? '10.1.2' : p_version_text) + ')';
	} else {
		return 'unknown version';
	}
}

function writeBPELLink (p_version, p_text, p_extra) {
	p(getBPELLink(p_version, p_text, p_extra));
}

function writeBPELMoreInfo() {

	writeSectionMoreInfo();

	writeH('BPEL', 4);

	writeUL (
		LI (
			getASDocLink (
				'1012'
			,	'Quick Start Guide'
			,	'integrate.1012/b15604/toc.htm'
			)
		)
	+	LI (
			getASDocLink (
				'1012'
			,	'Order Booking Tutorial'
			,	'integrate.1012/b15813/toc.htm'
			)
		)
	+	LI (
			getASDocLink (
				'1012'
			,	'BPEL Process Manager 10.1.2 Developer\'s Guide'
			,	'integrate.1012/b14448/toc.htm'
			)
		)
	+	LI (
			getASDocLink (
				'1013'
			,	'BPEL Process Manager 10.1.3 Developer\'s Guide'
			,	'integrate.1013/b28981/toc.htm'
			)
		)
	+	LI (
			getASDocLink (
				'1012'
			,	'Adapters User\'s Guide'
			,	'integrate.1012/b25307/toc.htm'
			)
		)
	+	LI(getOTNSubLink('Oracle by Example: BPEL', 'obe/obe_as_1012/integration/'))
	+	LI(getOTNSubLink('BPEL: Learn by Example', 'products/ias/bpel/pdf/orabpel-BPEL101.pdf'))
	+	LI(getOTNSubLink('Oracle BPEL Process Manager Product Information', 'products/ias/bpel/'))
	+	LI(getOraForumLink(212, 'Oracle BPEL Process Manager Discussion Forum'))
	);

	writeH('SOA', 4);

	writeUL (
		LI (
			getASDocLink (
				'1013'
			,	'SOA Order Booking Quickstart Guide'
			,	'core.1013/b28938/toc.htm'
			)
		)
	+	LI (
			getASDocLink (
				'1013'
			,	'SOA Suite 10.1.3 Developer\'s Guide'
			,	'core.1013/b28764/toc.htm'
			)
		)
	+	LI(getOTNSubLink('Oracle Service-Oriented Architecture Technology Center', 'tech/soa/index.html'))
	+	LI(getOTNSubLink('Oracle SOA Suite Best Practices Guide', 'tech/soa/soa_best_practices_1013x_drop3.pdf'))
	+	LI(getOTNSubLink('SOA Best Practices: The BPEL Cookbook', 'pub/articles/bpel_cookbook/'))
	+	LEL (
			'Oracle Application Server 10.1.3 Certification Information'
		,	getOTNSWURL('ias/files/oracle_soa_certification_101310.html')
		)
	+	LEL (
			'Making DB XE work with SOA Suite'
		,	'blogs.oracle.com/reynolds/discuss/msgReader$134'
		)
	);

}

function writeUCMMoreInfo (p_tips) {

	writeSectionMoreInfo();

	writeUL (
		(p_tips == null ? LIL('TC\'s Content Server Tips', 'tips.htm') : '')
	+	LI (
			getOraDocLink (
				'Site Studio Designer Guide'
			,	'E10316_01/SiteStudio/WebHelp-Designer/wwhelp/wwhimpl/js/html/wwhelp.htm'
			)
		)
	+	LI (
			getOraDocLink (
				'Oracle Content Management 10gR3 (10.1.3.3) Documentation Library'
			,	'E10316_01/index.htm'
			)
		)
	+	LI(getOraForumLink(390, 'Oracle Forum: Enterprise Content Management'))
	+	LI(getNoteLink('459289.1', 'FAQs for Finding Content on MetaLink that was Formerly Published on the Stellent Support Site'))
	+	LEL('Bex Huff', 'bexhuff.com/topic/technology/oracle-stellent')
	+	LEL('Bezzotech Library', 'bezzotech.com/library')
	+	LI(getBloggerLink('Fusion ECM blog', 'fusionecm', ' by Billy Cripe, Raoul Miller, and Wayne Boerger'))
	);
}

function writeICResources (p_version) {

	writeSection('resources', 'InterConnect Resources');

	writeUL (
		LI (
			getASDocLink (
				'1012'
			,	'Online doc: Installation Guide'
			,	'integrate.1012/b14070/toc.htm'
			)
		)
	+	LI (
			getASDocLink (
				'1012'
			,	'Online doc: User\'s Guide'
			,	'integrate.1012/b14069/toc.htm'
			)
		)
	+	PLI(IL('TC\'s InterConnect Tips and Troubleshooting', '../ic/tips.htm'))
	+	PLI(IL('My First Web Serivce', '../ws/my_first_web_service.htm'))
	+	LI(IL('My First Integration', '../ic/my_first_integration.htm'))
	+	LI(IL('My First Custom Adapter', '../ic/my_first_custom_adapter.htm'))
	+	LI(IL('My First Custom Transformation', '../ic/my_first_custom_transformation.htm'))
	+	LI(IL('My First Workflow', '../ic/my_first_workflow.htm'))
	+	PLI(IL('TC\'s DB Adapter Guide', '../ic/dbadapter.htm'))
	+	LI(IL('TC\'s AQ Adapter Guide', '../ic/aqadapter.htm'))
	+	LI(IL('TC\'s FTP Adapter Guide', '../ic/ftpadapter.htm'))
	+	(p_version == '1012' ? PLI(IL('High Availability', 'ha.htm')) : '')
	+	PLI(getNoteLink('267685.1', 'InterConnect Knowledge Browser'))
	);

}

function getXMLResources (p_heading) {

	return	getSection('xml_resources', p_heading)
	+	UL (
		PLI(getOTNSubLink('XML Technology Center', 'tech/xml/'))
	+	LI(getOTNSubLink('XML Sample Corner', 'sample_code/tech/xml/'))
	+	LI(getOTNSubLink('XML DB Sample Corner', 'sample_code/tech/xml/xmldb/'))
	+	LI (
			getOTNSubLink (
				'Getting into SQL/XML'
			,	'pub/articles/quinlan-xml.html'
			,	' by Tim Quinlan'
			)
		)
/*
	+	LI (
			getOramagSubLink (
				'Building with Oracle XML Database'
			,	'04-sep/o54xml.html'
			,	' by Magn&uacute;s Kristj&aacute;nsson'
			)
		)
*/
	+	LI(getDBDocLink('102', 'Oracle XML DB Developer\'s Guide 10g', 'appdev.102/b14259/toc.htm'))
	+	LI (
			getDBDocLink('112', 'Oracle XML DB Developer\'s Guide 11g', 'appdev.112/e10492/toc.htm')
		+	UL(LI(getDBDocLink('112', 'Using XQuery with Oracle XML DB', 'appdev.112/e10492/xdb_xquery.htm')))
		)
	+	LI(getOraForumLink(34, 'XML DB Discussion Forum'))
	);
}

function writeXMLResources (p_heading) {
	p(getXMLResources(p_heading));
}

function writePortalUpgradeMoreInfo() {

	writeSectionMoreInfo();

	writeUL (
		LI (
			getASDocLink (
				'101202'
			,	'Staging a Test Environment from a Production Environment'
			,	'core.1012/b13995/prodtest.htm'
			)
		)
	+	LI (
			getASDocLink (
				'101202'
			,	'Oracle Application Server Portal Installation and Upgrade Guide'
			,	'portal.1014/b19135/toc.htm'
			)
		)
	+	LI(getPortalSubLink('OracleAS Portal Upgrade', 'upgrade.html'))
	+	LEL('Readme for Patch 4960210', 'https://updates.oracle.com/ARULink/Readme/process_form?aru=8810652')
	+	LI(getNoteLink('260554.1', 'Master Note for OracleAS Portal Install Issues'))
	+	LI(getNoteLink('262623.1', 'Master Note for OracleAS Portal Upgrade Issues'))
	+	LI(getNoteLink('281400.1', 'Troubleshooting Portal Errors when applying MR Updates from Oracle AS Patchsets 9.0.4.x / 10.1.2.x'))
	+	LI(getNoteLink('361176.1', 'Database Version 10.2.0.2.0 or 10.2.0.3.0 Is Not Supported When Upgrading Portal to 10.1.4'))
	+	LI(getNoteLink('276620.1', 'How to &quot;clone&quot; a Portal Repository'))
	+	LI(getNoteLink('249212.1', 'Support Position for Oracle Products Running on VMWare Virtualized Environments'))
	+	LI(getNoteLink('359362.1', 'Known Issues Applying Oracle Database 10.1.0.5 Patch Set to OracleAS 10g (10.1.2)'))
	);
}

function getOPatchPatch (p_text) {
	return EL((p_text == null ? 'patch 6880880' : p_text), 'updates.oracle.com/download/6880880.html');
}

function getOPatchPatch100 (p_text) {
	return EL((p_text == null ? 'patch 2617419' : p_text), 'updates.oracle.com/download/2617419.html');
}

function getOPatchPatch102 (p_text) {
	return EL((p_text == null ? 'patch 4898608' : p_text), 'updates.oracle.com/download/4898608.html');
}

function getLinksInstallGuides() {

	return getTableRow (
		getLayoutTableCellVT (
			UL (
				LI (
					IL('Installing Oracle Database 10g Release 2 (10.2.x)', 'db102/install.htm')
				+	UL (
						LIL('Installing Oracle HTTP Server (10.2.x)', 'ohs102/install.htm')
					+	LIL('Installing Oracle Application Express (3.2.1)', 'apex321/install.htm')
					)
				)
			+	PLI (
					IL('Installing OracleAS 10g Release 2 (10.1.2.0.2)', 'ias101202/install.htm')
				+	UL (
						LIL('Preinstallation Checklist', 'ias/preinstallation_checklist.htm')
					+	LIL('Installation Details Form', 'ias/installation_details.htm')
					)
				)
			+	LIL('Configuring OracleAS 10g Release 2 (10.1.2.0.2 / 10.1.2.3)', 'ias101202/config.htm')
			+	LI (
					IL('Upgrading OracleAS 10g Portal from 10.1.2.0.2 to 10.1.4.2', 'ias101202/portal1014.htm')
				+	UL(LIL('Upgrade Case Study', 'portal/upgrade_to_10141.htm'))
				)
			+	PLIL('Installing OracleAS 10g Release 3 (10.1.3)', 'ias1013/install.htm')
			+	PLIL('Installing Oracle SOA Suite 10.1.3', 'soa1013/install.htm')
			+	LIL('Installing Oracle Content Server 10.1.3.3', 'ucm/install.htm')
			+	LIL('Installing Oracle Secure Enterprise Search 10g (10.1.8)', 'ses1018/install.htm')
			)
		+	'<p>'
		)
	+	getLayoutTableCellVT (
			UL (
				LIL('TC\'s OracleAS 10g Release 2 (10.1.2.0.2) environment', 'ias101202/env.htm')
			+	PLIL('Previous OracleAS releases (9.0.2, 9.0.4, 10.1.2.0.0)', 'archive.htm')
			+	PLIL('Customizing Collaboration Suite', 'ocs/customize.htm')
			+	PLIL('Installing OracleAS InterConnect 10.1.2.0.2', 'ic101202/install.htm')
			+	PLIL('Installing Oracle BPEL Process Manager 10.1.2.0.2', 'bpel101202/install.htm')
			+	PLIL('Installing Oracle Integration B2B 10.1.2.0.2', 'b2b101202/install.htm')
			)
		)
	);
}

function getLinksTutorials() {

	return getTableRow (
		getLayoutTableCellVT (
			UL (
				LIL('Portal: My First PL/SQL Portlet', 'portal/my_first_plsql_portlet.htm')
			+	LIL('Portal: My First Java Portlet', 'portal/my_first_java_portlet.htm')
			+	LIL('Portal: My First Portal', 'portal/my_first_portal.htm')
			+	PLIL('Java and PL/SQL Stored Procedures', 'java_and_plsql.htm')
			+	PLIL('InterConnect: My First Custom Adapter', 'ic/my_first_custom_adapter.htm')
			+	' (and ' + IL('second', 'ic/my_second_custom_adapter.htm') + ')'
			+	LIL('InterConnect: My First Custom Transformation', 'ic/my_first_custom_transformation.htm')
			+	LIL('InterConnect: My First Integration', 'ic/my_first_integration.htm')
			+	LIL('InterConnect: My First Workflow', 'ic/my_first_workflow.htm')
			+	PLIL('My First BPEL Process', 'bpel/my_first_bpel_process.htm')
			+	LIL('My First B2B Process', 'b2b/my_first_b2b_process.htm')
			)
		)
	+	getLayoutTableCellVT (
			UL (
				LIL('My First Web Service', 'ws/my_first_web_service.htm')
			+	' (and ' + IL('second', 'ws/my_second_web_service.htm') + ')'
			+	LIL('My First Web Service Callout', 'ws/my_first_web_service_callout.htm')
			+	PLIL('My First JavaServer Page', 'my_first_jsp.htm')
			+	PLIL('My First Content Server Site', 'ucm/my_first_ucm_site.htm')
			+	PLIL('Oracle Security', 'security/index.htm')
			+	PLIL('Enterprise User Security', 'db/eus.htm')
			+	LIL('Getting Started with XML DB', '../guides/languages/xml/xmldb.htm')
			)
		)
	);
}

function getLinksReferences() {

	return getTableRow (
		getLayoutTableCellVT (
			UL (
				LIL('Oracle Text', 'text.htm')
			+	LIL('TNS Tips', 'tns.htm')
			+	LIL('SQL Tips', 'sql/tips.htm')
			+	LIL('SQL Tuning', 'sql/tuning.htm')
			+	LIL('SQL*Loader', 'sqlldr/index.htm')
			+	LIL('SQL*Plus', 'sqlplus.htm')
			+	LIL('Export &amp; Import with exp/imp and Data Pump', 'expimp.htm')
			)
		)
	+	getLayoutTableCellVT (
			UL (
				LIL('Support Tips', 'support.htm')
			+	LIL('Version Numbers', 'versions.htm')
			+	LIL('Oracle Application Server Port Numbers', 'ias/portnums.htm')
			+	LIL('Computer Terms', 'computer_terms.htm')
			+	LIL('Running Oracle Products on a Windows laptop', 'laptop.htm')
			+	LIL('Uninstalling Oracle Products on Windows 2000/XP', 'uninstall.htm')
			)
		)
	)
+	getTableRow (
		getLayoutTableCellVT (
			UL (
				LIL('DB Adapter Guide', 'ic/dbadapter.htm')
			+	LIL('AQ Adapter Guide', 'ic/aqadapter.htm')
			+	LIL('FTP Adapter Guide', 'ic/ftpadapter.htm')
			)
		+	'<p>'
		)
	+	getLayoutTableCellVT (
			UL (
				LIL('Running Oracle Installer remotely on Unix/Linux from a Windows PC', 'remote_install.htm')
			+	LIL('OPatch (Interim Patch Installer)', 'opatch.htm')
			+	LI(IL('Oracle History', 'history.htm') + ' and ' + IL('Acquisitions', 'acquisitions.htm'))
			)
		)
	)
+	getTableRow (
		getLayoutTableCellVT (
			UL (
				LIL('InterConnect Tips and Troubleshooting', 'ic/tips.htm')
			+	LIL('Content Server Tips', 'ucm/tips.htm')
			+	LIL('Oracle Tips', 'tips.htm')
			)
		)
	+	getLayoutTableCellVT (
			UL (
				LIL('TC\'s InterConnect Development Kit (ICDK)', 'utils/icdk.zipped')
			+	LIL('TC\'s Portal Development Kit (IPDK)', 'utils/ipdk.zipped')
			+	LIL('TC\'s Oracle Diary', 'diary.htm')
		//	+	LIL('TC\'s Oracle PCs', 'computers.htm')
			+	LIL('iDesk', 'idesk/index.htm')
			)
		)
	);
}

function getLinksDoc() {

	return getTableRow (
		getLayoutTableCellVT (
			UL (
				LI(getDBDocLink('112', 'Oracle Database 11g Release 2 (11.2)'))
			+	PLI(getDBDocLink('111', 'Oracle Database 11g Release 1 (11.1)'))
			+	PLI (
					getDBDocLink('102', 'Oracle Database 10g Release 2 (10.2)')
				+	UL (
						LI(getDBDocLink('102', 'Error Messages', 'server.102/b14219/toc.htm'))
					+	LI(getDBDocLink('102', 'PL/SQL Packages and Types Reference', 'appdev.102/b14258/toc.htm'))
					+	LI(getDBDocLink('102', 'Summary of Predefined PL/SQL Exceptions', 'appdev.102/b14261/errors.htm#i9355'))
					+	LI(getDBDocLink('102', 'Initialization Parameters', 'server.102/b14237/toc.htm'))
					+	LI(getDBDocLink('102', 'Dynamic Performance Views', 'server.102/b14237/dynviews_1001.htm'))
					)
				)
			+	PLI(getDBDocLink('101', 'Oracle Database 10g Release 1 (10.1)'))
			+	PLI (
					getDBDocLink('901', 'Oracle9i Database (9.0.1)')
				+	UL (
						LI(getDBDocLink('901', 'Abbreviations and Acronyms', 'java.901/a90213/acronyms.htm'))
					)
				)
			+	PLI(getASDocLink('1014', 'Oracle Access Manager 10.1.4.2 Access Administration Guide', 'b32420/toc.htm'))
				/*
				Configuring Single Sign-On:
				http://download.oracle.com/docs/cd/E10761_01/doc/oam.1014/b32420/v2sso.htm

				Configuring Logout:
				http://download.oracle.com/docs/cd/E10761_01/doc/oam.1014/b32420/v2logout.htm
				*/
			+	PLI (
					getASDocLink('1111', 'Oracle Application Server 11g Release 1 (11.1.1)')
				)
			+	PLI (
					getASDocLink('1013', 'Oracle Application Server 10g Release 3 (10.1.3.1)')
				+	UL (
						LEL (
							'Certification Information'
						,	getOTNSWURL('ias/files/oracle_soa_certification_101310.html')
						)
					)
				)
			+	PLI (
					getASDocLink('1012', 'Oracle Application Server 10g Release 2 (10.1.2)')
				+	UL (
						LI (
							getASDocLink('1012', 'Enterprise Deployment Guide', 'core.1012/b13998/toc.htm')
						+	UL (
								LI(getASDocLink('1012', 'Selecting a Deployment Architecture', 'core.1012/b13998/selecting.htm'))
							)
						)
					+	LI (
							getASDocLink('1012', 'Administrator\'s Guide', 'core.1012/b13995/toc.htm')
						+	UL (
								LI(getASDocLink('1012', 'Backup and Recovery Tool', 'core.1012/b13995/br_tool.htm'))
							+	LI(getASDocLink('1012', 'Oracle Application Server Port Numbers', 'core.1012/b13995/portnums.htm'))
							)
						)
					+	LI (
							getASDocLink('1012', 'Portal', 'portal.htm')
						+	UL (
								LI(getASDocLink('1012', 'Developer\'s Guide', 'portal.1012/b14134/toc.htm'))
							)
					+	LI(getASDocLink('101202', 'PL/SQL Web Toolkit Reference', 'web.1012/b15896/toc.htm'))
						)
					)
				)
			+	PLI(getOraDocLink('Oracle Secure Enterprise Search 10g Release 1 (10.1.8)', 'E10502_01/doc/index.htm'))
			)
		)
	+	getLayoutTableCellVT (
			UL (
				LI (
					getOTNSubLink(null, 'index.html')
				+	UL (
						LI(getOTNSubLink('Certification Matrices', 'support/metalink/index.html'))
					+	LI(getOTNSubLink('Downloads', 'software/index.html'))
					+	LI (
							getOTNSubLink('Documentation', 'documentation/index.html')
						+	' - '
						+	EL('', 'tahiti.oracle.com')
						)
					+	LEL('Forums', 'forums.oracle.com/forums/index.jspa?cat=1')
					+	LI (
							getOTNSubLink('Articles', 'pub/articles/index.html')
						+	UL (
								LI(getOTNSubLink('Best Practice PL/SQL', 'pub/columns/plsql/index.html'))
							+	' with '
							+	ELCOM('Steven Feuerstein', 'stevenfeuerstein')
							)
						)
					+	LI(getOTNSubLink('Sample Code', 'sample_code/index.html'))
					+	LI (
							getOTNSubLink('Tutorials', 'training/index.html')
						+	UL (
								LI(getOTNSubLink('Oracle by Example', 'obe/start/index.html'))
							)
						)
					)
				)
			+	PLI (
					getMetaLinkLink()
				+	UL (
						LEL('Non-Flash interface', 'https://supporthtml.oracle.com/')
					+	LI(getNoteLink('4.1', 'Knowledge Browser'))
					+	LIL('TC\'s Note Loader', 'note.htm')
					+	LIL('TC\'s Patch Loader', 'patch.htm')
					+	LI (
							getOraSubLink (
								'FAQ for the new My Oracle Support'
							,	'support/collateral/configuration-support-manager-faq.pdf'
							)
						)
					)
				)
			+	PLEL(getOramagLink())
			+	PLI(getBloggerLink('Blogs'))
			)
		)
	);
}

function getLinksInstallInfo() {

	return	LIL('Finding database passwords', '../ias101202/config.htm#passwords')
	+	LIL('Installing Oracle Database 10g Release 2', '../db102/install.htm')
	+	LIL('Installing OracleAS 10g Release 2', '../ias101202/install.htm')
	+	LIL('Upgrading OracleAS 10g Portal from 10.1.2.0.2 to 10.1.4.2', '../ias101202/portal1014.htm')
	+	LIL('Installing Oracle Application Server 10g Release 3 (10.1.3)', '../ias1013/install.htm')
	+	LIL('Upgrading Application Server / SOA Suite from 10.1.3.1 to 10.1.3.5', '../ias1013/ias10135.htm')
	+	LIL('Installing iKnowBase 5.4', '../../ikb/ikb54/install.htm')
	+	PLI (
			'Oracle Database Installation Guide 10g Release 2 (10.2)'
		+	UL (
				LI(getDBDocLink('102', 'for Linux x86', 'install.102/b15660/toc.htm'))
			+	LI(getDBDocLink('102', 'for Microsoft Windows (32-Bit)', 'install.102/b14316/toc.htm'))
			)
		)
	+	PLI (
			'Oracle Application Server Installation Guide 10g Release 2 (10.1.2)'
		+	UL (
				LI(getASDocLink('101202', 'for Linux x86', 'linux.1012/install.1012/install/toc.htm'))
			+	LI(getASDocLink('101202', 'for Microsoft Windows', 'win.1012/install.1012/install/toc.htm'))
			)
		)
	;
}

function iDesk_disclaimer() {

	p (
		'<p>'
	+	getTableOpenR(0, 0, 2, '100%')
	+	'<td bgcolor="#cccccc"><font size=-1>'
	+	'Legal disclaimer: This is an unofficial web page containing the views and opinions of '
	+	IL('Tore I. Christoffersen', '../../about/tc.htm')
	+	' (regarding the capabilities of the iDesk solution),'
	+	' and not those of '
	+	EL('Oracle Corporation', getOraURL(), '.')
	+	'</font></td>'
	+	getTableCloseR()
	+	'<p>'
	);
}

function PL_infra() {
	return PL('Installing Infrastructure', 'infra');
}

function PL_mt() {
	return PL('Installing Application Server', 'mt');
}

function PL_patches() {
	return PL('Applying Patches', 'patches');
}

function PL_password_expiry() {
	return PL('Edit password expiry settings', 'password_expiry');
}

function PL_security() {
	return PL('Security', 'security');
}

function PL_passwords() {
	return PL('Finding database passwords', 'passwords');
}

function PL_troubleshooting() {
	return PL('Troubleshooting', 'troubleshooting');
}

function getParamTableRow (p_category, p_parameter, p_value, p_rowspan) {
	return getTableRow (
		(p_category == '' ? '' : getGridTableCell(p_category, 'rowspan=' + p_rowspan))
	+	getGridTableCell(p_parameter)
	+	getGridTableCell(p_value, 'align=right')
	);
}

function writeSecondTableRow (p_seconds, p_equals) {
	writeTableRow (
		getGridTableCell(p_seconds, 'align=right')
	+	getGridTableCell(p_equals)
	);
}

function writeSecondTable() {

	p (
		getGridTableOpen()
	+	getGridTableHeader (
			getGridTableHeaderColumn('Seconds', 'align=right')
		+	getGridTableHeaderColumn('Equals')
		)
	);

	writeSecondTableRow('86400', '1&nbsp;day');
	writeSecondTableRow('259200', '3&nbsp;days');
	writeSecondTableRow('5184000', '60&nbsp;days');
	writeSecondTableRow('7776000', '90&nbsp;days');
	writeSecondTableRow('31536000', '1&nbsp;year');
	writeSecondTableRow('315360000', '10&nbsp;years');

	writeGridTableClose();
}

function writeOPatchText (p_location, p_version) {
	p (
		'In order to successfully apply interim patches to your '
	+	'installation using the '
	+	IL('Interim Patch Installer (OPatch)', '../opatch.htm')
	+	', you should install '
	+	(p_version == '102' ? getOPatchPatch102() : getOPatchPatch())
	+	' to '
	+	(p_location == null ? 'both your Oracle Homes' : p_location)
	+	'. '
	+	getPointer('More information on OPatch', '../opatch.htm', '.')
	);
}

function writeOPatchUse (p_id, p_filename, p_home, p_extra, p_type) {

	writeOL (
		LI(getPatchDownloadLink(p_id, null, p_extra))
	+	LI('Unzip ' + p_filename + ' in C:\\stage')
	+	LI (
			'Set environment variables:'
		+	getCmdBox('set ORACLE_HOME=' + p_home + '\nset PATH=%ORACLE_HOME%\\OPatch;%PATH%')
		)
	+	PLI (
			'Apply patch:'
		+	getCmdBox (
				'cd /d C:\\stage\\' + p_id + '\n'
			+	'opatch apply\n'
			+	'opatch lsinventory'
			)
		)
	,	p_type
	);
}

function getLaptopLink() {
	return 	'If your server will have limited network access (e.g. it is a laptop PC), '
	+	'then follow these instructions: '
	+	getPointer('Running Oracle Products on a Windows laptop', '../laptop.htm')
	;
}

function writePSAPIDLLLink() {
	p (
		PLI (
			'IMPORTANT: If your operating system is Windows XP Service Pack 2 or higher, then copy PSAPI.DLL'
		+	HL('avoid_psapi_error_on_xp')
		)
	+	'<p>'
	);
}

function OID_tuning1() {
	return	'$ORACLE_HOME/bin/sqlplus ods@iasdb\n'
	+	'drop index ei_attrstore;\n'
	+	'create bitmap index ei_attrstore on ds_attrstore(entryid, attrname)\n'
	+	'tablespace olts_attrstore nologging compute statistics;\n'
	+	'alter index ei_attrstore no parallel;'
	;
}

function OID_tuning2() {
	return	'cd $ORACLE_HOME/ldap/admin\n'
	+	'$ORACLE_HOME/bin/sqlplus ods@iasdb\n'
	+	'@oidstats.sql'
	;
}

function writeDCMCommands() {
	writeUL (
		LI (
			getASDocLink('1012', 'Distributed Configuration Management Administrator\'s Guide: Commands', 'core.1012/b13997/cmds.htm')
		+	UL (
				LI(getASDocLink('1012', 'deployApplication', 'core.1012/b13997/cmds.htm#BEICHFGJ'))
			+	LI(getASDocLink('1012', 'redeployApplication', 'core.1012/b13997/cmds.htm#BEIEHCFD'))
			)
		)
	);
}

function createDSLink (p_as_type) {
	return 'Create a Data Source for your Oracle Database 10g' + HL('create_data_source_' + p_as_type);
}

function WL_JDBC() {
	return	WL('jdbc_url')
	+	'<br>(if your database listener port and SID is not <b>1521</b> and <b>orcl</b> (respectively), then modify the JDBC URL accordingly)'
	;
}

function JDBC_example() {
	return '<b>jdbc:oracle:thin:@localhost:1521:orcl</b>' + WL_JDBC();
}

function JDBC_link (p_text) {
	return getOTNSubLink(p_text, 'database/features/jdbc/index-091264.html')
}

function JDBC_libs (p_commands) {
	return 'Copy ' + JDBC_link('the JDBC libraries') + ':' + getCmdBox(p_commands);
}

function SCOTT_text() {
	return 'If the SCOTT user is locked or has not been created yet, then unlock/create it' + HL('connect_as_scott');
}

