window.onload=function(){
	var navs = document.getElementById('nav_342323').getElementsByTagName('li');
	var ancs = document.getElementById('nav_342323').getElementsByTagName('a');
	var currentPath = (window.location+'').split('/');

	for( i=0;i<navs.length; i++ ){
		var anc = (ancs[i].href+'').split('/');
		if( anc[4] == currentPath[4] && navs[i].className != 'tel' && navs[i].className != 'mail')
		navs[i].className = 'selected';
	}
}

// !Bone
// pop-up function
var newWin = null;
function closeWin(){
	if (newWin != null){
		if(!newWin.closed)
			newWin.close();
	}
}
function popUp(strURL,strType,strHeight,strWidth) {
	closeWin();
	var strOptions="";
	if (strType=="console") strOptions="resizable,height="+strHeight+",width="+strWidth;
	if (strType=="fixed") strOptions="status,height="+strHeight+",width="+strWidth;
	if (strType=="elastic") strOptions="toolbar,menubar,scrollbars,resizable,location,height="+strHeight+",width="+strWidth;
	newWin = window.open(strURL, 'newWin', strOptions);
	newWin.focus();
}
function writeCookie(name,value) {
	var date = new Date();
	date.setTime(date.getTime()+(365*24*60*60*1000));
	//var expires = "; expires="+date.toGMTString();
	var expires = "; expires=";
	document.cookie = name+"="+value+expires+"; path=/";
}

function readCookie(name) {
	var nameEQ = name + "=";
	var ca = document.cookie.split(';');
	for (var i=0;i < ca.length;i++) {
		var c = ca[i];
		while (c.charAt(0)==' ') {
			c = c.substring(1,c.length);
		}
		if (c.indexOf(nameEQ) == 0) {
			return c.substring(nameEQ.length,c.length);
		}
	}
	return null;
}
function showConfirmDialog(windowContent, windowContentType) {
	objPopWindowContent = windowContent;
	objPopWindowContentType = windowContentType;
	if (readCookie("accept_terms") == "accept") {
		openWindow(windowContent, windowContentType);
	} else {
		openWindow("qualified","html");
	}
}
function openWindow(content, contentType) {
	if (contentType == "html") {
		if (content == "qualified") {
			strWinParams = "status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=1,height=600,width=1024";
		} else {
			strWinParams = "status=0,toolbar=0,location=0,menubar=1,directories=0,resizable=1,scrollbars=1,height=500,width=950";
		}
		objWin = window.open("/invest/"+content+".html",content+"Window",strWinParams);
	} else {
		objWin = window.open("" + content+"","pdfWindow");
	}
}
function acceptTerms() {
	writeCookie("accept_terms","accept");
	openWindow(window.opener.objPopWindowContent, window.opener.objPopWindowContentType);
}
// !End Bone
