startList = function() {
	if (document.all&&document.getElementById) {
		navRoot = document.getElementById("nav");
		for (i=0; i<navRoot.childNodes.length; i++) {
			node = navRoot.childNodes[i];
			if (node.nodeName=="LI") {
				node.onmouseover=function() {
					this.className+=" over";
				}
				node.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
		selectRoot = document.getElementById("jumper");
		for (i=0; i<selectRoot.childNodes.length; i++) {
			node2 = selectRoot.childNodes[i];
			if (node2.nodeName=="LI") {
				node2.onmouseover=function() {
					this.className+=" over";
				}
				node2.onmouseout=function() {
					this.className=this.className.replace(" over", "");
				}
			}
		}
	}
}

window.onload=startList;

var toggled = "p01";
var toggled2 = "b01";
function toggle(id,class1,class2,preset,id2,id2class1,id2class2){
	element = document.getElementById(id);
		if (element.className == class1){
				if (preset == 1) {
					if (toggled != null) {
						document.getElementById(toggled).className = class1;
					}
				}
			element.className = class2;
		}
		if (id2 != null) {
			element2 = document.getElementById(id2);
				if (element2.className == id2class1){
						if (preset == 1) {
							if (toggled2 != null) {
								document.getElementById(toggled2).className = id2class1;
							}
						}
					element2.className = id2class2;
				}
				if (preset == 1) {
					toggled2 = id2;
					}
		}
	if (preset == 1) {
		toggled = id;
	}
}

/* POPUP WINDOW */
function popUp(strURL,strTarget,strType,strWidth,strHeight) {
	var strOptions="";
		if (strType=="all"){
			strOptions="toolbar,menubar,scrollbars,resizable,location,width="+strWidth+",height="+strHeight;
		}
		else {
			strOptions= strType+",width="+strWidth+",height="+strHeight;
		}
	window.open(strURL, strTarget, strOptions);
}

/* JUMPMENU */
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='popup.php?type=file&url=includes/bayilistesi.php&sehir="+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}

/* TOGGLE 2 */
function toggle2(id,class1,class2,preset){
	element = document.getElementById(id);
		if (element.className == class1){
				if (preset == 1) {
					if (toggled != null) {
						document.getElementById(toggled).className = class1;
					}
				}
			element.className = class2;
		}
		else{
				if (preset == 1) {
					if (toggled != null) {
						document.getElementById(toggled).className = class1;
					}
				}
			element.className = class1;
		}
	if (preset == 1) {
		toggled = id;
	}
}
