var developmentMode = false;

if (developmentMode)
	siteroot = "/new/";
else
	siteroot = "/";
	
//var siteroot = "";
var arrMainPictures = Array(siteroot + "common/imgs/altmainpic1.jpg", siteroot + "common/imgs/altmainpic2.jpg");
var arrSmallRightPictures = Array(siteroot + "common/imgs/churchstreetalt.jpg", siteroot + "common/imgs/waterfall.jpg");
var arrSmallLeftPictures = Array(siteroot + "common/imgs/skitrails.jpg", siteroot + "common/imgs/boathouse.jpg");
var Path = location.pathname.toLowerCase();

function getMainPicture(){
    document.write('<img src=\"' + arrMainPictures[Math.floor(Math.random() * (arrMainPictures.length))] + '\" alt=\"BTV\" border=\"0\" height=\"383\" width=\"247\">');
}


function getSmallPicture(lr){
    if(lr=="l"){
        document.write('<img src=\"' + arrSmallLeftPictures[Math.floor(Math.random() * (arrSmallLeftPictures.length))] + '\" alt=\"Burlington, Vermont!\" border=\"0\" height=\"127\" width=\"188\">');    
    }
    else{
        document.write('<img src=\"' + arrSmallRightPictures[Math.floor(Math.random() * (arrSmallRightPictures.length))] + '\" alt=\"Burlington, Vermont!\" border=\"0\" height=\"127\" width=\"138\">');    
    }
}

function setLanguage(){
    if(Path.indexOf('fr/') > 0){
        document.write('<a href="' + Path.replace('fr/', '') + '"><img border="0" width="16" alt="" height="10" src="' + siteroot + 'common/imgs/United_States_of_America.gif"></a>&nbsp;<a href="' + Path.replace('fr/', '') + '" class="purpleLinks">English</a>');
    }
    else{
		if (developmentMode) {
			document.write('<a href="/new/fr' + Path.replace("new/", "") + '"><img border="0" width="16" alt="" height="10" src="' + siteroot + 'common/imgs/Canada.gif"></a>&nbsp;<a href="/new/fr' + Path.replace("new/", "") + '" class="purpleLinks">Fran&ccedil;ais</a>');
		}
		else {
        	document.write('<a href="/fr' + Path + '"><img border="0" width="16" alt="" height="10" src="' + siteroot + 'common/imgs/Canada.gif"></a>&nbsp;<a href="/fr/FRMSG.html" class="purpleLinks">Fran&ccedil;ais</a>');
		}
    }
}
/// ' + Path + '" class="purpleLinks">Fran&ccedil;ais</a>');
function getCopyrightYear(){
    var curdate = new Date();
    var Year = curdate.getFullYear();
    document.write(Year);
}
