// Edit the following settings to suit your need, between the words BEGIN and END
// BEGIN

//   Common settings 
// **********************************
var websiteOwnerName = "Jan Bogaerts";
var websiteOwnerCompanyNameDutch = "Jan Bogaerts - Fotografie";
var websiteOwnerCompanyNameEnglish = "Jan Bogaerts - Photography";
var websiteOwnerCompanyDescriptionDutch = "Jan Bogaerts Fotografie en media producties";
var websiteOwnerCompanyDescriptionEnglish = "Jan Bogaerts Photography and media productions";
var copyrightTextDutch = "Deze fotos zijn copyright protected door " + websiteOwnerName + ". Probeer ze alstublieft niet te copieren.";
var copyrightTextEnglish = "These photos are copyright protected by " + websiteOwnerName + ". Please do not try to copy them.";

//   Treemenu settings 
// **********************************
// Variables for controlling colors in the menu document.
// Regular BODY atttributes as in HTML documents.
var MTMBGColor = "#000000";
var MTMBackground = "background-image.jpg";
var MTMTextColor = "white";
// All options regarding the root text and it's icon
//var MTMRootIcon = "camera.gif";
var MTMRootIcon = "eye32.gif";
var MTMRootColor = "white";
var MTMRootFont = "Verdana, Arial, Helvetica, sans-serif";
var MTMRootCSSize = "100%";
var MTMRootFontSize = "1";

var MTMSSHREF = "css/stylesheet.css";
// Variables for a second style sheet
var MTMSSHREF2 = "css/treemenu.css";

// END


//   Global functions
// **********************************
var agent = navigator.userAgent.toLowerCase();
var isWin   = (agent.indexOf("win")!=-1) || (agent.indexOf("windows")!=-1);
var isMac   = (agent.indexOf("mac")!=-1);
var isUnix  = (agent.indexOf("x11")!=-1);
var isNS = (navigator.appName == "Netscape"); 
var isIE = ((agent.indexOf("msie") != -1) && (agent.indexOf("opera") == -1)); 
var isOpera = (agent.indexOf("opera") != -1); 
var isSafari = (agent.indexOf("safari")!=-1);


function hideBlackFrame() {
	if (isWin && !isMac && isIE) {
		if (parent.document.getElementById("framesetContent") != null) {
			parent.document.getElementById("framesetContent").rows="*,0"; // hide the waitwhileloading frame, shows the content frame
		}
	} else {
	}
}
function showBlackFrame(stopsnow) {
	if (isWin && !isMac && isIE) {
		if (parent.document.getElementById("framesetContent") != null) {
			parent.document.getElementById("framesetContent").rows="0,*"; // shows the waitwhileloading frame
		}
	} else {
	}
//	if (stopsnow) {
//		stopSnow();
//	}
}

//   Small menubar methods
// **********************************
function getMenuWhitespace()
{
	var result = "";
	result += "<td height=\"15\" width=\"100%\" nowrap=\"true\" style=\"vertical-align:middle\" ";
	result += "bgcolor=\"#000040\">";
	result += "<div class=\"smallMenuBar\">";
	result += "&nbsp;";
	result += "</div></td>";
	return result;
}
function getMenuWhitespaceColored(bgcolor)
{
	var result = "";
	result += "<td height=\"15\" width=\"100%\" nowrap=\"true\" style=\"vertical-align:middle\" ";
	result += "bgcolor=\"" + bgcolor + ">";
	result += "<div >*";
	result += "&nbsp;";
	result += "</div></td>";
	return result;
}
function getMenuItemDisabled(name)
{
	var result = "";
	result += "<td height=\"15\" nowrap=\"true\" style=\"vertical-align:middle\" ";
	result += "bgcolor=\"#000040\">";
	result += "<div class=\"smallMenuBar\">";
	result += "&nbsp;" + name + "&nbsp;";
	result += "</div></td>";
	return result;
}
function getMenuItemColor(name, color)
{
	var result = "";
	result += "<td height=\"15\" nowrap=\"true\" style=\"vertical-align:middle\" ";
	result += "bgcolor=\"#000040\">";
	result += "<div class=\"smallMenuBar\"><FONT color=\"" + color + "\">";
	result += "&nbsp;" + name + "&nbsp;";
	result += "</FONT></div></td>";
	return result;
}
function getMenuItem(basepath, url, target, name, title)
{
	var result = "";
	result += "<td height=\"15\" nowrap=\"true\" style=\"vertical-align:middle\" ";
	result += "onMouseover=\"LmOver(this, '#334488')\" ";
	result += "onMouseout=\"LmOut(this, '#000040')\" ";
	result += "onMouseDown=\"LmDown(this, '#000040')\" ";
	result += "onMouseUp=\"LmUp()\" ";
	result += "bgcolor=\"#000040\">";
	result += "<div class=\"smallMenuBar\">";
	result += "&nbsp;<a class=\"smallMenuBar\" href=\"";
//	result += "javascript:showBlackFrame();";
	result += "javascript:";
//	if (isSafari && target == "_parent")
	if (isSafari)
	{
		target = "content";
		result += "parent.frames['" + target + "']" + ".";
	}
	result += "location.href='";
	result += basepath;
	result += url;
	result += "';";
	result += "\" target=\"";
	result += target;
	result += "\" title=\"";
	result += title;
	result += "\">";
	result += name;
	result += "</a>&nbsp;";
	result += "</div></td>";
	return result;
}
function getMenuItemColored(basepath, url, target, name, title, bgcolor, MouseOvercolor)
{
	var result = "";
	result += "<td height=\"15\" nowrap=\"true\" style=\"vertical-align:middle;backgroundColor=#000040\" ";
	result += "onMouseover=\"LmOver(this, '" + MouseOvercolor + "')\" ";
	result += "onMouseout=\"LmOut(this, '" + bgcolor + "')\" ";
	result += "onMouseDown=\"LmDown(this, '" + bgcolor + "')\" ";
	result += "onMouseUp=\"LmUp()\" ";
//	result += "bgcolor=\"" + bgcolor + "\">";
//	result += "bgcolor=\"#000040\">";
	result += "<div>";
	result += "&nbsp;<a href=\"";
	result += "window.location.href='";
	result += basepath;
	result += url;
	result += "';";
	result += "\" title=\"";
	result += title;
	result += "\" target=";
	result += target;
	result += ">";
	result += name;
	result += "</a>&nbsp;";
	result += "</div></td>";
	return result;
}
function getMenuEditForm(basepath, url, Leadingtext, target, title, hint)
{
	var result = "";
	result += "<form method=post action='";
	result += basepath;
	result += url;
	result += "' ";
	result += "target='";
	result += target;
	result += "' ";
	result += ">";
	result += "<td height=\"15\" nowrap=\"true\" style=\"vertical-align:top\" ";
	result += "onMouseover=\"LmOver(this, '#334488')\" ";
	result += "onMouseout=\"LmOut(this, '#000040')\" ";
	result += "onMouseDown=\"LmDown(this, '#000040')\" ";
	result += "onMouseUp=\"LmUp()\" ";
	result += "bgcolor=\"#000040\">";
	result += Leadingtext;
	result += "&nbsp;";
	result += "<input class=\"smallMenuBar\" name='EMail' type=text size=25 maxlength=128 value='' title='";
	result += hint;
	result += "'>&nbsp;";
	result += "<input class=\"smallMenuBar\" style='cursor:hand;' type='SUBMIT' value='";
	result += title;
	result += "'>";
	result += "</td>";
	result += "</form>";
	return result;
}
function LmOver(elem, clr) {
  elem.style.backgroundColor = clr;
  elem.style.cursor = 'hand'
}
function LmOut(elem, clr) {
  elem.style.backgroundColor = clr
}
function LmDown(elem, clr) {
  elem.style.backgroundColor = clr
}
function LmUp()
{
  //{if (inUrl != null) location.href = inUrl}
}

//   Global methods
// **********************************
function getQuerystringValue(name)   // returns a named value from the getQuerystringValue
{
    var tmp = unescape( location.search.substring(1) );
    var i   = tmp.toUpperCase().indexOf(name.toUpperCase()+"=");
    if ( i >= 0 )
    {
         tmp = tmp.substring( name.length+i+1 );
         i = tmp.indexOf("&");
         return( tmp = tmp.substring( 0, (i>=0) ? i : tmp.length ));
    }
    return("");
}

function getBasePath(thisFilename) {
	var basepath = location.href;
	basepath = basepath.substr(0, basepath.indexOf(thisFilename, 0));
	return basepath;
}

