function googleAnalytics_FragmentA() {
	var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
	document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
}

function googleAnalytics_FragmentB() {
	var pageTracker = _gat._getTracker("UA-4407248-1");
	pageTracker._initData();
	pageTracker._trackPageview();
}

function obtainDownloadList(index, getName) {
	var downloadList = new Array(10);
	
	downloadList[0] = '<a href="http://www.ulyssesrecords.com/downloads/iris.zip">IRIS/IRIS++</a>';
	downloadList[1] = '<a href="http://www.ulyssesrecords.com/downloads/loj.zip">Legend Of JADE (Japanese)</a>';
	downloadList[2] = "";
	downloadList[3] = "";
	downloadList[4] = "";
	downloadList[5] = "";
	downloadList[6] = "";
	downloadList[7] = "";
	downloadList[8] = "";
	downloadList[9] = "";
	
	// Return only the name of product
	if(getName == true) {
		for(var i = 0; i < downloadList.length; i++) {
			var startIndex = downloadList[i].indexOf(">");
			var endIndex = downloadList[i].indexOf("<", startIndex);
			downloadList[i] = downloadList[i].substring(startIndex + 1, endIndex);
		}
	}
	
	if(index == -1) {
		return downloadList;
	}
	return downloadList[index];
}

function header() {
	document.write('<div id="headerWrapper">');
	document.write('	<div class="barSeparator"></div>');
	document.write('	<div id="headerTitle">');
	document.write('		<a href="/index.html"><img class="icon" src="/res/img/icon_ulylogo.png" alt="Ulysses Records" align="middle" style="width:27px;height:23px" /> <span style="color:#ffffff">Ulysses Records</span></a>');
	document.write('	</div>');
	document.write('	<div id="headerMenu">');
	document.write('		<a href="/contact.html">Contact</a> | <a href="/privacy.html">Privacy</a> | <a href="/sitemap.html">Site Map</a> | <a href="https://secure4.ilisys.com.au/ulyss/secure/ulyquid/index.php?l=1">Login</a> | <a href="http://www.ulyssesrecords.com/jp/index.html"><img src="/res/img/jp_flag.png" style="width:21px;height:13px" align="middle" alt="Japanese" /></a>');
	document.write('	</div>');
	document.write('	<div class="barSeparator"></div>');
	document.write('	<div class="gradationSeparator"></div>');
	document.write('</div>');
}

function navMenu() {
	document.write('<div id="contentMenuWrapper">');
	document.write('	<div id="contentMenu">');
	document.write('		<h1 class="navigation"><a href="/products/index.html">PRODUCTS</a> | <a href="/services/index.html">SERVICES</a> | <a href="/downloads/index.html">DOWNLOADS</a> | <a href="/docs/index.html">DOCUMENTATION</a> | <a href="/ulynet/index.html">ULY.NET</a> | <a href="/about.html">ABOUT</a></h1>');
	document.write('	</div>');
	document.write('</div>');
}

function footer() {
	var date = new Date();
	var year = date.getYear();
	if(year < 2000) year += 1900;

	document.write('<br /><br />');
	document.write('<div id="footer">');
	document.write('	<hr />');
	document.write('	<div class="bodyText">Copyright © ' + year + ' Ulysses Records Pty Ltd. All Rights Reserved.</div>');
	document.write('</div>');
}

function displayAllDownloads(linkEnabled) {
	var retStr = "";
	for(var i = 0; i < obtainDownloadList.length; i++) {
		if(obtainDownloadList(i, false) != "") {
			retStr += '	<div class="downloadText">';
			retStr += '		<a name="' + i + '"></a>' + obtainDownloadList(i, !linkEnabled);
			retStr += '	</div>';
		}
	}
	return retStr;
}

function paneFeaturedDownloads() {
	document.write('<fieldset style="padding:1px 1px 1px 1px;">');
	document.write('	<h1>FEATURED DOWNLOADS</h1>');
	document.write('	<br />');
	for(var i = 0; i < 10; i++) {
		if(obtainDownloadList(i, false) != "") {
			document.write('	<div class="downloadText">');
			document.write('		<a href="/downloads/index.html#' + i + '">' + obtainDownloadList(i, true) + '</a>');
			document.write('	</div>');
		}
	}
	document.write('	<br />');
	document.write('	<h2><strong><a href="/downloads/index.html">Terms And Conditions</a></strong></h2>');
	document.write('	<h2><strong><a href="/downloads/index.html">View all downloads</a></strong></h2>');
	document.write('	<br />');
	document.write('</fieldset>');
	document.write('<br />');
}

function paneContact() {
	document.write('<fieldset style="padding:1px 1px 1px 1px;">');
	document.write('	<h1>CONTACT/ENQUIRIES</h1>');
	document.write('	<br />');
	document.write('	<div class="bodyText" style="padding-right:20px;">');
	document.write('		<p class="descriptionText">For more information on products and services, contact our support desk at <a href="mailto:support@ulyssesrecords.com">support@ulyssesrecords.com</a></p>');
	document.write('	</div>');
	document.write('	<br />');
	document.write('</fieldset>');
	document.write('<br />');
}

function paneNews() {
	document.write('<fieldset style="padding:1px 1px 1px 1px;">');
	document.write('	<h1>NEWS</h1>');
	document.write('	<br />');
	document.write('	<div class="bodyText">');
	document.write('		<p><span class="infoColorText">2009.12.15</span> <a href="http://www.ulyssesrecords.com/docs/ulyquid/version.html">ULYQUID ver docs added</a></p>');	
	document.write('		<p><span class="infoColorText">2009.12.15</span> ULYQUID 1.1.1 released</p>');
	document.write('		<p><span class="infoColorText">2009.03.11</span> Japanese page available</p>');
	document.write('		<p><span class="infoColorText">2009.02.27</span> ULYQUID RC1 released</p>');
	document.write('		<p><span class="infoColorText">2009.02.27</span> ULYQUID docs released</p>');
	document.write('		<p><span class="infoColorText">2008.12.01</span> Website renewal</p>');
	document.write('	</div>');
	document.write('	<br />');
	document.write('</fieldset>');
	document.write('<br />');
}

function paneUlyquidLogin() {
	document.write('<fieldset style="padding:1px 1px 1px 1px;">');
	document.write('	<h1>ULYQUID Login</h1>');
	document.write('	<form id="frmLogIn" name="frmLogIn" method="post" enctype="multipart/form-data" action="http://localhost/ulyquid/authorizer/login.php">');
	document.write('	<center>');
	document.write('	<div style="width:245px;padding-top:20px;padding-bottom:20px;">');
	document.write('		<div class="componentWrapperFull" style="width:245px;">');
	document.write('			<div class="label">Login ID :</div>');
	document.write('			<input type="text" name="login_id" value="" class="inputBox" style="width:100px;" /><br />');
	document.write('		</div>');
	document.write('		<div class="componentWrapperFull" style="width:245px;">');
	document.write('			<div class="label">Password :</div>');
	document.write('			<input type="password" name="login_password" value="" class="inputBox" style="width:100px;" /><br />');
	document.write('		</div>');
	document.write('		<div class="componentWrapperFull" style="width:245px;">');
	document.write('			<div class="submitButtonWrapper">');
	document.write('				<input type="submit" name = "submit" class="submitButton" value = "Login" />');
	document.write('			</div>');
	document.write('		</div>');
	document.write('	</div>');
	document.write('	</center>');
	document.write('	</form>');
	document.write('</fieldset>');
	document.write('<br />');
}
