openedNav="none";
function swapImages(img_name, img_src){
	if (document.images){
		document[img_name].src = img_src;
    }
}
function changeImages(img_name, img_src){
	swapImages(img_name, img_src);
}
/**********************************************************************
 thumb box navigation
 **********************************************************************/
function ThmbUp(name){
	loc=getImgName(name)+'_u.gif';
	if(infoBoxShown && name=='bxinfo'){
	}else if(name==selectImg){
	}else{
		swapImages(name, loc);
	}
}
function ThmbOv(name){
	loc=getImgName(name)+'_o.gif';
	swapImages(name, loc);
}
infoBoxShown=false;
selectImg='bx1';
function getImgName(name){
	if(name=='bx1'){
		return '/images/imgbx1';
	}else if (name=='bxinfo'){
		return '/images/imgbx_info';
	}else if (name=='nxt'){
		return '/images/next';
	}
	return '/images/imgbx';
}
function toggleInfo(){
	if(infoBoxShown){
		infoBoxShown=false;
		ThmbUp('bxinfo');
		document.getElementById("infoBox").style.visibility = 'hidden';
	}else{
		infoBoxShown=true;
		ThmbOv('bxinfo');
		document.getElementById("infoBox").style.visibility = 'visible';
	}
}
/**********************************************************************
 creates a "more" link for long text
 **********************************************************************/
var qsParm = new Array();
function qs() {
	var query = window.location.search.substring(1);
	var parms = query.split('&');
	qStr=false;
		for (var i=0; i<parms.length; i++) {
			var pos = parms[i].indexOf('=');
			if (pos > 0) {
			var key = parms[i].substring(0,pos);
			var val = parms[i].substring(pos+1);
			qsParm[key] = val;
			qStr=true;
		}
	}
}
function moreLink(){
	if(window.checkTxtLen){
		var n = document.getElementById('MORE');
		qs(); // get query strings
		if(qsParm['fullT']!='y') {
			var operator = (qStr) ? "&" : "?";
			n.innerHTML = "<br><a href=javascript:openPopup('moretext','"+window.location+""+operator+"fullT=y','550','550',false)>read more</a>";
		}
		n.style.display='inline';
	}
}
/**********************************************************************
 popup window function
 **********************************************************************/
function openPopup(name, windowLoc, height, width, scroll){
	var winl = (screen.width - width) / 2;
	var wint = (screen.height - height) / 2;
	if(!scroll){
		scrollbar='yes';
	}else{
		scrollbar='no';
	}
	var winProps = 'toolbar=no,statusbar=no,location=no,scrollbars='+scrollbar+',resizable=yes,width='+width+',height='+height+',top='+wint+',left='+winl;
	window.open(windowLoc, name, winProps);
}
/**********************************************************************
 below preloads navigation rollovers
 **********************************************************************/
function newImage(arg) {
	if (document.images) {
		rslt = new Image();
		rslt.src = arg;
		return rslt;
	}
}
var preloadFlag = false;
function preloadImages() {
	if (document.images) {
		pre_imgbx_o = newImage('/images/imgbx_o.gif');
		pre_imgbx1_o = newImage('/images/imgbx1_o.gif');
		pre_imgbx_info_o = newImage('/images/imgbx_info_o.gif');
		preloadFlag = true;
	}
}

/**********************************************************************
 below shows and hides navigation layers
 **********************************************************************/
////below is for the main nav
function show(id){
	menuOver();
	if(id!="none"){
		document.getElementById("subnavDIV1").style.visibility = 'hidden';
		document.getElementById("subnavDIV2").style.visibility = 'hidden';
	}else{
		document.getElementById("subnavDIV1").style.visibility = 'visible';
		document.getElementById("subnavDIV2").style.visibility = 'visible';
	}
	if(id=="sub1"){
		openedNav="sub1";
		document.getElementById("sub1").style.visibility = 'visible';
		document.getElementById("portfolio").className = 'selectLink';
	}else{
		document.getElementById("sub1").style.visibility = 'hidden';
		document.getElementById("portfolio").className = 'regLink';
	}
	if(id=="sub2"){
		openedNav="sub2";
		document.getElementById("sub2").style.visibility = 'visible';
		document.getElementById("firm").className = 'selectLink';
	}else{
		document.getElementById("sub2").style.visibility = 'hidden';
		document.getElementById("firm").className = 'regLink';
	}
}
function hideAll(){
	show('none');
}
function menuOver(){
	if(window.clearNav){
		window.clearTimeout(clearNav);
	}
}
function menuRevert(){
	clearNav = window.setTimeout("hideAll()", 1000);
}
/**********************************************************************
 show/hide bio
 **********************************************************************/
function hideBio(){
	document.getElementById("bio").style.visibility = 'hidden';
}
function showBio(){
	document.getElementById("bio").style.visibility = 'visible';
}
/**********************************************************************
 show/hide offers
 **********************************************************************/
function showOffers(){
	document.getElementById("offers").style.display = 'inline';
	document.getElementById("showoffers").style.display = 'none';
}
/**********************************************************************
 insert flash
 **********************************************************************/
function includeFlash(movieName, width, height, bgcolor, vars){
//includeFlash('flash/mymovie.swf', '765', '363', '#FFFFFF', 'image1');
	var nocache=new Date().getTime();
	if(vars){
		urlvars=("?film="+vars+"&nc="+nocache);
	}else{
		urlvars=("?nc="+nocache);
	}
	document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id='+movieName+' ALIGN="">'
		+'<PARAM NAME=movie VALUE="'+movieName+urlvars+'"><PARAM NAME=FlashVars VALUE="movieid='+nocache+'" />'
		+'<PARAM NAME=quality VALUE=high><PARAM NAME=salign VALUE=LT><PARAM NAME=wmode VALUE=transparent>'
		+'<EMBED src="'+movieName+urlvars+'" ' 
		+'FlashVars="movieid='+nocache+'" quality=high wmode=transparent WIDTH="'+width+'" HEIGHT="'+height+'" NAME='+movieName+' salign=lt '
		+'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>')
}
function includeFlash2(movieName, width, height, bgcolor, vars){
//includeFlash2('flash/mymovie.swf', '765', '363', '#FFFFFF', 'image1');
	var nocache=new Date().getTime();
	if(vars){
		urlvars=("?film="+vars+"&nc="+nocache);
	}else{
		urlvars=("?nc="+nocache);
	}
	document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id='+movieName+' ALIGN="">'
		+'<PARAM NAME=movie VALUE="'+movieName+urlvars+'"><PARAM NAME=FlashVars VALUE="movieid='+nocache+'" />'
		+'<PARAM NAME=quality VALUE=high><PARAM NAME=wmode VALUE=transparent>'
		+'<EMBED src="'+movieName+urlvars+'" ' 
		+'FlashVars="movieid='+nocache+'" quality=high wmode=transparent WIDTH="'+width+'" HEIGHT="'+height+'" NAME='+movieName+' '
		+'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>')
}
function includeFlashLogo(logoNum){
	//includeFlashLogo('flash/mymovie.swf', '765', '363', '#FFFFFF', 'image1');
	var movieName = "/video/rotate-logo/rotating_PH_logo.swf";
	var width = 144;
	var height = 211;
	logoNum = (logoNum==undefined) ? 1 : logoNum;
	var urlvars=("?l="+logoNum);
	document.write ('<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" '
		+'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="'+width+'" HEIGHT="'+height+'" id='+movieName+' ALIGN="">'
		+'<PARAM NAME=movie VALUE="'+movieName+urlvars+'"><PARAM NAME=FlashVars VALUE="movieid=flashlogo" />'
		+'<PARAM NAME=quality VALUE=high><PARAM NAME=scale VALUE=noscale><PARAM NAME=salign VALUE=LT><PARAM NAME=wmode VALUE=transparent>'
		+'<EMBED src="'+movieName+urlvars+'" ' 
		+'FlashVars="movieid=flashlogo" quality=high wmode=transparent WIDTH="'+width+'" HEIGHT="'+height+'" NAME=flashlogo scale=noscale salign=lt '
		+'TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED></OBJECT>')
}
/**********************************************************************
 below are the functions called on page load (content area)
 **********************************************************************/
function init() {
	hideAll(); //navigation dropdown setup
	moreLink();
	siteSection='none';
	preloadImages();
}