
// ***** functions *****

function nav(page) {
  var str = "";
  str += "<a id='home' href='index.html'>Home</a>";
  str += "<a id='overview' href='overview.html'>Overview</a>";
  str += "<a id='criteria' href='criteria.html'>Investment Criteria</a>";
  str += "<a id='team' href='team.html'>Investment Team</a>";
  //str += "<a id='sponsors' href='sponsors.html'>Our Sponsors</a>";
  str += "<a id='portfolio' href='portfolio.html'>Portfolio</a>";
  str += "<a id='contact' class='last' href='contact.html'>Contact Us</a>";
  document.write(str)
  if(document.getElementById) {
		if(page == 'contact') {
			document.getElementById(page).className="currentpage2";
		} else if(page != '') {
      document.getElementById(page).className="currentpage";
    }
  }
}

function showItem(item){
  if (document.getElementById && document.body.style) {
    theLast = document.getElementById(lastItem);
    theItem = document.getElementById(item);
    theLast.style.visibility = "hidden";
    theItem.style.visibility = "visible";
  }
  else if (document.all) {
    theLast = document.all(lastItem).style;
    theItem = document.all(item).style;
    theLast.visibility = "hidden";
    theItem.visibility = "visible";
    } 
  else if (document.layers) {
    theLast = document.layers[lastItem];
    theItem = document.layers[item];
    theLast.visibility = "hide";
    theItem.visibility = "show";
    } 
  lastItem = item;  
}

function scroll(id){
  if(document.getElementById){
    var el = document.getElementById(id);
    el.scrollTop = "0";
  } 
}

function email(s) {
  str = "";
  str += "<a href='mailto:" + s;
  str += "@cottoncreekcapital.com?subject=Thank you for Contacting our Website'>";
  str += s + "@cottoncreekcapital.com";
  str += "</a>";
  document.write(str);
}


function footer() {
  str = "";
  str += "<a href='privacy.html'>Privacy Policy</a>";
  str += " | ";
  str += "<a href='ADVSCHF.pdf'>Form ADV</a>";
  document.write(str);
}


function email(s) {
  str = "";
  str += "<a href='mailto:" + s;
  str += "@cottoncreekcapital.com?subject=Thank you for Contacting our Website'>";
  str += s + "@cottoncreekcapital.com";
  str += "</a>";
  document.write(str);
}

/*initialize variables*/
/*
var num = (Math.round(Math.random()*2))+5;
var MM_contentVersion = 5;
var isIE = navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0;
var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;

if(plugin) {
  var words = navigator.plugins["Shockwave Flash"].description.split(" ");
  for (var i = 0; i < words.length; ++i){
    if (isNaN(parseInt(words[i])))
    continue;
    var MM_PluginVersion = words[i]; 
  }
  var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) {
  document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
  document.write('on error resume next \n');
  document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
  document.write('</SCR' + 'IPT\> \n');
}
*/
