
var SECTIONS=["index","whoweare","strategies","careers","contact","login"];
var SECTION_NAV_IMAGE_WIDTHS=[50,85,82,69,85,54];

var onImages=new Object()
var offImages=new Object()
for (var i=0; i<SECTIONS.length; i++) {
	onImages[SECTIONS[i]]=new Image()
	onImages[SECTIONS[i]].src="images/nav_"+SECTIONS[i]+"_on.gif"
	offImages[SECTIONS[i]]=new Image()
	if (SECTIONS[i]==section) {
		offImages[SECTIONS[i]].src="images/nav_"+SECTIONS[i]+"_on.gif"
	}
	else {
		offImages[SECTIONS[i]].src="images/spacer.gif"
	}
}

function writeBodyStart(section) {
	var s=""
		+"<body topmargin=\"0\" leftmargin=\"0\" bgcolor=\"#616D58\" background=\"images/bg.gif\">"
		+"<map name=\"footermap\">"
		+"<area shape=rect coords=\"562,53,632,69\" href=\"#\" onclick=\"getLink('disclaimer'); return false;\">"
		+"</map>"
		
		+"<table align=\"center\" style=\"margin-top:81px;\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">"
		+"<td><img src=\"images/spacer.gif\" height=\"1\" width=\"50\" /><br/></td>"
		+"<td><img src=\"images/spacer.gif\" height=\"1\" width=\"681\" />"
		+"	<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" width=\"681\" background=\"images/content_bg.gif\">"
		+"	<tr>"
		+"	<td><img src=\"images/spacer.gif\" height=\"16\" width=\"17\" /><br/></td>"
		+"	<td><img src=\"images/spacer.gif\" height=\"1\" width=\"647\" /><br/></td>"
		+"	<td><img src=\"images/spacer.gif\" height=\"1\" width=\"17\" /><br/></td>"
		+"	</tr>"
		+"	<tr valign=\"top\">"
		+"	<td><img src=\"images/spacer.gif\" height=\"322\" width=\"1\" /><br/></td>"
		+"	<td background=\"images/content_photo.jpg\">"
		+"	<table border=0 cellspacing=0 cellpadding=0 width=647 height=\"322\">"
		+"	<tr valign=top align=left><td width=647 height=\"322\" background=\"images/common_text"+(section=="index"?"_index":"")+".gif\">"
		+	topNavHTML()
		+"	<img src=\"images/sectionheader_"+section+".gif\" width=\"273\" height=\"14\" border=\"0\" style=\"margin-left:17px; margin-top:"+(section!="index"?"83":"133")+"px; margin-bottom:17px;\" /><br/>"
		+"	<div style=\"line-height:18px; margin-left:15px; width:360px; font-size:11px; font-family:arial,helvetica; color:#272430; \">"
	document.write(s)
}

function topNavHTML() {
	var s="<nobr>"
	for (var i=0; i<SECTIONS.length; i++) {
		var marginLeft=0;
		if (i==0) {
			marginLeft=14;
		}
		else if (i==SECTIONS.length-1) {
			s+="<img src=images/spacer.gif height=1 width=189 />"
		}
		s+="<a href=\"#\" onclick=\"getLink('"+SECTIONS[i]+"'); return false;\" onmouseover=\"switchNavImg('"+SECTIONS[i]+"', true)\" onmouseout=\"switchNavImg('"+SECTIONS[i]+"', false)\">"
		s+="<img style=\"margin-top:25px; margin-left:"+marginLeft+"px;\" id=navImg"+SECTIONS[i]+" src="+offImages[SECTIONS[i]].src+" height=15 width="+SECTION_NAV_IMAGE_WIDTHS[i]+" border=0 />"
		s+="</a>"
	}
	s+="</nobr>"
	return s
}

function writeTitle(titleSuffix) {
	document.writeln("<title>Unicom Capital - Official Website - An investment management firm specializing in the global equities market. "+(titleSuffix.length>0?": "+titleSuffix:"")+"</title>")
}

function writeBodyEnd(section) {
	var s=""
		+"	<br/></div>"
		+"	</td></tr></table>"		
		+"	</td>"
		+"	<td><img src=\"images/spacer.gif\" height=\"1\" width=\"1\" /><br/></td>"
		+"	</tr>"
		+"	<tr valign=\"top\">"
		+"	<td><img src=\"images/spacer.gif\" height=\"112\" width=\"1\" /><br/></td>"
		+"	<td><img src=\"images/footer_text.gif\" width=\"647\" height=\"71\" border=\"0\" usemap=\"#footermap\" /><br/></td>"
		+"	<td><img src=\"images/spacer.gif\" height=\"1\" width=\"1\" /><br/></td>"
		+"	</tr>"
		+"	</table>"
		+"<br/></td>"
		+"<td><img src=\"images/spacer.gif\" height=\"1\" width=\"50\" /><br/></td>"
		+"</tr>"

		+"</table><pre>       </pre>"

		+"<div align=\"center\"><span style=\"font-size:11px; font-family:arial,helvetica; color:#1C3315; \"><a href=index.html>HOME</a> | <a href=whoweare.html>WHO WE ARE</a> | <a href=strategies.html>STRATEGIES</a> | <a href=careers.html>CAREERS</a> | <a href=contact.html>CONTACT US</a></span></div>"

		+"</body>"
	document.write(s);
}

function getLink(section) {
	location.href=section+".html"
}

function switchNavImg(section, on) {
	document.getElementById("navImg"+section).src=window[(on?"on":"off")+"Images"][section].src
}


