function catalog_toggle(x) {
	with (document.getElementById("catalog")) {
		if (className == "leftbarmax") {
			x.src = "/images/web/leftbar_max.gif";
			className = "leftbarmin";
		} else if (className = "leftbarmin") {
			className = "leftbarmax";
			x.src = "/images/web/leftbar_min.gif";
		}
	}
}

function inset_catalog_toggle(x) {
	var ismax = (x.src.lastIndexOf("min") >= 0);
	document.getElementById("catalog").style.display = (ismax ? "none" : "block");
	x.src = "/images/web/leftbar_" + (ismax ? "max" : "min") + ".gif";
}

function openwin(x) {
	window.open(x, "bigpic", "width=640, height=480, resizable=yes, scrollbars=yes").focus();
}

function makeWin2(url, p_Width, p_Height) {
    agent = navigator.userAgent;
    windowName = "Sitelet";
	
    params  = "";
    params += "toolbar=0,";
    params += "location=0,";
    params += "directories=0,";
    params += "status=0,";
    params += "menubar=0,";
    params += "scrollbars=1,";
    params += "resizable=1,";
    if (p_Width == "null") {
		params += "width=500,";
		params += "height=350";
    } else {
		params += "width=" + p_Width+ ",";
		params += "height=" + p_Height;
    }

    // close the window to vary the window size
	if (typeof(win) == "object" && !win.closed) win.close();
	   
    win = window.open(url, windowName , params);

    if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) win = window.open(url, windowName , params);
	
    if (!win.opener) win.opener = window;
	
    // bring the window to the front
    win.focus();	
}

function makeWin2(url, p_Width, p_Height) {
    agent = navigator.userAgent;
    windowName = "Sitelet";
	
    params  = "";
    params += "toolbar=0,";
    params += "location=0,";
    params += "directories=0,";
    params += "status=0,";
    params += "menubar=0,";
    params += "scrollbars=1,";
    params += "resizable=1,";
    if (p_Width == "null") {
		params += "width=500,";
		params += "height=350";
    } else {
		params += "width=" + p_Width+ ",";
		params += "height=" + p_Height;
    }

    // close the window to vary the window size
	if (typeof(win) == "object" && !win.closed) win.close();
	   
    win = window.open(url, windowName , params);

    if (agent.indexOf("Mozilla/2") != -1 && agent.indexOf("Win") == -1) win = window.open(url, windowName , params);
	
    if (!win.opener) win.opener = window;
	
    // bring the window to the front
    win.focus();	
}

function updateimage(i, new_image) {
	document['image_name'].src = image[i];
}

function upBig(i) {
	document.getElementById('image_name').style.backgroundImage='URL(' + pic[i] + ')';
}

function nuimg(i) {
	document.getElementById('image_name').src= pic[i];
}

function nuimg2(i) {
	document.getElementById('image_name2').src= pic[i];
}

function swbtn(n, f) {
	if (f == 'out') document.getElementById(n).src= '/images/buttons/more-detaila.gif';
	else document.getElementById(n).src= '/images/buttons/more-detailb.gif';
}

function swbtn2(n, f) {
	document.getElementById(n).src = f;
}

function imgsw(a,b) {
document.getElementById(a).src=b;
}
