function toggle1(thebut,layerid) {
	var theimg1=document.all.item(thebut+'img1');
	var theimg2=document.all.item(thebut+'img2');

	var img = theimg1.src.substring(theimg1.src.lastIndexOf('/')+1);
	if (img=='plus.gif') {
		openbutton1(thebut,theimg1,theimg2,layerid);
	} else {
		closebutton1(thebut,theimg1,theimg2,layerid);
	}
}

function openbutton1(thebut,theimg1,theimg2,layerid) {
	var thetree=document.all.item(thebut+'tree');
	thetree.style.display='';
	theimg1.src='images/minus.gif';
	theimg2.src='images/folder_open.gif';
	var layercount = 17;

	for(i=1;i<=layercount;i++) {
		if (i!=layerid) {
			var thetree=document.all.item('I'+i+'tree');
			thetree.style.display='none';
			var theimg1=document.all.item('I'+i+'img1');
			var theimg2=document.all.item('I'+i+'img2');
			theimg1.src='images/plus.gif';
			theimg2.src='images/folder_close.gif';
 		}
	}
}

function closebutton1(thebut,theimg1,theimg2,layerid) {
	var thetree= document.all.item('I'+layerid+'tree');
	thetree.style.display='none';
	theimg1.src='images/plus.gif';
	theimg2.src='images/folder_close.gif'
}

function getvar() {
var locurl=window.location.href;
var startplace=locurl.indexOf("?");
if (startplace != -1){
	var getit=locurl.substr(startplace+1);
	document.getElementById("mainWin").src=getit;
}
}
