// LiveCut Javascript library.
// $Id: //depot/LiveCut/src/web/liveCut.js#20 $

var smsNumber = "1-415-606-5439";
var copyright = "Copyright &copy; 2003-2009 LiveCut LLC.&nbsp;&nbsp; U.S. pat. no. 7,403,913.";
var emailAddr = String.fromCharCode(108,105,118,101,99,117,116,64,112,97,99,98,101,
		108,108,46,110,101,116); // livecut.AT.pacbell.net
var twitterUrl = String.fromCharCode(104,116,116,112,58,47,47,116,119,105,116,116,101,114,46,99,111,109,47,
		108,105,118,101,99,117,116); // http://twitter.com/livecut

// Hack around including this in every file or generating it in the <BODY>; MSIE performs
// compilation/expansion/evaluation of generated <SCRIPT> tags out of order.
document.write("<SCRIPT LANGUAGE='JavaScript' SRC='lc_nav.js' TYPE='text/javascript'></SCRIPT>\n");

function printContactAddress() {
	// Try to beat address harvesters, take 2
	// eMail Obfuscator Script 1.31 by Tim Williams - freeware output
	// (http://members.cox.net/timandbeth/spam/spam.htm)
    document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58) + emailAddr
    	+ String.fromCharCode(34,62,69,109,97,105,108,32,117,115,60,47,97,62));
}

function printTwitterAddress() {
	// Also eMail Obfuscator but http:// patched in.
	document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34) // <a href="
		+ twitterUrl
		+ String.fromCharCode(34,32,116,97,114,103,101,116,61,34,116,119,105,116,116,101,114,34,62) // " target="twitter">
		+ String.fromCharCode(70,111,108,108,111,119,32,117,115,
			32,111,110,32,84,119,105,116,116,101,114) // Follow us on Twitter
		+ String.fromCharCode(60,47,97,62)); // </a>
}

function printSMSNumber() {
	document.write("<B>" + smsNumber + "</B>");
}

function printXLinks() {
	document.write("<H3 CLASS='h3Text' ALIGN='center' STYLE=UNDERLINE>"
		+ "Other <I>LiveCut</I>s on the Web</H3>\n");
	document.write("<P CLASS='bodyText' ALIGN='center'>\n");
	document.write("An <A HREF='http://harmonicinc.com/view_product.cfm?id=352'>"
		+ "automated video-on-demand live ingest tool</A> for cable TV operators.<BR>\n");
	document.write("A <A HREF='http://livecut.sourceforge.net'>"
		+ "multi camera editing tool</A> for Apple Final Cut Pro 4.5.<BR>\n");
	document.write("Also the <A HREF='http://mdsp.smartelectronix.com/livecut'>"
		+ "rhythm track sequencer plugin</A> for VST.<BR></P>\n");
}

function printCatalogLink() {
	 // Make HREF='catalog.html' later when implementing search
	document.write("<A HREF='Catalog'>catalog</A>");
}

function printCopyright() {
	document.write(copyright);
}

//
// Functions to refactor rendering of WhiteOwlWeb decorations
//
var ctrColWidth = 890; 

function startCtrColTable() {
	document.write("<br><!-- START CENTER COLUMN TABLE --><div align='center'>"
		+ "<table cellpadding='0' cellspacing='0' border='0' width='" + ctrColWidth + "' bgcolor='#D5ECFF' summary=''>\n");
}

function outputHeader() {
	document.write("<!-- LiveCut Header -->"
		+ "<tr><td align='center'>"
		+ "<img src='images/livecut-" + ctrColWidth + ".jpg' width='" + ctrColWidth + "' height='145' alt='LiveCut' border='0'><br>"
		+ "</td></tr>"
		+ "<!-- End LiveCut Header -->\n");
}

function outputNavBar() {
	document.write("<!-- JS Nav Bar -->"
		+ "<tr><td height='30' align='center' valign='top'>");
		
	// In lc_nav.js
	renderButtons();
	
	document.write("<br></td></tr>"
		+ "<!-- End Nav Bar -->\n");
}

function startCoreTextTable() {
	document.write("<tr>"
		+ "<td align='center'>"
		+ "<!-- CORE TEXT TABLE -->"
		+ "<table width='80%' align='center' cellpadding='0' cellspacing='0' border='0' summary=''>"
		+ "<tr>"
		+ "<td align='left'>"
		+ "<br>\n");
}

function endCoreTextTable() {
	document.write("</td></tr></table>"
		+ "<!-- END CORE TEXT TABLE -->\n");
}

function endCtrColTable() {
	document.write("</td></tr></table>"
		+ "</div>"
		+ "<!-- END CENTER COLUMN TABLE -->\n");
}

function outputFooter() {
	document.write("<!-- COPYRIGHT FOOTER -->"
		+ "<div align='center'>"
		+ "<table bgcolor='#A50525' cellpadding='10' cellspacing='0' border='0' width='" + ctrColWidth + "' class='footer' summary=''>"
		+ "<tr>"
		+ "<td align='center'>"
		+ "<p class='footer'>"
		+ copyright
		+ "</p></td></tr></table>"
		+ "</div>"
		+ "<!-- END COPYRIGHT FOOTER --><br>\n");
}
