var preloadFlag = false;
	if (document.images) {
		topnav0off=new Image();topnav0off.src="/images/topnav/home_off.gif";
		topnav0on=new Image();topnav0on.src="/images/topnav/home_on.gif";
		topnav1off=new Image();topnav1off.src="/images/topnav/news_off.gif";
		topnav1on=new Image();topnav1on.src="/images/topnav/news_on.gif";
		topnav2off=new Image();topnav2off.src="/images/topnav/success_stories_off.gif";
		topnav2on=new Image();topnav2on.src="/images/topnav/success_stories_on.gif";
		topnav3off=new Image();topnav3off.src="/images/topnav/leadership_off.gif";
		topnav3on=new Image();topnav3on.src="/images/topnav/leadership_on.gif";
		topnav4off=new Image();topnav4off.src="/images/topnav/strategies_off.gif";
		topnav4on=new Image();topnav4on.src="/images/topnav/strategies_on.gif";
		topnav5off=new Image();topnav5off.src="/images/topnav/opinions_off.gif";
		topnav5on=new Image();topnav5on.src="/images/topnav/opinions_on.gif";
		topnav6off=new Image();topnav6off.src="/images/topnav/about_us_off.gif";
		topnav6on=new Image();topnav6on.src="/images/topnav/about_us_on.gif";
		topnav7off=new Image();topnav7off.src="/images/topnav/enewsletter_off.gif";
		topnav7on=new Image();topnav7on.src="/images/topnav/enewsletter_on.gif";
		submit1off=new Image();submit1off.src="/images/buttons/submit_button_off.gif";
		submit1on=new Image();submit1on.src="/images/buttons/submit_button_on.gif";
		preloadFlag = true;
	}
	
function emailToAColleague() {
	var winl = (screen.width - 500) / 2;
	var wint = (screen.height - 550) / 2;
	var popupwinemail = window.open('/popup/emailtoacolleague.html', 'popupwinemail', 'width=500, height=550, scrollbars=yes, toolbar=no, left='+winl+', top='+wint+', screenX='+winl+', screenY='+wint+', resizable=yes, alwaysRaised=yes');
	popupwinemail.focus();
}
function recommendThisSite() {
	var winl = (screen.width - 500) / 2;
	var wint = (screen.height - 550) / 2;
	var popupwinrecommend = window.open('/popup/recommendthissite.html', 'popupwinrecommend', 'width=500, height=550, scrollbars=yes, toolbar=no, left='+winl+', top='+wint+', screenX='+winl+', screenY='+wint+', resizable=yes, alwaysRaised=yes');
	popupwinrecommend.focus();
}
function republishArticle() {
	var winl = (screen.width - 525) / 2;
	var wint = (screen.height - 325) / 2;
	var popupwinrepublish = window.open('/popup/republisharticle.html', 'popupwinrepublish', 'width=525, height=325, scrollbars=yes, toolbar=no, left='+winl+', top='+wint+', screenX='+winl+', screenY='+wint+', resizable=yes, alwaysRaised=yes');
	popupwinrepublish.focus();
}
function letUsKnow() {
	var winl = (screen.width - 525) / 2;
	var wint = (screen.height - 325) / 2;
	var popupwinlet = window.open('/popup/letusknow.html', 'popupwinlet', 'width=525, height=325, scrollbars=yes, toolbar=no, left='+winl+', top='+wint+', screenX='+winl+', screenY='+wint+', resizable=yes, alwaysRaised=yes');
	popupwinlet.focus();
}

function openSampleNewsletter() {
	if(document.layers) {
		var newswin = window.open('/popup/sampleenewsletter.html');
	} else {
		var newswin = window.open('/popup/sampleenewsletter.html', 'newswin', 'width=560, height=600, scrollbars=yes, toolbar=no, left=0, top=0, screenX=0, screenY=0, resizable=yes, alwaysRaised=yes');
		newswin.focus();
	}
}	


function writeDate() {
var months=new Array(13);
months[1]="1";
months[2]="2";
months[3]="3";
months[4]="4";
months[5]="5";
months[6]="6";
months[7]="7";
months[8]="8";
months[9]="9";
months[10]="10";
months[11]="11";
months[12]="12";
var time=new Date();
var lmonth=months[time.getMonth() + 1];
var date=time.getDate();
var year=time.getYear();
if (year < 2000) { 
	year = year + 1900; 
}
document.write(lmonth + "/" + date + "/" + year);
}

function writeYear() {
var time=new Date();
var year=time.getYear();
if (year < 2000) { 
	year = year + 1900; 
}
document.write(year);
}
function swapImages(name,bn,status){
	if (document.images && (preloadFlag == true)) {
    	loc=name + bn;
    	document[loc].src=eval(name+ bn + status +".src");
  	}
}
function changeSubmitImage(imgSwap, imgName) 
{ 
imgName.src = imgSwap;
}

function lowerCase(formObject) {
var formObject = formObject.toLowerCase();
return formObject;
}

/*function printerFriendlyVersion() {
	var channelType = document.btbform.type.value;
	var enteredDate = document.btbform.afterColonDate.value;
	var splitDate = enteredDate.split("/");
	var createdDate = splitDate[0]+splitDate[1]+splitDate[2];
	//document.location.href = '/printVersion.jsp?channelType='+channelType+'&createdDate='+createdDate;
	document.location.href = "/"+channelType+"/"+channelType+"_article_"+createdDate+"_print.html";
	
}
*/

function viewComments(anchorID) {
	var channelType = document.btbform.type.value;
	var enteredDate = document.btbform.afterColonDate.value;
	var splitDate = enteredDate.split("/");
	var createdDate = splitDate[0]+splitDate[1]+splitDate[2];
	if(channelType=="successstories") {
		document.location.href = "/"+channelType+"/success_comments_"+createdDate+".html#" + anchorID;
	} else {
		document.location.href = "/"+channelType+"/"+channelType+"_comments_"+createdDate+".html#" + anchorID;
	}
}

function goToArticle() {
	var channelType = document.btbform.type.value;
	var enteredDate = document.btbform.afterColonDate.value;
	var splitDate = enteredDate.split("/");
	var createdDate = splitDate[0]+splitDate[1]+splitDate[2];
	document.location.href = "/"+channelType+"/"+channelType+"_article_"+createdDate+".html";
}

function printerFriendlyVersion() {
	var channelType = document.btbform.type.value;
	var enteredDate = document.btbform.afterColonDate.value;
	var splitDate = enteredDate.split("/");
	var createdDate = splitDate[0]+splitDate[1]+splitDate[2];
	document.location.href = '/printVersion.jsp?channelType='+channelType+'&createdDate='+createdDate;
}

